cd agent
cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo testTry the frame location on a trajectory (offsets, steps and times of the last frames; nothing is decoded):
cargo run --release -- inspect --xtc traj.xtc -n 10The agent never decodes frames, so it has no XTC decoder. molly is only a dev-dependency: its writer makes the test fixtures (real compressed frames), and its reader is the reference the tests compare against.
Extract the last frames by hand (on the compute node, or over SSH):
xtcscope-agent extract --xtc traj.xtc -n 10 > last.xtc
ssh <node> '$HOME/xtcscope/xtcscope-agent extract --xtc /scratch/.../traj.xtc -n 10' > last.xtc
vmd conf.gro last.xtcextract writes the XTC data to stdout and JSON events (located, warnings, done, errors) to stderr.
A static binary for the nodes, as the release builds it:
rustup target add x86_64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-muslEverything runs from python/. The tests need neither qq nor a cluster: the job lookup is replaced by a stub, and fake ssh, agent and viewer programs are put on PATH. Tests that run xtcscope _backend in a subprocess put tests/stubs on PYTHONPATH, where a small stand-in for qq_lib serves the job described in $FAKE_QQ_JOB. --dry-run against a real job needs both.
The backend commands can be tried by hand on a machine with qq (--run is any 8 hex characters):
xtcscope _backend inspect --protocol 1 --run abcd1234 <job_id>
xtcscope _backend close --protocol 1 --run abcd1234 --node <node>The remote tests (tests/test_remote.py) fake a second host: the fake ssh gives each destination its own $HOME ($FAKE_HOSTS), where a small script runs this checkout's xtcscope with the qq stand-in.
cd python
uv run ruff check .
uv run ruff format --check .
uv run ty check
uv run pytest
uv run xtcscope --help # or: uv run python -m xtcscope --helpThe bundle, as CI and the release build it (in the quay.io/pypa/manylinux_2_28_x86_64 container there):
python/build-bundle.sh # result in python/dist/xtcscope/It uses a uv-managed Python, so a local build has the same glibc floor as a release. It fails if anything in the bundle needs a glibc newer than 2.28, if --version is wrong, or if the frozen build cannot import qq.
install/xtcscope-install.sh <home> <release_url> installs one release into one home. Each cluster has a wrapper (xtcscope-<cluster>-install.sh) that downloads it and runs it for every home of that cluster. The wrappers are identical except for their description, their NAME and the block between # >>> target homes and # <<< target homes; the tests check this, so change all of them together. A new cluster is a copy of the desktop wrapper with its own name and homes.
shellcheck install/*.sh install/tests/*.sh python/build-bundle.sh
bash install/tests/run.shFor tests, XTCSCOPE_RELEASE_BASE points a wrapper at a local release directory and XTCSCOPE_TARGET_HOMES (space-separated) replaces its homes.
- Set the same version in
agent/Cargo.tomland inpython/src/xtcscope/__init__.py(e.g.0.2.0, or0.2.0-alpha.1for a pre-release). Runcargo buildinagent/anduv lockinpython/to update the lock files, move the CHANGELOG's "Unreleased" entries under the new version, commit and push. - On GitHub, draft a new release with a new tag
v<version>on that commit, and publish it.
Publishing triggers the release workflow. It fails unless the tag matches both versions. It builds a static x86_64-unknown-linux-musl agent and the PyInstaller bundle (with build-bundle.sh, in the manylinux container) in parallel, puts both into the tarball, fills the version and repository into the installers, smoke-tests the installer, and attaches the tarball, every installer and sha256sums.txt to the release. Re-running the workflow replaces the attached files.