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.
Metadata
Release files for gsrd 0.2.0
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 | |
|---|---|---|---|---|
| gsrd-0.2.0.tar.gz | 310.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gsrd-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 322.2 kB
Release files / gsrd-0.2.0.tar.gz
| Download URL | gsrd-0.2.0.tar.gz |
|---|---|
| Size | 310.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e09d2133de0e7871eb3e1411c98b31777b659026f732a290194b72a85c67c641
|
|
BLAKE2b-256 checksum How to use checksums |
a6bb462757a2c6a3a999be175689d865a15389ad4fb835064e384fb06ea4a532
|
| 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 Aug 27, 2026.
Transparency logRelease files / gsrd-0.2.0-py3-none-any.whl
| Download URL | gsrd-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e7a81488916429115139835b9d2cf876c3d6eed3a47514d06a61892aaf38a36
|
|
BLAKE2b-256 checksum How to use checksums |
c84554ec68304c93dc626b2dd03101f08a2b9fd56699649b01af75e107841fd9
|
| 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 Aug 27, 2026.
Transparency logSecurity for gsrd 0.2.0
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 gsrd-0.2.0.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 Aug 27, 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.