Skip to content

About

Generates and publishes the dataset metadata (file trees, sizes, file counts) behind the Zephyr dataset browser

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IAC Metadata

Checks File index File size number Release Docs License

Generates the dataset metadata behind the dataset browser of zephyr-frontend and the dataset pages of the C2SM landing page. For every dataset in src/datasets.yaml, scheduled GitHub Actions workflows scan the data on the IAC servers and publish JSON files at https://data.iac.ethz.ch/zephyr/file_index/.

Documentation: adding a dataset, testing changes, workflow details and setup are described in the Zephyr documentation.

How it works

flowchart LR
    Y[src/datasets.yaml] --> FI[file_index.yml<br/>file_tree.py]
    Y --> FS[file_size_number.yml<br/>file_size_number.py]
    J[src/datasets.json] --> PD[publish_datasets.yml]
    FI -->|file_tree_*.json| IDX[(File index on<br/>data.iac.ethz.ch)]
    FS -->|meta_*.json| IDX
    PD -->|datasets.json| IDX
    IDX --> FE[zephyr-frontend]
    IDX --> LP[c2sm.github.io]
Loading

The workflows in .github/workflows/ connect to the IAC servers over ssh, run the scripts in src/ there and copy the results to the file index.

Workflow Trigger
file_index.yml Daily at 02:00 UTC, push to main, manual
file_size_number.yml Daily at 03:00 UTC, push to main, manual
publish_datasets.yml Push to main that changes datasets.json, manual
dry_run.yml Pull requests that change src/
checks.yml Pull requests, push to main

Usage

Run a workflow by hand, optionally for a single dataset:

gh workflow run file_index.yml --repo C2SM/iac-metadata -f dataset=cmip7
gh workflow run file_size_number.yml --repo C2SM/iac-metadata -f dataset=cmip7

Manual runs write to the production file index, even from a feature branch. To test changes, open a pull request: the dry run scans the affected datasets without publishing anything.

Development

pip install -r src/requirements.txt pytest
pytest
shellcheck --severity=warning src/*.sh

Pull requests need the checks and Dry run status checks to pass.

Related repositories

License

MIT, see LICENSE.

About

Generates and publishes the dataset metadata (file trees, sizes, file counts) behind the Zephyr dataset browser

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages