Repository navigation
Description
Issue: Evaluate Lecture Repository Architecture Approaches
Summary
This issue documents a comparison of two architectural approaches for managing QuantEcon lecture repositories, with the goal of improving maintainability, consistency, and authoring experience across lecture series.
Context: Rolling out updates across lectures (theme improvements, exercise extensions, common static assets like GPU admonitions) currently requires coordinating changes across multiple repositories. This creates maintenance overhead and risks inconsistency.
Option 1: Mono Repository
Consolidate all lectures into a single repository, with lecture series managed via configuration files (e.g., lecture-python-programming.yml). Publishing would still push outputs to individual repositories for hosting via GitHub Pages.
Pros
| Benefit | Description |
|---|---|
| Single source of truth | All lecture content in one place; updates propagate naturally |
| Simplified lecture reuse | Easier to include the same lecture in multiple series without duplication |
| Centralized testing | Execution testing runs from one location; can specialize hardware requirements as needed |
| Consistent tooling | Build scripts, linting, and CI configuration maintained once |
| Atomic cross-series updates | Theme changes, admonitions, and shared assets updated in a single commit |
Cons
| Challenge | Description |
|---|---|
| Scale and navigation | Large number of lectures to navigate; finding relevant files becomes harder |
| Loss of series context | No direct mental model of how a series is organized; editing happens "out of context" |
| Publishing complexity | Still requires individual repositories for GitHub Pages hosting |
| Variant management | Harder to manage specialized versions (e.g., JAX variants) without naming conventions like _jax suffixes |
| Longer CI runtimes | Execution testing across all lectures increases total runtime |
| Contributor onboarding | New contributors may find the repo overwhelming |
Key Concern
From an authoring perspective, it's unclear how to quickly identify how a lecture fits within a series (narrative flow, prerequisites, learning progression). Series tags in YAML frontmatter help, but may not provide sufficient context for effective authoring.
Option 2: Centralized GitHub Actions
Maintain separate repositories for each lecture series, but centralize all workflow complexity (environments, build processes, publishing) via shared GitHub Actions maintained in a central repository (e.g., QuantEcon/actions).
Pros
| Benefit | Description |
|---|---|
| Series-level organization | Source of truth remains at the series level; clear mental model for authors |
| Focused repositories | Each repo contains only relevant lectures; easier navigation |
| Centralized infrastructure | Environments, publishing config, and build logic updated once and used everywhere |
| Isolated CI | Faster test runs per repository; failures are scoped to a single series |
| Familiar contributor model | Contributors work within a focused, understandable scope |
Cons
| Challenge | Description |
|---|---|
| Lecture sharing | Harder to use lectures across series; requires tracking source of truth and syncing |
| Action versioning | Coordinating action updates across repos; managing breaking changes |
| Drift risk | Individual repos may drift from centralized patterns if not kept in sync |
| Duplication | Shared content (admonitions, includes) may need to be duplicated or fetched at build time |
Current Status
This approach is actively being developed in QuantEcon/actions. See also: lecture-jax#256 as an example of deployment architecture that needs updating.
Option 3: Hybrid Approach (for consideration)
A potential middle ground: maintain a mono repository as the source of truth, with series repositories kept in sync for authoring contributions.
Concept
- Mono repo serves as the canonical source and handles cross-series concerns
- Series repos are synchronized views that provide authoring context
- Changes can flow bidirectionally (or from series → mono with automation)
Open Questions
- What tooling would be needed to keep repos in sync?
- How would conflicts be resolved?
- Does this add complexity without sufficient benefit?
Evaluation Criteria
When deciding between approaches, consider:
- Author experience — How easy is it to understand context and make changes?
- Maintainability — How much effort to keep infrastructure consistent?
- Scalability — How well does it handle growing number of lectures/series?
- Contributor accessibility — How approachable is it for new contributors?
- CI/CD efficiency — Build times, resource usage, failure isolation
- Content reuse — How easily can lectures be shared across series?
Next Steps
- Gather feedback from team on priorities and pain points
- Evaluate feasibility of hybrid approach
- Prototype if needed
- Make decision and document rationale
References
- QuantEcon/actions — Centralized GitHub Actions repository
- lecture-jax#256 — Example PR showing deployment architecture
Activity
mmcky commentedon Dec 1, 2025
Recommendation (via GitHub Copilot analysis)
Based on the analysis in this issue, the recommendation is Option 2: Centralized GitHub Actions, with a path toward selective elements of the hybrid approach over time.
Reasoning
Why not the Mono Repo (Option 1)?
The authoring experience concern is significant. When writing educational content, understanding the narrative flow—what comes before, what comes after, what concepts have been introduced—is critical. A flat structure with 100+ lectures makes this cognitively difficult, even with good tooling. Educational content isn't like a typical codebase where files are relatively independent; lectures are deeply interconnected within a series.
Why Centralized Actions (Option 2)?
Preserves the mental model — Authors think in terms of series, and the repo structure matches that mental model. This reduces friction and errors.
Solves the actual pain point — The original concern was about rolling out infrastructure updates (themes, admonitions, deployment). Centralized actions directly address this without disrupting content organization.
Lower risk — Work is already underway in QuantEcon/actions. It's an incremental improvement rather than a major migration.
Failure isolation — A broken build in one series doesn't block others. This matters for a project with multiple active lecture series.
Addressing the main weakness
The biggest con of Option 2 is lecture sharing across series. However:
Practical Path Forward
This gives you 80% of the mono repo benefits (consistency, single updates) while preserving the authoring experience that makes educational content easier to write and maintain.
This recommendation was generated by GitHub Copilot (Claude Opus 4.5) based on the pros/cons analysis in this issue. It represents an AI-assisted evaluation and should be reviewed by the team.
mmcky commentedon Dec 1, 2025
Follow-up: Acknowledging Bias in the Recommendation
The previous recommendation toward Option 2 was heavily influenced by the framing in the initial notes, which already leaned in that direction by:
To provide a more balanced view, here are scenarios where Option 1 (Mono Repo) might actually be the better choice:
Key Questions the Team Should Answer
These real-world factors should drive the decision more than a theoretical analysis of written pros/cons.
Follow-up from GitHub Copilot (Claude Opus 4.5) acknowledging that the initial recommendation reflected bias in the input framing.
mmcky commentedon Dec 1, 2025
@kp992 do you remember any other pros/cons re: mono repo idea that we have discussed?
[-]Evaluate Lecture Repository Architecture Approaches[/-][+]Mono Repo vs. Centralised GitHub Actions vs. Hybrid[/+]kp992 commentedon Dec 8, 2025
Thanks for putting this together @mmcky. For option 1, I think almost everything is covered so don't have much to add. For option 1 cons:
*-series.yamllecture files.