This repository houses the automation and helper scripts for Operations tasks.
This repo also contains operational scripts used by the EN team to fulfill the above requests. See CLAUDE.md for developer setup instructions.
python3 -m venv $HOME/.virtualenvs/pdsen-ops
source $HOME/.virtualenvs/pdsen-ops/bin/activate
pip3 install --requirement requirements.txtRequired environment variables:
GITHUB_TOKEN— GitHub personal access token with repo accessPDSEN_OPS_TOKEN— Used by shell scripts targeting LDD reposEMAIL_PASSWORD— For NSSDCA status email notifications (pds-operator@jpl.nasa.gov)
| Script | Purpose |
|---|---|
bin/ldds/ldd-corral.py |
Generates the PDS4 data dictionaries web page and stages all Discipline LDD releases |
bin/ldds/update-ldd-actions.py |
Propagates GitHub Actions workflows from ldd-template to all Discipline LDD repos |
bin/ldds/prep_for_ldd_release.sh |
Creates release branches in all Discipline LDD repos for a given PDS4 IM version |
bin/repos/repo-corral.py |
Bulk-updates repos in the NASA-PDS org (e.g., propagating template changes) |
bin/pds-stats.py |
Fetches GitHub release download metrics for PDS software tools |
bin/context/check_duplicate_identifiers.py |
Scans a directory of PDS4 context XML files for duplicate logical_identifier values |
bin/portal/pds-sync-api.py |
Downloads ESA PSA product XML files from the PDS search API for harvest |
Autonomously generates the PDS4 data dictionaries web page for each PDS4 Build, and downloads and stages all Discipline LDDs from their GitHub repos.
Configuration — conf/ldds/config.yml maps GitHub repo names to display name/description overrides for the generated web page.
source $HOME/.virtualenvs/pdsen-ops/bin/activate
ldd-corral.py --pds4_version 1.15.0.0 --token $GITHUB_TOKENDefault outputs: web page at /tmp/ldd-release/dd-summary.html, LDD files under /tmp/ldd-release/pds4/.
bin/pds-stats.py --github_repos validate mi-label transform --token $GITHUB_TOKENDownloads ESA PSA product XML files from the PDS search API and generates a harvest config:
bin/portal/pds-sync-api.py --node-name psa --download-path download/Monitors PDS4 package status in NSSDCA, updates GitHub issues with status comments, sends failure notifications to pds-operator@jpl.nasa.gov, and closes issues when all packages are ingested. Reads/writes nssdca_status.csv with columns github_issue_number, identifier, nssdca_status.
Scans PDS4 context XML files for duplicate logical_identifier values:
python3 bin/context/check_duplicate_identifiers.py [path/to/xml/files] [--verbose]Exit code 0 = no duplicates; 1 = duplicates found or error.
pytest test/ -v # run tests
black bin/ # format
flake8 bin/ # lint
mypy bin/context/check_duplicate_identifiers.py # type check