This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
PDS Roundup Action is a GitHub Action that performs continuous integration and delivery ("roundup") for NASA Planetary Data System (PDS) software projects. It supports three build contexts: Python, Maven (Java), and Node.js. The action runs inside a Docker container based on Alpine Linux with pre-installed tools.
The roundup uses a context pattern to detect and handle different project types:
-
Context Detection (
context.py): Automatically detects project type by looking for marker files:- Python:
setup.cfgorsetup.py - Maven:
pom.xmlorproject.xml - Node.js:
package.jsonorpackage-lock.json
- Python:
-
Context Factory (
util.py:contextFactories()): Returns the appropriate context class based on detected files
An Assembly (assembly.py) defines which steps to execute and whether it's a stable or unstable release:
stable— Production release (non-SNAPSHOT for Maven, production PyPI, version without suffix for npm)unstable— Development release (SNAPSHOT for Maven, test.pypi.org,-unstablesuffix for npm)integration— Like unstable but omits requirements and changelog generationnoop— Does nothing (used for testing)env— Steps defined by environment variablesROUNDUP_STABLEandROUNDUP_STEPS
Each assembly executes a predefined sequence of Steps.
Steps (step.py) are individual operations in the roundup pipeline. Standard PDS steps:
preparation— Set up environment (create venv, install deps, configure credentials)unitTest— Run unit testsintegrationTest— Run integration tests (mostly TBD)docs— Generate documentationversionBump— Update version numbers fromrelease/X.Y.Ztagbuild— Build artifacts (wheel, jar, npm package)artifactPublication— Publish to PyPI/OSSRH/npmjs.comrequirements— Generate PDS requirements filechangeLog— Generate changelog usinggithub_changelog_generatorgithubRelease— Create GitHub release and tagsdocPublication— Upload docs as release asset and to gh-pages (stable only)versionCommit— Commit the bumped versioncleanup— Bump to next dev version, delete release tag
Each context (Python/Maven/Node.js) implements context-specific versions of these steps.
-
Python Context (
_python.py):- Uses venv with system-site-packages
- Runs tests via tox or
setup.py test - Builds wheels with
bdist_wheel - Uses twine for PyPI uploads
- Version stored in
VERSION.txt
-
Maven Context (
_maven.py):- Creates Maven
settings.xmlwith OSSRH credentials - Imports GPG key for code signing
- Executes configurable Maven phases (test, build, deploy, etc.)
- Version stored in
pom.xmlfiles
- Creates Maven
-
Node.js Context (
_nodejs.py):- Creates
.npmrcwith authentication token - Version stored in
package.json - Uses npm for building and publishing
- Handles
-unstablesuffix for development releases
- Creates
Build and test the Docker image locally:
# Build the image
docker image build --tag pds-roundup:latest .
# Interactive shell for exploration
docker container run --interactive --tty --rm --name roundup \
--volume ${PWD}:/mnt --entrypoint /bin/sh pds-roundup:latest
# Run as GitHub Actions does (requires many environment variables)
# See README.md "Development" section for full example# Create and activate venv
python3 -m venv venv
venv/bin/pip install --quiet --upgrade setuptools wheel pip
venv/bin/pip install --editable .
# Add to PATH and use support script
export PATH="${PWD}/venv/bin:${PATH}"
cd /path/to/test-project
../roundup-action/support/run-roundup.sh unstableThe project structure suggests tests would be in a test directory (excluded in setup.cfg), but specific test commands are not documented. If tests exist:
pip install --editable .[dev]
pytest # or tox if configuredFor stable releases:
- User creates
release/X.Y.Ztag versionBumpstep extracts X.Y.Z from tag and writes to version fileversionCommitstep commits the version filegithubReleasecreatesvX.Y.Ztag at HEADcleanupbumps minor version (X.(Y+1).0) for next dev cycle
- Release tags:
release/X.Y.Z(trigger stable builds) - Version tags:
vX.Y.Z(created by roundup) - Dev/SNAPSHOT tags: Pruned before releases
- Release tags deleted after cleanup
- Stable builds fail hard on errors
- Unstable builds are more tolerant (e.g., duplicate PyPI uploads ignored)
- Each step can implement its own error handling
Required for operation (depending on context):
ADMIN_GITHUB_TOKEN— GitHub token with repo accessGITHUB_REPOSITORY— Owner/repo nameCODE_SIGNING_KEY— Base64-encoded GPG private key (Maven)pypi_username,pypi_password— PyPI credentials (Python)ossrh_username,ossrh_password— OSSRH credentials (Maven)NPMJS_COM_TOKEN— npm token with @nasapds scope access (Node.js)
Configurable via workflow with parameters:
assembly— Type of roundup (stable/unstable/integration/noop/env)packages— Comma-separated Alpine packages to installmaven-*-phases— Maven phases for different operationsdocumentation-dir— Override default doc directory
Fixed versions in setup.cfg that must match nasapds/github-actions-base:
- github3.py, lxml, packaging, requests, sphinx, twine, wheel
- External tools:
maven-release,python-release,nodejs-release,requirement-report,github_changelog_generator
The roundup makes commits and pushes to origin main:
- Uses
pdsen-ci@jpl.nasa.gov/PDSEN CI Botfor commits - Commits: version files, changelogs, requirements
- Always uses
--forcefor push toHEAD:main(to handle detached HEAD in Actions) - Configures
/github/workspaceas safe directory for git 2.36+