Skip to main content

galform_execution

CI License: MIT

A Python-based utility to manage GALFORM N-body simulation submissions to SLURM on COSMA.

galform_execution automates the generation and submission of SLURM batch scripts for GALFORM runs. It handles environment setup, parameter injection into .input.ref files, and conditional post-processing (NETA, LUM_FUN, etc.), providing a robust and reproducible workflow for large-scale galaxy formation simulations.

Key Features

  • Dynamic Script Generation: Generates self-contained tcsh scripts with resolved simulation and model parameters.
  • Config-Driven: Manage simulations, models, and dust parameters via JSON configurations.
  • SLURM Optimized: Automatic job array support and remapping of high subvolume indices.
  • Robustness: Built-in retries with exponential backoff for transient scheduler errors.

Prerequisites

  • Environment: Access to the COSMA HPC cluster (Durham University).
  • Tooling: uv is recommended for fast installation and dependency management.

Installation

# Install the package and its dependencies directly from PyPI using uv
uv pip install galform_execution

For development installation from source:

git clone https://github.com/OscarHickman/galform_execution.git
cd galform_execution
uv pip install -e .

Quick Start

1. Identify your GALFORM directory

You need a compiled version of GALFORM with the standard directory structure (containing build/galform2, *.input.ref, etc.).

2. Preview a submission (Dry Run)

Check the generated SLURM script without submitting to the queue:

submit-galform-job /path/to/your/galform --nbody-sim Mill2 --model lc16 --iz 40 --nvol 1-64 --dry-run

3. Submit a job array

submit-galform-job /path/to/your/galform --nbody-sim Mill2 --model lc16 --iz 40 --nvol 1-64 --output-folder-name MyProject

Configuration

Configurations are stored in galform_execution/config/:

  • simulations/: JSON files defining N-body simulation parameters (tree paths, cosmology).
  • models.json: Maps model names to base input files and dust profiles.
  • redshift_lists/: Redshift mappings for various simulations.

Development

Running Tests

uv run pytest tests

Linting

uv run ruff check galform_execution

Citing this software

If you use galform_execution in your research, please cite it. GitHub will show a "Cite this repository" button (top-right of the repo page) once CITATION.cff is committed.

After connecting Zenodo (see below), each release gets a permanent DOI. Replace YOUR_ZENODO_DOI with the DOI minted on first release:

@software{hickman_galform_execution,
  author    = {Hickman, Oscar},
  title     = {galform\_execution},
  url       = {https://github.com/OscarHickman/galform_execution},
  doi       = {YOUR_ZENODO_DOI},
  license   = {MIT}
}

Setting up citation infrastructure

Zenodo (DOIs for every release) — already connected: Push a new version tag and the release workflow will create a GitHub Release, which Zenodo archives automatically and mints a DOI. Update CITATION.cff and this README with the DOI badge Zenodo provides.

Conda-forge:

  1. Get the sha256 of the PyPI source tarball:
    curl -s https://pypi.org/pypi/galform_execution/json \
      | python -c "import sys,json; d=json.load(sys.stdin); \
        [print(f['digests']['sha256']) for v in d['releases'].values() \
         for f in v if f['filename'].endswith('.tar.gz')]" | tail -1
    
  2. Paste it into recipe/meta.yaml.
  3. Fork conda-forge/staged-recipes, copy recipe/meta.yaml to recipes/galform_execution/meta.yaml, and open a PR.

License

Distributed under the MIT License. See LICENSE for more information.

Metadata

Release files for galform-execution 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for galform-execution 0.2.4
File Size Uploaded
galform_execution-0.2.4.tar.gz 33.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for galform-execution 0.2.4
File Interpreter ABI Platform
galform_execution-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 63.1 kB

Release files / galform_execution-0.2.4.tar.gz

Download URL galform_execution-0.2.4.tar.gz
Size 33.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4003be94598e4419a7bcc8999b42dc6d904be26519620a39f788d0e533714f31
BLAKE2b-256 checksum
How to use checksums
43821ad66fbb1cc6e87960cd8ff077a0646e5c83ce691345ef13c9e2d01756f8
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 Sep 26, 2026.

Transparency log

Release files / galform_execution-0.2.4-py3-none-any.whl

Download URL galform_execution-0.2.4-py3-none-any.whl
Size 30.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
351b5768a5851ded71b2d640e1e5145b6d933c41a571813e8a1f0749f62c38f9
BLAKE2b-256 checksum
How to use checksums
1a680000a1e02952ca2328f84caf0da5249efd05a4a989f893845d29b262b46b
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 Sep 26, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.0

2 release files

This release

0.2.4 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.7

2 release files

0.1.5

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page