This repository generates the metadata YAML files that describe PhysioNet's open datasets in the Registry of Open Data on AWS. The script lists the datasets in PhysioNet's physionet-open S3 bucket, looks up each one with the PhysioNet API, and writes one YAML file per dataset. A GitHub Actions workflow runs the script, validates the files with the registry's own checks, and opens a pull request with them.
- Lists the datasets in the
physionet-openS3 bucket (arn:aws:s3:::physionet-open/) with boto3, without AWS credentials. - Fetches the latest published version of every PhysioNet project with a single PhysioNet API call.
- Writes a YAML file per dataset with its name, description, documentation link, license, tags and S3 resource.
- Doesn't stop on a single dataset: names longer than the registry's 130-character limit are shortened, and datasets that can't be described are skipped. Both are listed in a report.
git clone https://github.com/MIT-LCP/aws-physionet-open-data.git
cd aws-physionet-open-data
pip install -r requirements.txt
From the project directory, run:
python scripts/metadata-generator.py
The script:
- Lists the datasets in the
physionet-openbucket. - Fetches the latest version of every published project from the PhysioNet API.
- Writes a YAML file per dataset to the
datasetsfolder. - Writes
metadata-report.md, which lists any names that were shortened and any datasets that were skipped, with the reason.
The registry requires Name to be 5–130 characters. NAME_OVERRIDES in the script holds reviewed short names for datasets that are already in the registry; keep those as they are, so the published names don't change. Any other title longer than 130 characters is cut at the last word boundary that fits, with … appended, and listed in the report for review.
Name: Abdominal and Direct Fetal ECG Database
Description: The research material included in the Abdominal and Direct Fetal Electrocardiogram
Database contains multichannel fetal electrocardiogram (FECG) recordings obtained
from 5 different women in labor, between 38 and 41 weeks of gestation. ...
Documentation: https://doi.org/10.13026/C2RP4B
Contact: https://physionet.org/about/#contact_us
ManagedBy: '[PhysioNet](https://physionet.org/)'
UpdateFrequency: Not updated
Tags:
- aws-pds
- life sciences
- health
- medicine
License: Open Data Commons Attribution License v1.0
Resources:
- Description: https://doi.org/10.13026/C2RP4B
ARN: arn:aws:s3:::physionet-open/adfecgdb/
Region: us-east-1
Type: S3 Bucket
ADXCategories:
- Healthcare & Life Sciences DataThe Build Metadata and Create PR workflow (.github/workflows/build-metadata.yaml) is run manually from the Actions tab. It:
- Runs the generator.
- Validates the YAML files with the registry's schema and
_scripts/test.sh, from a pinned commit of awslabs/open-data-registry (REGISTRY_VALIDATORS_REFin the workflow). - Opens or updates a pull request with the files in the target repository, on the
metadata-update-branchbranch, usingmetadata-report.mdas its body.
Configuration:
- Target repository: the
target_repositoryinput when running the workflow, or theMETADATA_TARGET_REPOSITORYrepository variable. It defaults to the test repositoryChrystinne/pr-metadata-generator. - Token: the
MY_PERSONAL_TOKENsecret, with permission to push branches and open pull requests in the target repository. - Validators: to use newer registry checks, update
REGISTRY_VALIDATORS_REFto a newer commit and confirm the workflow still passes.
If you would like to contribute to this project, please create a pull request with your changes. We welcome bug fixes, improvements, and additional features.
This project is licensed under the MIT License - see the LICENSE file for details.
For any questions or further assistance, please contact the project maintainers through PhysioNet.