Skip to main content

opengate-gate-macro-fold

CI Version Standard Python Standard Python Standard Python Standard Python license Ruff Checked with mypy uv

opengate-gate-macro-fold is a utility for managing GATE 9 simulation macro files. It supports:

  • Folding: combining a directory of macro files into a single mono macro file.
  • Unfolding: splitting a mono macro file into a directory of macro files.

This workflow is practical when switching between batch execution environments (for example, clusters) and local or interactive simulation workflows.

Quick Start

Install From PyPI

pip3 install opengate-gate-macro-fold

Install From Source

make init
make install

Fold A Macro Set Into A Mono Macro

opengate-gate-macro-fold \
  --fold \
  --input-macros-dir=path/to/macros/directory \
  --output-dir=path/to/output/directory \
  [--title="my-mono-macro.mac"]

Unfold A Mono Macro Into A Macro Set

opengate-gate-macro-fold \
  --unfold \
  --input-mono-macro-file=path/to/mono/macro.mac \
  --output-dir=path/to/output/directory

Command-Line Options

  • --fold: enable fold mode (macro set -> mono macro).
  • --unfold: enable unfold mode (mono macro -> macro set).
  • --input-macros-dir: source directory used in fold mode.
  • --input-mono-macro-file: source mono macro file used in unfold mode.
  • --output-dir: destination directory for generated output.
  • --title: optional title metadata for mono macro output.

Development

Common development commands:

make lint
make format
make typecheck
make test
make check

Pre-commit setup

You can install and activate pre-commit in two supported ways.

Option A (recommended): use uv in this repository

uv add --dev pre-commit
uv sync
uv run pre-commit install --hook-type pre-commit

Optional one-time verification on all files:

uv run pre-commit run --all-files

Option B: install pre-commit from Debian packages

sudo apt update
sudo apt install -y pre-commit
pre-commit --version
pre-commit install --hook-type pre-commit

Optional one-time verification on all files:

pre-commit run --all-files

The configured hook runs make check before each commit and blocks the commit if validation fails.

Project conventions and contribution standards:

License

MIT License

Contact: GitHub

Author

The project was designed and implemented by Mateusz Jakub Bała.

Contact: GitHub

Contribution

To contribute new functionality:

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opengate_gate_macro_fold-0.2.0.tar.gz (61.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opengate_gate_macro_fold-0.2.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file opengate_gate_macro_fold-0.2.0.tar.gz.

File metadata

  • Download URL: opengate_gate_macro_fold-0.2.0.tar.gz
  • Upload date:
  • Size: 61.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for opengate_gate_macro_fold-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0d07fb8dde12480102471cc7ee68c08d84751c1b744fdbfbc984b455dbf31bbd
MD5 3d8f630e28fb473ee63dc8eeba917e87
BLAKE2b-256 85c215adf8dc2e273743b36c28608fd9cdd0d6dab88d549ea837e9f5b3c02279

See more details on using hashes here.

Provenance

The following attestation bundles were made for opengate_gate_macro_fold-0.2.0.tar.gz:

Publisher: publish.yml on MateuszBala/opengate-gate-macro-fold

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opengate_gate_macro_fold-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for opengate_gate_macro_fold-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aed9a977a1d7fff0dbe6baec48265bbadfaede8f24a6f094de8023cb861cb718
MD5 09816c9b1193cf4b11c6d4dd64b02e26
BLAKE2b-256 d96c76ff98152800aa27f8d8a234cc4ea3c2964c71e70226954cc1ca3a2866d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for opengate_gate_macro_fold-0.2.0-py3-none-any.whl:

Publisher: publish.yml on MateuszBala/opengate-gate-macro-fold

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.2

2 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