Python Interface for GUNDAM
User friendly Python interface for GUNDAM.
The package is published as gundam-interface and imported as gundam_interface.
Installation
pip install gundam-interface
For upgrading:
pip install --upgrade gundam-interface
For local development:
python -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
python -m pip install -e ".[dev]"
Usage
import gundam_interface
print(gundam_interface.__version__)
Modify event variables and rebin
Enable dynamic binning on the desired samples after configure() and before
initialize(). GUNDAM then retains events outside the histogram and stores the
variables needed to assign bins.
interface.configure()
model = interface.getModel()
sample = model.getSampleSet().getSampleList()[0]
sample.setUseDynamicBinning(True)
interface.initialize()
event = sample.getEventList()[0]
variables = event.getVariables()
variables["X"] = 1.2 # Access by variable name or integer index.
model.updateEventSampleBinning() # Reuses the propagator's thread pool.
llh = interface.evaluateLlh() # Refills histograms and evaluates the likelihood.
Assignments preserve the stored C++ numeric type and refresh its cached value.
Assign integers to integer variables. Rebinning is explicit and updates only
samples with dynamic binning enabled. Events outside all bins keep index -1
and remain available for later migrations. sample.getNbBinnedEvents() returns
the number currently assigned to a bin.
sample.updateEventSampleBinning() updates a single sample. Use the propagator method
for repeated updates to reuse its thread pool. evaluateLlh() refills the model
histograms. Event-to-dial associations remain unchanged by these operations.
These methods require GUNDAM bindings exposing VariableHolder.setValue(),
Sample.setUseDynamicBinning(), and updateEventSampleBinning() on samples and propagators.
Build
python -m build
python -m twine check dist/*
Publish a new PyPI version
Publishing is handled by the GitHub Actions workflow
.github/workflows/publish.yml.
Before the first release, configure PyPI Trusted Publishing for this project:
- PyPI project name:
gundam-interface - Owner/repository: this GitHub repository
- Workflow name:
publish.yml - Environment name:
pypi
To publish a release:
- Make sure the
mainbranch is ready and CI is passing. - Create a new GitHub Release with a semantic tag such as
v0.2.1. - Publishing starts automatically when the release is published.
- The workflow derives the package version from the tag, updates
pyproject.toml, commits that version bump tomain, builds the package, and uploads it to PyPI.
The workflow can also be started manually from the GitHub Actions page with a
version input such as 0.2.1.
License
This project is distributed under the GNU Lesser General Public License v2.1 or later. See LICENCE for details.
Metadata
Release files for gundam-interface 0.12.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 | Actions |
|---|---|---|---|---|
| gundam_interface-0.12.0.tar.gz | 36.2 kB | With provenance | Details for gundam_interface-0.12.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gundam_interface-0.12.0-py3-none-any.whl | Python 3 | none | any | Details for gundam_interface-0.12.0-py3-none-any.whl |
Total release size: 67.5 kB
Release files / gundam_interface-0.12.0.tar.gz
| Download URL | gundam_interface-0.12.0.tar.gz |
|---|---|
| Size | 36.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b2152e6570512d3deec16ebca19f0dc13080650854e05c565583a4fef7d8b0a
|
|
BLAKE2b-256 checksum How to use checksums |
aadc24f63dd92c88665052dd1fbcaa669a6a192df9bf5259b6f62a0fc9699559
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / gundam_interface-0.12.0-py3-none-any.whl
| Download URL | gundam_interface-0.12.0-py3-none-any.whl |
|---|---|
| Size | 31.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74c22fdcc0c1aaa9ac9aad46d2bec04cc62eb4c45ada0423461305122ee4ae6c
|
|
BLAKE2b-256 checksum How to use checksums |
b5865723456f321f726887e56f7635de48c6bc7d2ffc0220e7f4cf0a68727425
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logSecurity for gundam-interface 0.12.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
Both files in this release have been uploaded with provenance metadata.
Attestation for gundam_interface-0.12.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 Nov 7, 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.