Skip to content

Validate MMED schedule data via the shared pre-commit hook (#54) - #26

Open
WestonVoglesonger wants to merge 2 commits into
ICI3D:gh-pagesfrom
WestonVoglesonger:feat/schedule-validate-pullin
Open

Validate MMED schedule data via the shared pre-commit hook (#54)#26
WestonVoglesonger wants to merge 2 commits into
ICI3D:gh-pagesfrom
WestonVoglesonger:feat/schedule-validate-pullin

Conversation

@WestonVoglesonger

@WestonVoglesonger WestonVoglesonger commented Jul 14, 2026

Copy link
Copy Markdown

Makes MMED pull the shared schedule validator in as a pinned pre-commit hook, rather than vendoring its own copy. Reshaped to the Path A model: the validator, JSON Schema, and role vocabulary live once in ICI3D.github.io (now packaged and exposed as a pre-commit hook), and MMED consumes them with no duplication and no per-clinic maintenance.

What's here

  • _data/schedule/mmed/2025.yml — MMED's own schedule data (extracted from the live wall). MMED owns its data; it lives here, not in the shared theme.
  • .pre-commit-config.yaml — pins the shared validate-schedule hook. Contributors get the same check locally on every commit (pip install pre-commit && pre-commit install), and it runs in CI via pre-commit/action, so local and CI validation are one source of truth.
  • .github/workflows/schedule-validate.yml — runs that same hook on push/PR. Checks out the ICI3D.github.io submodule only for its shared people records (the hook's --people-dir), which is how instructor keys resolve today, the same records the Jekyll build reads.

Why this shape (vs. the earlier composite-action version)

The schema and validator are pulled in by pre-commit, not by a submodule path, so contributors run the identical check locally before pushing (the original ask in #54), not only in CI. Nothing clinic-specific is maintained here beyond the data file and a few lines of config. A new clinic drops in the same .pre-commit-config.yaml + its own data.

Verified locally

The shared validator reports 0 errors / 0 warnings on this data, resolving MMED's instructor keys against the 69 shared people records in the ICI3D.github.io submodule. This is the exact path the hook runs.

Draft — depends on the theme PR

The hook currently points at the fork branch carrying the packaged validator (WestonVoglesonger/ICI3D.github.io, pinned by sha), because ICI3D/ICI3D.github.io#59 is not merged yet. Once #59 merges, flip the hook's repo: to ICI3D/ICI3D.github.io and rev: to the merge sha/tag. Until then this is a working preview against the fork.

Follow-up (not in this PR)

Rendering still comes through the submodule. Moving MMED's rendering to remote_theme: ICI3D/ICI3D.github.io (dropping the submodule, and having MMED own its _data/team) is a separate, site-build-affecting change and the #56 topology call. This PR deliberately touches only the validation channel, which is safe and independent.

Supersedes #25

Closes out the earlier spike (#25), which put the tools/schema/renderer in MMED instead of pulling them from the theme.

Part of #54 / epic #58.

Adds MMED's own schedule data (_data/schedule/mmed/2025.yml, extracted from the
live schedule wall) and a workflow that validates it by pulling in the shared
composite action from the ICI3D.github.io submodule. MMED owns its data; the
validation logic stays single-source in the theme repo.

Depends on ICI3D/ICI3D.github.io#59 (the composite action) being merged and
MMED's submodule pointer bumped to it. Verified locally: the shared validator
reports 0 errors / 0 warnings on this data.

Supersedes the earlier spike PR ICI3D#25 (which duplicated the tools/renderer here
instead of pulling them from the theme).
Replaces the composite-action-via-submodule workflow with the distributed
pre-commit hook from ICI3D.github.io: MMED pins the hook in
.pre-commit-config.yaml and gets the same validation locally
(pre-commit install) and in CI (pre-commit/action), with the schema and role
vocabulary pulled in from the shared package (no vendoring). Instructor keys
resolve against the shared people records from the ICI3D.github.io submodule
via --people-dir, until MMED owns its own _data/team.

Interim: the hook points at the fork branch until ICI3D/ICI3D.github.io#59
merges; then it flips to the upstream repo at the merge sha.
@WestonVoglesonger WestonVoglesonger changed the title Validate MMED schedule data via the shared validator (pull-in, #54) Validate MMED schedule data via the shared pre-commit hook (#54) Jul 17, 2026
@WestonVoglesonger

Copy link
Copy Markdown
Author

@pearsonca reshaped this to consume the shared validator as a pinned pre-commit hook instead of a composite action through the submodule, so contributors run the same check locally, not just in CI.

  • .pre-commit-config.yaml pins the validate-schedule hook; the workflow runs it via pre-commit/action; _data/schedule/mmed/2025.yml is MMED's own data.
  • Validation channel only. Rendering still comes via the submodule; the remote_theme swap is the separate #56 call and is not here.

Verified: 0 errors / 0 warnings on MMED's 2025 data against the 69 shared people records. Draft pending #59; the hook points at the fork branch for now and flips to upstream at the merge sha once #59 lands.

@WestonVoglesonger
WestonVoglesonger marked this pull request as ready for review July 27, 2026 15:03
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.

1 participant