Medical-Event-Data-Standard / Medical-Event-Data-Standard/MEDS-DEV
Promote web tooling (collate_entities, aggregate_results) into the package
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 43
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
Background
The _web branch holds JSON manifests (entities/datasets.json, entities/tasks.json, entities/models.json) that the MEDS website fetches at runtime to render the dataset / task / model catalog pages. These files are currently manually maintained and have drifted significantly from the source code (see #186, #187, #188 for specifics).
A working prototype of the regeneration logic exists on the unmerged add_web_scripts branch:
src/MEDS_DEV/web/collate_entities.py— walkssrc/MEDS_DEV/{datasets,tasks,models}/and produces the JSON manifestssrc/MEDS_DEV/web/aggregate_results.py— improved version of the existing_web/scripts/aggregate_results.py(currently lives only on_web, not in the package, not under CI)
Both have docstring tests and are written as proper package modules.
What needs to be done
- Rebuild on current
main: the branch is stale and the source layout has changed since it was written (e.g.,_resultstask vs. nested category readmes, MIMIC-IV dataset.yaml updates, AUMCdb addition). Re-port the scripts cleanly rather than merging the branch as-is. - Move under the package: place at
src/MEDS_DEV/web/{collate_entities,aggregate_results}.py. Keep doctests. - Expose CLI entry points in
pyproject.toml:meds-dev-collate-entities→ writesdatasets.json/tasks.json/models.jsonmeds-dev-aggregate-results→ consolidates per-issue result.json blobs
- Replace the legacy script on
_web: once the package version is shipped, updateaggregate_benchmark_results.yamlto install MEDS-DEV from PyPI and invokemeds-dev-aggregate-results, then delete_web/scripts/aggregate_results.py. - Delete or archive the
add_web_scriptsbranch once content is incorporated (currently a dangling reference).
Acceptance criteria
-
meds-dev-collate-entitiesandmeds-dev-aggregate-resultsare installable from PyPI as CLI commands. - Doctests for both run as part of the fast test lane.
-
aggregate_benchmark_results.yamlno longer depends on a script committed to_web. - Resolves #186, #187, #188 (collation), partially addresses #63.
Related
- Blocks website integration work tracked in #148
- Sibling: workflow-side automation tracked separately (see new issue for entity-regeneration workflow)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the add_web_scripts implementations with the current main layout under src/MEDS_DEV/{datasets,tasks,models}/ and review pyproject.toml. Run the existing doctests for collate_entities.py and aggregate_results.py, then verify the two CLI commands and the updated aggregate_benchmark_results.yaml. Done means both commands are installable from PyPI, doctests run in the fast lane, and the legacy _web script is removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, ci-cd, cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100