|
1 | 1 | # CANARY |
2 | 2 |
|
3 | | -`canary` is a python package providing an application testing framework designed to test scientific applications. |
| 3 | +`canary` is a Python package for defining, scheduling, and executing jobs across a wide range of computing environments, from developer laptops to large-scale HPC systems. |
4 | 4 |
|
5 | 5 | - **Documentation:** https://canary-wm.readthedocs.io/en/production/ |
6 | 6 |
|
7 | | - `canary` is inspired by [vvtest](https://github.com/sandialabs/vvtest) and designed to run tests on diverse hardware from laptops to super computing clusters. `canary` not only validates the functionality of your application but can also serve as a workflow manager for analysts. A "test" is an executable script with extension `.pyt` or `.vvt`. If the exit code upon executing the script is `0`, the test is considered to have passed, otherwise a non-passing status will be assigned. `canary`'s methodology is simple: given a path on the filesystem, `canary` recursively searches for test scripts, sets up the tests described in each script, executes them, and reports the results. |
8 | 7 |
|
9 | | -`canary` offers several advantages over similar testing tools: |
| 8 | +Originally developed for application testing, `canary` has evolved into a general-purpose workflow execution framework. Today it is used to automate software testing, manage analysis workflows, execute computational pipelines, and coordinate collections of dependent jobs. |
10 | 9 |
|
11 | | -**Speed**: Hierarchical parallelism is used to run tests asynchronously, optimizing resource utilization and speeding up the testing process. |
12 | 10 |
|
13 | | -**Python**: Test files are written in [Python](python.org), giving developers access to the full Python ecosystem. |
| 11 | +`canary` is inspired by `vvtest` and retains its strengths in scalable test execution while providing a flexible foundation for broader workflow automation. Built on `pluggy`, `canary` uses a plugin-based architecture for job discovery and execution. Common plugins support Python-based job definitions in `.pyt` and `.vvt` files, while others provide integration with frameworks such as CMake/CTest. Given one or more filesystem paths, `canary` recursively discovers job definitions, constructs the execution graph, schedules work according to available resources and dependencies, executes jobs, and reports results. |
14 | 12 |
|
15 | | -**Integration**: `canary` integrates with popular developer tools like [CMake](cmake.org), [CDash](cdash.org) and [GitLab](gitlab.com), streamlining the testing and continuous integration (CI) processes. |
16 | 13 |
|
17 | | -**Extensibility**: `canary` can be extended through user plugins, allowing developers to customize their test sessions according to their specific needs. |
| 14 | +Testing remains a primary use case, but it is no longer the defining purpose of the project. A `canary` job may represent a software test, simulation, data-processing stage, analysis task, validation check, or any other executable unit of work. |
| 15 | + |
| 16 | + |
| 17 | +`canary` offers several advantages: |
| 18 | + |
| 19 | + |
| 20 | +**Scalable Execution**: Hierarchical parallelism enables efficient utilization of available resources, allowing large collections of jobs to execute concurrently across diverse hardware platforms. |
| 21 | + |
| 22 | + |
| 23 | +**Workflow and Testing**: The same framework supports both automated software testing and general workflow orchestration, reducing the need for separate tools. |
| 24 | + |
| 25 | + |
| 26 | +**Python-Based Definitions**: Python-based plugins provide access to the full Python ecosystem while enabling concise and expressive workflow descriptions. |
| 27 | + |
| 28 | + |
| 29 | +**Integration**: `canary` integrates with common development and automation tools such as CMake, CDash, and GitLab, simplifying testing and continuous integration workflows. |
| 30 | + |
| 31 | + |
| 32 | +**Extensibility**: A plugin architecture allows users to customize discovery, scheduling, execution, reporting, job-definition formats, and other aspects of a `canary` session. |
| 33 | + |
18 | 34 |
|
19 | 35 | ## Requirements |
20 | 36 |
|
21 | 37 | Python 3.10+ |
22 | 38 |
|
| 39 | + |
23 | 40 | ## Install |
24 | 41 |
|
25 | | -`canary` is distributed as a python library and is most easily installed via `pip` (or other compatible tool): |
| 42 | +`canary` is distributed as a Python package and is most easily installed using `pip` (or another compatible package manager). |
| 43 | + |
26 | 44 |
|
27 | | -To install the latest production version, execute: |
| 45 | +To install the latest production release: |
28 | 46 |
|
29 | 47 | ```console |
30 | 48 | python3 -m pip install canary-wm |
31 | 49 | ``` |
32 | 50 |
|
33 | | -To install the latest development version, execute: |
| 51 | + |
| 52 | +To install the latest development version: |
34 | 53 |
|
35 | 54 | ```console |
36 | 55 | python3 -m pip install "canary-wm@git+ssh://git@github.com/sandialabs/canary" |
37 | 56 | ``` |
38 | 57 |
|
39 | | -> **NOTE:** Installing from the main development branch depends on floating git refs to one or more dependencies. For stable installs, install a published release. |
| 58 | + |
| 59 | +> **NOTE:** Installing from the main development branch may depend on floating git references in one or more dependencies. For stable installations, use a published release. |
40 | 60 |
|
41 | 61 |
|
42 | 62 | ## Developers |
43 | 63 |
|
44 | | -For developers wanting to make modifications and/or contributions to `canary`, install in editable mode: |
| 64 | +For developers wishing to modify or contribute to `canary`, install in editable mode: |
45 | 65 |
|
46 | 66 | ```console |
47 | 67 | python3 -m pip install -e git+https://github.com/sandialabs/canary#egg=canary-wm[dev] |
48 | 68 | ``` |
49 | 69 |
|
50 | | -which will leave a copy of `canary` in your Python distribution's `$prefix/src` directory. Edits made to the source will be immediately visible by the Python interpreter. Alternatively, the source can be cloned and then installed in editable mode: |
| 70 | + |
| 71 | +This places a working copy of the source in your Python distribution's `$prefix/src` directory, allowing changes to become immediately visible to the interpreter. |
| 72 | + |
| 73 | + |
| 74 | +Alternatively: |
51 | 75 |
|
52 | 76 | ```console |
53 | 77 | git clone git@github.com:sandialabs/canary |
54 | 78 | cd canary |
55 | 79 | python3 -m pip install --editable .[dev] |
56 | 80 | ``` |
57 | 81 |
|
58 | | -To format code and run `canary`'s internal tests, execute |
| 82 | + |
| 83 | +To format code and run `canary`'s internal test suite: |
59 | 84 |
|
60 | 85 | ```console |
61 | 86 | canary check |
62 | 87 | ``` |
63 | 88 |
|
| 89 | + |
64 | 90 | ## License |
65 | 91 |
|
66 | | -Canary is distributed under the terms of the MIT license, see [LICENSE](https://github.com/sandialabs/canary/blob/main/LICENSE) and [COPYRIGHT](https://github.com/sandialabs/canary/blob/main/COPYRIGHT). |
| 92 | +Canary is distributed under the terms of the MIT license. See `LICENSE` and `COPYRIGHT` for details. |
| 93 | + |
67 | 94 |
|
68 | 95 | SPDX-License-Identifier: MIT |
69 | 96 |
|
70 | | -SCR#:3170.0 |
| 97 | + |
| 98 | +SCR#:3170.0 |
0 commit comments