Make build_demo optional, skip demo-less datasets in tests#312
Merged
Conversation
Codecov Report❌ Patch coverage is
|
Prerequisite for the per-dataset registration PRs (#305 AUMCdb, #306 EHRShot, #307 HIRID, #308 INSPIRE, #309 NWICU, #310 SICdb, #311 eICU). Most of those datasets' upstream extractors don't ship a publicly installable demo, and the existing registry validation requires every dataset to declare a build_demo command. Switches the convention to: a dataset has a demo iff its commands declare build_demo. Absence is the signal — no separate metadata field. - `test_all_datasets_have_commands` now requires `build_full` (which every dataset still needs) and allows missing `build_demo`. - `tests/conftest.py` drops datasets without `build_demo` from the integration test matrix, so a per-dataset CI lane for one collects zero parametrized tests and passes cleanly rather than trying to build data the dataset can't produce. - `src/MEDS_DEV/datasets/__main__.py` raises a clear error when called with `demo=True` against a dataset that doesn't declare a build_demo command (instead of the previous KeyError). No dataset.yaml files change here — those changes ship with the sister per-dataset PRs that depend on this one. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mmcdermott
force-pushed
the
feat/dataset-demo-availability
branch
from
May 13, 2026 17:20
17019a0 to
a2d4038
Compare
demo_available opt-out for datasets without demo recipesbuild_demo optional, skip demo-less datasets in tests
This was referenced May 13, 2026
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prerequisite for the per-dataset registration PRs (#305 AUMCdb, #306 EHRShot, #307 HIRID, #308 INSPIRE, #309 NWICU, #310 SICdb, #311 eICU). Most of those datasets' upstream extractors don't ship a publicly-installable demo, and the existing registry validation requires every dataset to declare a
build_democommand.Switches the convention to: a dataset has a demo iff its
commandsdeclarebuild_demo. The absence of the key is itself the signal — no separate metadata field, noecho "..."stubs, and no two-sources-of-truth ambiguity.What changes
Three small edits, no behavior change for datasets that already declare
build_demo(e.g., MIMIC-IV):test_all_datasets_have_commandsnow requiresbuild_full(which every dataset still needs) and allows missingbuild_demo.tests/conftest.pydrops datasets withoutbuild_demofrom the integration test matrix, so a per-dataset CI lane for one collects zero parametrized tests and passes cleanly rather than trying to build data the dataset can't produce.src/MEDS_DEV/datasets/__main__.pyraises a clearValueErrorwhen called withdemo=Trueagainst a dataset that doesn't declare abuild_democommand (instead of the previousKeyError).No
dataset.yamlfiles change here — those changes ship with the sister per-dataset PRs that depend on this one.Test plan
Refs
devonce this lands.🤖 Generated with Claude Code