Skip to content

Say which dataset each remaining task works with - #1548

Merged
jhnwu3 merged 2 commits into
masterfrom
docs/task-dataset-refs
Nov 19, 2026
Merged

jhnwu3 merged 2 commits into
masterfrom
docs/task-dataset-refs

Conversation

@jhnwu3

@jhnwu3 jhnwu3 commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Thirteen task docstrings had no Works with :class:~pyhealth.datasets.X. line. Because of that, they show no dataset in three places: their own API pages, the "Tasks for this dataset" list on the dataset pages (built by docs/extensions/dataset_tasks.py), and the task cards on pyhealth.dev (the nightly sync in sunlabuiuc/pyhealth.github.io#33 listed them as "no dataset cited").

This adds the line after each docstring's summary sentence, where the other tasks have it. Each dataset is the one the task's code or example uses:

Tasks Dataset
CHAOSLiverSegmentationCTMRI, CHAOSLiverSegmentationCTonly, CHAOSLiverSegmentationMRIonly, CHAOSAbdominalSegmentationCTMRI, CHAOSAbdominalSegmentationMRIonly CHAOSDataset
EthosTimelineMEDS, EthosOutcomeMEDS, ICUAdmissionMEDS, ProlongedLengthOfStayMEDS MEDSDataset
MedModDecompensationMIMIC4 MIMIC4Dataset
CompetingRisksPBC PBCDataset
RSNAPneumoniaClassification RSNAPneumoniaDataset
SurvivalTimeToEventGBSG GBSGDataset

The change is docstrings only. tools/check_pr_rules.py passes, and so does tests/core/test_docs_dataset_tasks.py. I reran the site's extract_metadata.py against this branch: all 23 new tasks now cite a dataset.

Also: the MEDSDataset "Getting the data" section now points at the MEDS documentation (https://medical-event-data-standard.github.io/), which lists the available ETLs. The class docstring and the API page already linked it, but the getting-started section didn't.

🤖 Generated with Claude Code

jhnwu3 and others added 2 commits November 18, 2026 11:00
Thirteen task docstrings had no "Works with :class:`~pyhealth.datasets.X`."
line, so their RTD pages, the dataset pages' task lists and the website
cards showed no dataset for them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Test Coverage

Total: 84.95% (39721 / 46760 lines)

Modified file Coverage Lines
pyhealth/datasets/meds.py 93.67% 74 / 79
pyhealth/tasks/chaos_segmentation.py 97.98% 97 / 99
pyhealth/tasks/competing_risks_pbc.py 100.00% 56 / 56
pyhealth/tasks/ethos_tasks.py 100.00% 86 / 86
pyhealth/tasks/medmod_decompensation_mimic4.py 95.40% 83 / 87
pyhealth/tasks/meds_outcome_tasks.py 100.00% 125 / 125
pyhealth/tasks/rsna_pneumonia_classification.py 92.31% 12 / 13
pyhealth/tasks/survival_time_to_event.py 95.10% 136 / 143

Workflow run · 2874e60

@jhnwu3 jhnwu3 added the status: automatic The PR will go through automatic review process. label Nov 19, 2026
@jhnwu3

jhnwu3 commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review

suggestion: approve
decision: approve

Thank you for this contribution. Adding the "Works with" line to the remaining task docstrings means each task now shows its dataset on its API page, in the dataset task lists and on the website cards. The MEDS "Getting the data" section also now links to the MEDS documentation.

The change only touches docstrings in self-contained task classes and one dataset docstring. The dataset named in each task matches the one the task uses. It adds no new components and no new sharing between components. The docs match the code.

Coverage meets the bar. The whole repository is at 84.95%, above the 60% minimum. Every changed file is above 80%, from 92.31% to 100%. No new tests are needed for a docstring-only change.

It looks ready to merge.

Reviewed commit 2874e60

@jhnwu3
jhnwu3 merged commit ec918f0 into master Nov 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: automatic The PR will go through automatic review process.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant