Library for input/output of transition systems in a unified Markov binary (UMB) format.
Project description
umbi
Library for input/output of transition systems in a unified Markov binary (UMB) format. See the format specification for details.
Installation:
(optional) create and activate a python environment:
python -m venv .venv
source .venv/bin/activate
Install umbi via
pip install umbi
Quick start
Read a umbfile into an ExplicitAts object, modify initial states, and write it back:
import umbi
ats : ExplicitAts = umbi.ats.read("in.umb")
ats.set_initial_states([ats.num_states - 1])
umbi.ats.write(ats, "out.umb")
More examples can be found in the ./examples folder.
API
umbi offers three levels of abstraction for working with UMB files:
TarFile and TarCoder - Low-level access to tarfile contents.
ExplicitUmb - In-memory representation of a typical umbfile. Attributes are standard Python objects (lists, dicts, dataclasses) providing a deserialized view of the file contents.
ExplicitAts - Format-agnostic abstraction for annotated transition systems (states, transitions, annotations). Recommended for most use cases: easiest to use programmatically and remains stable across UMB format changes.
CLI
umbi provides a basic CLI for umbfile manipulation.
Options:
--import-umb <path>- Import .umb file asExplicitUmb--import-ats <path>- Import .umb file asExplicitAts--export <path>- Export to .umb file (requires--import-umbor--import-ats)--log-level <LEVEL>- Set logging level:DEBUG,INFO(default),WARNING,ERROR,CRITICAL
Example:
umbi --import-umb input.umb --export output.umb --log-level DEBUG
Development
Setup
Install development dependencies:
pip install .[dev]
Code Quality
Pre-commit hooks automatically run code quality checks before each commit. Configuration: .pre-commit-config.yaml
Set up the hooks with:
pre-commit install
Run hooks manually on all files:
pre-commit run --all-files
Individual tools can be run manually:
Ruff -- Code formatting and linting. Config: pyproject.toml ([tool.ruff])
ruff check . # check for issues
ruff format . # format code
ruff check . --fix # check and fix
Pyright -- Static type checking. Config: pyproject.toml ([tool.pyright])
pyright # check entire project
pyright umbi/ # check specific directory
Lockfiles
Dependencies are pinned in the uv.lock lockfile for reproducible builds. To update the lockfile:
uv lock
Release
New versions are published to PyPI via the release workflow. The workflow is triggered automatically when:
- A new version tag is pushed (format:
v*.*.*) - The bump version workflow completes successfully
Alternatively, the workflow can be triggered manually via GitHub Actions.
The release workflow:
- Updates the uv.lock lockfile to reflect any dependency changes
- Builds the distribution packages
- Publishes to PyPI via trusted publishing
- Updates the stable branch pointer to track the latest release
Project details
Release history Release notifications | RSS feed
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 umbi-0.2.3.tar.gz.
File metadata
- Download URL: umbi-0.2.3.tar.gz
- Upload date:
- Size: 48.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
544d2209d5e0fbd8b7c95640041b6faaf71a32c706433d7c802df25935362f2c
|
|
| MD5 |
301cc6ca208ac559857edf177673c0ba
|
|
| BLAKE2b-256 |
28f7c8e10c84b59c0263914b0f6bf63ebe30febfbc70ed24d964e51db12d1019
|
Provenance
The following attestation bundles were made for umbi-0.2.3.tar.gz:
Publisher:
release.yml on pmc-tools/umbi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
umbi-0.2.3.tar.gz -
Subject digest:
544d2209d5e0fbd8b7c95640041b6faaf71a32c706433d7c802df25935362f2c - Sigstore transparency entry: 1154569008
- Sigstore integration time:
-
Permalink:
pmc-tools/umbi@0717fe7db224d381c6638e86dee6e16a96d2a453 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pmc-tools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0717fe7db224d381c6638e86dee6e16a96d2a453 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file umbi-0.2.3-py3-none-any.whl.
File metadata
- Download URL: umbi-0.2.3-py3-none-any.whl
- Upload date:
- Size: 62.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ed320108124621b962f5fb9ed67d0fa20589894bf242c6fbafa7582aa4ddac7
|
|
| MD5 |
ff4e98bc9af29cfc1d424a3af348ec48
|
|
| BLAKE2b-256 |
81560b0ba3fbd23ceb0790114c198c6526d33e744ab41efccd42f229d13a2a28
|
Provenance
The following attestation bundles were made for umbi-0.2.3-py3-none-any.whl:
Publisher:
release.yml on pmc-tools/umbi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
umbi-0.2.3-py3-none-any.whl -
Subject digest:
5ed320108124621b962f5fb9ed67d0fa20589894bf242c6fbafa7582aa4ddac7 - Sigstore transparency entry: 1154569011
- Sigstore integration time:
-
Permalink:
pmc-tools/umbi@0717fe7db224d381c6638e86dee6e16a96d2a453 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pmc-tools
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0717fe7db224d381c6638e86dee6e16a96d2a453 -
Trigger Event:
workflow_run
-
Statement type: