canary
canary is an application testing framework and workflow engine for scientific
software. It finds your tests, figures out how they depend on each other and
what resources they need, then runs them as fast as your hardware allows and
tells you what happened. The same machinery scales from a quick run on a laptop
to thousands of jobs spread across an HPC allocation.
- Documentation: https://canary-wm.readthedocs.io
- Source: https://github.com/sandialabs/canary
python3 -m pip install canary-wm
canary run ./tests
Heritage
canary grows out of vvtest, the test
harness that Sandia teams have relied on for years to test large scientific
codes. vvtest proved out the ideas that matter most: tests are ordinary
scripts, a passing test is one that exits 0, and a test harness has to
understand real HPC resources instead of pretending every machine is a single
box.
canary keeps those ideas and rebuilds around them. It reads vvtest's .vvt
files directly, so existing test suites keep working, and it adds a native
Python test format (.pyt), a plugin system, a persistent results database,
and first class support for batch schedulers. If you are coming from vvtest, the
mental model is the same and your tests come along with you.
What it does
Point canary at a directory and it will:
- Discover test and job definitions by walking the filesystem.
- Generate concrete jobs from those definitions, expanding parameterized tests into the full set of cases.
- Resolve dependencies into an execution graph and match each job against the resources it asks for (CPUs, GPUs, nodes).
- Schedule and run the graph with hierarchical parallelism, so independent work runs concurrently and dependent work waits only for what it needs.
- Record everything to a queryable results database and render reports.
A "job" does not have to be a test. It can be a simulation, an analysis step, a data-processing stage, or any other executable unit of work, which is why the same tool that runs a test suite can also drive an analysis pipeline.
Why people use it
It understands HPC. canary models CPUs, GPUs, and nodes as real resources
and packs work onto them accordingly. It can run directly, or submit and manage
batches through Slurm, Flux, and PBS, or fan work out across a distributed pool
of machines.
Tests are just Python. A .pyt test is a small Python script with a few
directives. You get the entire Python ecosystem for setup, checking, and
analysis, and there is no bespoke DSL to learn.
import canary_pyt
canary_pyt.directives.keywords("fast", "regression")
canary_pyt.directives.parameterize("cpus", [1, 2, 4])
def test():
# your check here; return nonzero to fail
return 0
Results stick around and answer questions. Every run is written to a persistent workspace and database. You can ask things like "what failed in the last session," "which jobs ran longer than a minute," or run SQL directly:
canary status
canary query jobs --where status.category==FAIL
canary query session latest --expand-jobs --watch
It fits your toolchain. Built-in integrations cover CMake/CTest, CDash, and
GitLab CI, so canary slots into existing build and continuous-integration
setups instead of replacing them.
It is extensible. canary is built on pluggy.
Discovery, generation, scheduling, execution, reporting, and even the
job-definition format are all plugin points. The bundled schedulers and
integrations are themselves plugins and double as worked examples.
A quick tour
canary run ./tests # discover and run everything under ./tests
canary run -k fast ./tests # only tests tagged "fast"
canary status # summarize the most recent run
canary log <job-id> # show a job's output
canary run -b scheduler=slurm ./tests # submit as Slurm batches
canary fetch examples && canary run ./examples # grab the bundled examples
See the user's guide for the full command reference, the directive catalog, resource configuration, and the plugin API.
Requirements
Python 3.10 or newer.
Install
Latest release from PyPI:
python3 -m pip install canary-wm
Latest development version from git:
python3 -m pip install "canary-wm@git+https://github.com/sandialabs/canary"
Note that the development branch may depend on unreleased versions of its own dependencies. For reproducible installs, use a published release.
Developing
Install in editable mode with the development extras:
git clone git@github.com:sandialabs/canary
cd canary
python3 -m pip install --editable .[dev]
Before committing, run the internal checks:
canary pre-commit
canary pre-commit adds any missing license headers, formats and lints the tree,
type-checks, runs bandit, runs the test suite, and, if everything passes,
stamps pyproject.toml with today's date-based version (YY.M.D).
Cutting a release
main always depends on hpc-connect from git, because canary and
hpc-connect are developed together. A PyPI release instead pins a published
hpc-connect version. bin/release prepares a release without touching main:
bin/release --hpc-connect 26.9.11
It creates a throwaway releases/<date> branch, stamps the date-based version,
pins hpc-connect==<version>, then validates by running the tests, building the
wheel, installing it into a fresh virtual environment, and running the fetched
examples. On success it commits on the branch and tags release/<date>, leaving
main untouched. Review, then publish:
git push origin releases/<date> release/<date>
Pushing the release/* tag triggers the GitHub workflow that uploads to PyPI.
License
canary is distributed under the terms of the MIT license. See LICENSE and
COPYRIGHT for details.
SPDX-License-Identifier: MIT
SCR#:3170.0
Metadata
Release files for canary-wm 26.10.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| canary_wm-26.10.15.tar.gz | 2.9 MB | With provenance | Details for canary_wm-26.10.15.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| canary_wm-26.10.15-py3-none-any.whl | Python 3 | none | any | Details for canary_wm-26.10.15-py3-none-any.whl |
Total release size: 6.0 MB
Release files / canary_wm-26.10.15.tar.gz
| Download URL | canary_wm-26.10.15.tar.gz |
|---|---|
| Size | 2.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b4fff90f8940eac88ab8782b5907cb0ed204cfb3e42cfa3ec2f2272523262c2
|
|
BLAKE2b-256 checksum How to use checksums |
0d2ea2581fd208595b694e75adafd3192393a3401eabe497259deb2f4c02e435
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / canary_wm-26.10.15-py3-none-any.whl
| Download URL | canary_wm-26.10.15-py3-none-any.whl |
|---|---|
| Size | 3.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d03864c889ff47617b9e9fc4a0b3492a46b3d20dd49c4a67cca592d807dbfb3f
|
|
BLAKE2b-256 checksum How to use checksums |
9861cbdddfd9ef3f33e89236c6c5382a5eebf195444f2bd5cbaf1a771e58f1a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logSecurity for canary-wm 26.10.15
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for canary_wm-26.10.15.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.