You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Library for input/output of transition systems in a *unified Markov binary (UMB)* format. See the [format specification](https://github.com/pmc-tools/umb/) for details.
(optional) create and activate a python environment:
9
+
Library for input/output of annotated transition systems (ATSs) in a *unified Markov binary (UMB)* format. See the [format specification](https://github.com/pmc-tools/umb/) for details.
8
10
9
-
```bash
10
-
python -m venv .venv
11
-
source .venv/bin/activate
12
-
```
11
+
## Installation:
13
12
14
-
Install `umbi` via
15
13
```bash
16
14
pip install umbi
17
15
```
18
16
19
17
## Quick start
20
18
21
-
Read a umbfile into an `ExplicitAts` object, modify initial states, and write it back:
19
+
A short example where we read a umbfile into an [`ExplicitAts`](umbi/ats/explicit_ats.py) object, modify initial states, and write it back:
22
20
23
21
```python
24
22
import umbi
25
-
ats : ExplicitAts = umbi.ats.read("in.umb")
23
+
ats = umbi.ats.read("in.umb")
26
24
ats.set_initial_states([ats.num_states -1])
27
25
umbi.ats.write(ats, "out.umb")
28
26
```
@@ -31,23 +29,23 @@ More examples can be found in the [./examples](./examples) folder.
31
29
32
30
## API
33
31
34
-
`umbi` offers three levels of abstraction for working with UMB files:
32
+
`umbi` offers multiple levels of abstraction for working with UMB files:
35
33
36
-
**[`TarFile`](umbi/io/tar_file.py) and [`TarCoder`](umbi/io/tar_coder.py)** - Low-level access to tarfile contents.
34
+
**[`TarFile`](umbi/tar/tar_file.py) and [`TarCoder`](umbi/tar/tar_coder.py)** - low-level access to umbfile contents.
37
35
38
-
**[`ExplicitUmb`](umbi/umb/explicit_umb.py)** - In-memory representation of a typical umbfile. Attributes are standard Python objects (lists, dicts, dataclasses) providing a deserialized view of the file contents.
36
+
**[`ExplicitUmb`](umbi/umb/explicit_umb.py)** - in-memory representation of a typical umbfile. Attributes are standard Python objects (lists, dicts, dataclasses) providing a deserialized view of the file contents.
39
37
40
-
**[`ExplicitAts`](umbi/ats/explicit_ats.py)** - 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.
38
+
**[`ExplicitAts`](umbi/ats/explicit_ats.py)** - 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.
41
39
42
40
## CLI
43
41
44
42
`umbi` provides a basic CLI for umbfile manipulation.
45
43
46
44
**Options:**
47
-
-`--import-umb <path>` - Import .umb file as `ExplicitUmb`
48
-
-`--import-ats <path>` - Import .umb file as `ExplicitAts`
49
-
-`--export <path>` - Export to .umb file (requires `--import-umb` or `--import-ats`)
Dependencies are pinned in the [uv.lock](uv.lock) lockfile for reproducible builds. To update the lockfile:
101
-
102
-
```bash
103
-
uv lock
104
-
```
105
-
106
118
### Release
107
119
108
-
New versions are published to PyPI via the [release workflow](.github/workflows/release.yml). The workflow is triggered automatically when:
109
-
- A new version tag is pushed (format: `v*.*.*`)
110
-
- The [bump version workflow](.github/workflows/bump.yml) completes successfully
111
-
112
-
Alternatively, the workflow can be triggered manually via GitHub Actions.
120
+
Dependencies are pinned in the [uv.lock](uv.lock) lockfile for reproducible builds. New versions are published to [PyPI](https://pypi.org/project/umbi/) via the [release workflow](.github/workflows/release.yml). The workflow is triggered automatically when:
121
+
- a new version tag is pushed (format: `v*.*.*`)
122
+
- the [bump version workflow](.github/workflows/bump.yml) completes successfully (can be run manually via GitHub actions)
113
123
114
124
The release workflow:
115
-
1.Updates the [uv.lock](uv.lock) lockfile to reflect any dependency changes
116
-
2.Builds the distribution packages
117
-
3.Publishes to PyPI via trusted publishing
118
-
4.Updates the stable branch pointer to track the latest release
125
+
1.updates the [uv.lock](uv.lock) lockfile to reflect any dependency changes
126
+
2.builds the distribution packages
127
+
3.publishes to PyPI via trusted publishing
128
+
4.updates the stable branch pointer to track the latest release
0 commit comments