Skip to content

docs: add canonical monorepo structure spec (Monorepo.md)#74

Merged
ChrisRackauckas merged 3 commits into
SciML:masterfrom
ChrisRackauckas-Claude:monorepo-spec-doc
Jun 8, 2026
Merged

docs: add canonical monorepo structure spec (Monorepo.md)#74
ChrisRackauckas merged 3 commits into
SciML:masterfrom
ChrisRackauckas-Claude:monorepo-spec-doc

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown

Adds Monorepo.md, a comprehensive reference for the canonical SciML monorepo standard — the layout future monorepos and contributors should follow — and links it from README.md under a new Monorepo structure section.

The reference implementation throughout is SciML/OrdinaryDiffEq.jl. Every concrete value, file shape, and code snippet was verified against the live @v1 reusable workflows in this repo and OrdinaryDiffEq.jl master before being written down.

What it documents

  1. Layout — umbrella root package + lib/<Name>/ full packages (name/uuid/version/authors/[deps]/[sources]/[compat]/[extras]/[targets], src/, test/, LICENSE.md, component-template README.md).
  2. [sources] graph — sublibs list in-repo deps by relative path; root lists tested sublibs as {path = "lib/<Name>"}; true dependency direction; never a [sources] entry without a matching [deps]; how compute_affected_sublibraries.jl builds the affected + reverse-dep matrix from [deps].
  3. Test structure — every test in exactly one group, each in its own test/<Group>/ folder; dependency-driven per-group Project.toml (no extra deps → no Project.toml, runs in main env, part of All; adds deps → isolated env via Pkg.activate, excluded from All); QA in test/qa; light main [extras]/[targets].test; no top-level test/Project.toml.
  4. Group names + env — capitalized/Title-case, default All, never lowercase(get(ENV, ...)); shared <REPO>_TEST_GROUP threaded by group-env-name; root runtests.jl _detect_sublibrary_group dispatcher.
  5. test_groups.toml — required versions, optional runner/timeout/num_threads/local_only; version convention Core ["lts","1.11","1","pre"], QA ["1"], GPU ["1"]; GPU is a dep-adding group on a self-hosted runner — no bespoke GPU.yml.
  6. Workflows — thin @v1 callers with secrets: "inherit" (SublibraryCI, DowngradeSublibraries, CI, Downgrade, Documentation, Downstream, FormatCheck/RunicSuggestions, SpellCheck, TagBot root + TagBot-Subpackages matrix, DependabotAutoMerge, DocPreviewCleanup, benchmark); downgrade is strict fleet-wide (allow_reresolve: false hardcoded centrally, no input).
  7. Repo files.codecov.yml (comment: false), .typos.toml, .gitignore, per-package LICENSE.md.
  8. Formatting — Runic default; Catalyst/JumpProcesses are the JuliaFormatter exceptions; CompatHelper removed fleet-wide; Invalidations not standard.

Notes for review

  • Documented against the live @v1 (which equals origin/master / v1.6.0): sublibrary-downgrade.yml / downgrade.yml hardcode allow_reresolve: false with no allow-reresolve input, and documentation.yml has a runner input for GPU-queue docs. The README's older sublibrary-downgrade.yml table still lists an allow-reresolve input; the new doc reflects the current strict-no-input behavior (flagging the discrepancy here for a possible README follow-up).
  • A couple of values in the original task brief were corrected to match the live reference: Core/QA version sets are ["lts","1.11","1","pre"] / ["1"] (per ODE's test_groups.toml and the detection script defaults), and Downgrade* callers run on Julia 1.11 in ODE today; the skip input defaults to Pkg,TOML and the caller lists stdlibs + in-repo sublibs (it is not auto-populated centrally).

typos is clean on the new file.

Ignore until reviewed by @ChrisRackauckas.

🤖 Generated with Claude Code

ChrisRackauckas and others added 3 commits June 8, 2026 02:49
Document the standard SciML monorepo layout for new repos and
contributors: umbrella root + lib/<Name> full packages, the [sources]
dependency graph, the one-group-one-folder test structure with
dependency-driven per-group Project.tomls, group naming and the shared
<REPO>_TEST_GROUP env var, test_groups.toml conventions, the thin @v1
caller workflow set, the standard repo files, and the Runic formatting
default (Catalyst/JumpProcesses JuliaFormatter exception).

Every concrete value and snippet is taken from the live @v1 reusable
workflows here and from the reference SciML/OrdinaryDiffEq.jl master.
Link it from README.md under a new "Monorepo structure" section.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The BDFL has set these as the target standards going forward; ODE and the
@v1 reusable workflows are being migrated to them. Rewrite the affected
sections of Monorepo.md (and the README monorepo section) to document the
targets, with a Status/rollout note flagging the in-flight migration.

- Add a "Status / rollout" note near the top referencing the in-flight PRs
  (SciML/.github SciML#73 = auto-skip + downgrade-1.10; the monorepo version-
  matrix update; the fleet TagBot thin-caller conversion).
- Version matrix (test_groups.toml + root CI): base/Core = ["lts","1","pre"],
  QA = ["lts","1"], GPU = ["1"]; drop the pinned "1.11" middle version.
- Downgrade callers use julia-version "1.10" (the minimum-supported floor)
  for both downgrade.yml and sublibrary-downgrade.yml.
- Downgrade skip is auto-populated centrally (Julia stdlibs + in-repo lib/*
  names + caller extras); callers no longer hand-list them. allow_reresolve
  stays hardcoded false centrally with no input.
- TagBot.yml is a thin caller of tagbot.yml@v1: root tagbot job (+ on:
  triggers) and, for monorepos, a tagbot-subpackages matrix over each
  registered lib/<Name> with subdir; single-package repos have only the root
  job. Replaces the old inlined JuliaRegistries/TagBot@v1 form.
- Standardize the catch-all sentinel to Title-case "All" in prose and the
  runtests.jl snippet; note it is a local-only default CI never sets.
- Expand the .gitignore block to the full canonical set, framed as typical
  entries.
- Fix a pre-existing typos hit ("mis-format") so spellcheck stays clean.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
In Monorepo.md and README.md, the downgrade julia-version (for downgrade.yml
and sublibrary-downgrade.yml) is now documented as "lts": the LTS alias
(currently 1.10), tracking the LTS as it advances. Project.toml [compat]
julia = "1.10" floors and other workflows' version specs are unchanged.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review June 8, 2026 08:22
@ChrisRackauckas ChrisRackauckas merged commit ac31e01 into SciML:master Jun 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants