This repository is the source of truth for the Hypergraphx-data dataset catalog. It contains dataset metadata, reproducibility material, static-site templates, and the build/deploy scripts that publish the generated GitHub Pages website.
resources/datasets_config/: dataset configs (config_<name>.json) and optional<name>.bibfiles.resources/datasets_statistics/: compact per-dataset chart distributions (distributions.json).reproducibility/: per-dataset reproducibility guides and script references.site_config.json: site configuration (setgithub_repo_url_baseto link reproducibility pages to GitHub).dist/: local generated site output (ignored by git).templates/: HTML templates used to build the site.static/: source static assets used by the site (CSS, JS, images, figures).scripts/: build helpers for site generation, plus dataset versioning (release_dataset.py,upload_datasets.sh; seeHOWTO.md, "Dataset versions").scripts/maintenance/: optional local maintenance, audit, download, compression, and verification tools.data/: local raw datasets (ignored; may be a symlink to a remote server mount).
Prereqs: Python 3.12 or newer.
- Building and deploying the site (
make build,scripts/deploy_pages.sh) uses only the Python standard library. Ifmatplotlibis installed, the statistics step also writes optional PDF figures tostatic/figures/; without it, the step prints a warning and skips them. No published page links to these figures. - The dataset tools (
scripts/generate_dataset_distributions.py,scripts/regenerate_hgx_from_json.py,scripts/maintenance/verify_local_dataset_loads.py) needhypergraphx. Use thedata-hgxConda environment fromenvironment.yml, which pinshypergraphxand the scientific stack.requirements.txtis a lighter pip list and does not includehypergraphx.
From the repo root:
make buildThis runs, in order:
scripts/populate_with_links.py resources/datasets_configto ensure download URLs are present in dataset configs.scripts/generate_statistics.pyto generatedist/statistics.html(and optionaldist/static/figures/*.pdfif matplotlib is available).scripts/generate_pages.pyto generatedist/index.html,dist/static/js/related-data.js, anddist/datasets/*.html.
The build also copies static root templates such as templates/about_template.html to their published filenames in dist/.
Note that make build is not strictly read-only: populate_with_links.py can
update dataset config files if download links are missing.
- To add or refresh distribution charts for one dataset, generate the compact chart payload from the local dataset file:
python3 scripts/generate_dataset_distributions.py <dataset> --overwriteUse --prefer json if the JSON file should be treated as the source instead of the HGX file.
Notes:
resources/datasets_statistics/<dataset>/distributions.jsonis the source for dataset detail-page charts. The build will still run if a dataset has no distributions file, but charts will be empty.- If you want deterministic builds, keep
FETCH_REMOTE_SIZESunset in the environment; the default is off. - Set
SITE_DIST_DIRto change the output directory (default:dist/). - When building into a Pages repo, the build also ensures a minimal
DIST_DIR/.gitignore(currently ignores.DS_Store).
Before publishing, check that all configured dataset download URLs are reachable without downloading or loading the dataset files:
python3 scripts/maintenance/check_dataset_downloads.pyThe default checks all datasets. Useful variants:
# Check only selected datasets
python3 scripts/maintenance/check_dataset_downloads.py --only pokemon-moves zoo
# Print every checked URL and result
python3 scripts/maintenance/check_dataset_downloads.py --verbose
# Check every configured version entry
python3 scripts/maintenance/check_dataset_downloads.py --all-versionsThe dataset host's TLS certificate verifies normally. If the check fails with
certificate errors, --insecure disables verification as a temporary workaround,
but the same errors will also affect users downloading from the site.
Datasets are versioned (MAJOR.MINOR.PATCH). Each release lives in its own
immutable folder on the download server, and the plain <name>/<name>.*.gz path
always serves the latest release. Use scripts/release_dataset.py to freeze,
release, and verify versions, and scripts/upload_datasets.sh to upload. See
HOWTO.md, "Dataset versions", for the full workflow.
This backend repository publishes the generated site to the public GitHub Pages repository HGX-Team/hypergraphx-data.
The Pages repository is generated output, while this backend repository is the
source of truth. The Pages repository receives the built static files plus the
public reproducibility/ directory.
First clone the Pages repository next to this backend repository:
git clone git@github.com:HGX-Team/hypergraphx-data.git ../hypergraphx-dataBefore deploying, make sure this backend checkout contains exactly the changes
you want to publish. deploy_pages.sh checks whether the Pages checkout is
dirty, but it builds from the current backend working tree.
Then deploy:
scripts/deploy_pages.sh --pushUseful options:
# Copy/build into the Pages repo but do not commit
scripts/deploy_pages.sh --no-commit
# Use a non-default local checkout path
scripts/deploy_pages.sh --pages-dir ../hypergraphx-data
# Commit with a custom message
scripts/deploy_pages.sh --message "Update dataset website" --pushOptional local preview:
cd ../hypergraphx-data
python3 -m http.server 8000