Skip to content

About

Script for generating the PhysioNet pages in the AWS Open Data Registry

Resources

Stars

1 star

Watchers

6 watching

Forks

Latest commit

 

History

25 Commits

Folders and files

Repository files navigation

AWS Workflow for Open Data Program

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.

Features

  • Lists the datasets in the physionet-open S3 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.

Installation

git clone https://github.com/MIT-LCP/aws-physionet-open-data.git
cd aws-physionet-open-data
pip install -r requirements.txt

Usage

From the project directory, run:

python scripts/metadata-generator.py

The script:

  1. Lists the datasets in the physionet-open bucket.
  2. Fetches the latest version of every published project from the PhysioNet API.
  3. Writes a YAML file per dataset to the datasets folder.
  4. Writes metadata-report.md, which lists any names that were shortened and any datasets that were skipped, with the reason.

Names longer than 130 characters

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.

Example of a generated YAML file

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 Data

GitHub Actions workflow

The Build Metadata and Create PR workflow (.github/workflows/build-metadata.yaml) is run manually from the Actions tab. It:

  1. Runs the generator.
  2. Validates the YAML files with the registry's schema and _scripts/test.sh, from a pinned commit of awslabs/open-data-registry (REGISTRY_VALIDATORS_REF in the workflow).
  3. Opens or updates a pull request with the files in the target repository, on the metadata-update-branch branch, using metadata-report.md as its body.

Configuration:

  • Target repository: the target_repository input when running the workflow, or the METADATA_TARGET_REPOSITORY repository variable. It defaults to the test repository Chrystinne/pr-metadata-generator.
  • Token: the MY_PERSONAL_TOKEN secret, with permission to push branches and open pull requests in the target repository.
  • Validators: to use newer registry checks, update REGISTRY_VALIDATORS_REF to a newer commit and confirm the workflow still passes.

Contributing

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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

For any questions or further assistance, please contact the project maintainers through PhysioNet.

About

Script for generating the PhysioNet pages in the AWS Open Data Registry

Resources

Stars

1 star

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages