gsrd
A small Gray-Scott reaction-diffusion simulator, packaged as a single CLI command:
gsrd input.yaml
It reads a YAML parameter file, runs a 2D reaction-diffusion integration, and writes the final fields to results.npz in the current directory.
Purpose
gsrd is built as the running example for a workflow-engine tutorial.
Its interface is deliberately designed to emulate the conventions and quirks of real-world scientific codes — the kind of legacy tooling that workflow managers typically wrap.
This makes it a realistic teaching target: many of the integration issues users encounter when wrapping established scientific software can be demonstrated here in a small, self-contained Python package.
Design choices
| Aspect | Behaviour | Mirrors |
|---|---|---|
| Invocation | Single positional argument, no flags, no --help |
Minimal-CLI binaries from the Fortran era |
| Output location | Hardcoded ./results.npz in the working directory |
Codes that write fixed-name files |
| Stdout | Verbose startup banner, citation block, progress lines, formatted diagnostics | Standard scientific-code log output |
| Scalar results | Printed to stdout only (variance_V, mean_V); not stored in the output file |
Codes whose key numbers must be parsed from the log |
| Array results | Written to results.npz (U_final, V_final) |
Binary outputs alongside textual logs |
| Parameter echo | Required keys printed; extra YAML keys silently retained in the output's params record |
Tolerant input parsers with no schema enforcement |
| Restart mechanism | If init/U_init.npy and init/V_init.npy exist in the working directory, they are used as initial fields |
Codes that pick up restart files from the run directory |
| Error reporting | Short stderr message (ERR: ...); exit code is always 0; success is signalled by a JOB DONE marker on stdout |
Codes whose exit codes are not reliably informative |
| No-arguments behaviour | Prints the banner and waits on stdin | "Waiting for input" pattern of interactive scientific binaries |
These are intentional design choices for pedagogical value, not bugs. The point is to give users a realistic surface to practise wrapping: parsing log output, handling fixed-name files, providing restart inputs, dealing with uninformative exit codes, and validating input schemas at the workflow layer rather than relying on the code itself.
Input format
A YAML file with the following keys:
F: 0.04 # feed rate
k: 0.065 # kill rate
du: 0.16 # diffusion coefficient of U
dv: 0.08 # diffusion coefficient of V
dt: 1.0 # time step
grid_size: 64 # grid is grid_size x grid_size
n_steps: 3000 # number of integration steps
seed: 42 # (optional) RNG seed
Output
On success, results.npz contains:
U_final,V_final— final concentration fields, shape(grid_size, grid_size)params— the parameters as a JSON-serialised string
Scalar diagnostics (variance_V, mean_V) appear on stdout in the Diagnostics block; they are not written to the output file.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gsrd-0.2.0.tar.gz.
File metadata
- Download URL: gsrd-0.2.0.tar.gz
- Upload date:
- Size: 310.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e09d2133de0e7871eb3e1411c98b31777b659026f732a290194b72a85c67c641
|
|
| MD5 |
c2163936219a1e7f740983fc0b27fb81
|
|
| BLAKE2b-256 |
a6bb462757a2c6a3a999be175689d865a15389ad4fb835064e384fb06ea4a532
|
Provenance
The following attestation bundles were made for gsrd-0.2.0.tar.gz:
Publisher:
cd.yaml on aiidateam/gsrd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gsrd-0.2.0.tar.gz -
Subject digest:
e09d2133de0e7871eb3e1411c98b31777b659026f732a290194b72a85c67c641 - Sigstore transparency entry: 2617639649
- Sigstore integration time:
-
Permalink:
aiidateam/gsrd@4215d396eafd8971083ca934a5d232409fa5f434 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/aiidateam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@4215d396eafd8971083ca934a5d232409fa5f434 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gsrd-0.2.0-py3-none-any.whl.
File metadata
- Download URL: gsrd-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e7a81488916429115139835b9d2cf876c3d6eed3a47514d06a61892aaf38a36
|
|
| MD5 |
8a818aa6ce0d9a22cbff0ba84d8bdd24
|
|
| BLAKE2b-256 |
c84554ec68304c93dc626b2dd03101f08a2b9fd56699649b01af75e107841fd9
|
Provenance
The following attestation bundles were made for gsrd-0.2.0-py3-none-any.whl:
Publisher:
cd.yaml on aiidateam/gsrd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gsrd-0.2.0-py3-none-any.whl -
Subject digest:
3e7a81488916429115139835b9d2cf876c3d6eed3a47514d06a61892aaf38a36 - Sigstore transparency entry: 2617639662
- Sigstore integration time:
-
Permalink:
aiidateam/gsrd@4215d396eafd8971083ca934a5d232409fa5f434 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/aiidateam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@4215d396eafd8971083ca934a5d232409fa5f434 -
Trigger Event:
push
-
Statement type: