pyjaniml
Python Package to handle serialization and deserialization of janiml json
Summary
| Latest Version | Unknown |
|---|---|
| License | Unknown |
| CI Status | Failing |
| Stars | 1 |
| Forks | 0 |
| Open Issues | 0 |
| Last Commit | 2025-07-09 |
| Downloads | 0 |
| Last Indexed | 2026-08-10 05:05 |
Installation
nimble install pyjaniml
choosenim install pyjaniml
git clone https://gitlab.com/clade-public/pyjaniml
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| pyjaniml | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://gitlab.com/clade-public/pyjaniml |
|---|---|
| Homepage | https://gitlab.com/clade-public/pyjaniml |
| Registry Source | gitlab |
README
pyjaniml
A package to serialize and deserialize janiml json documents using marshmallow.
Based on
https://docs.google.com/document/d/1vpPbkAqPFc22efJ0IXvGGSzAn_4VFNG_OiaEfn42zx4/edit?usp=sharing
https://github.com/AnIML/schemas/blob/master/animl-core.xsd
Installation
Install directly from the GitLab repository
$ pip install pyjaniml
Usage
Example usage
Not yet implemented
- Nested categories
- Signature Set
- Audit Trail
Contributing
The project uses black and isort for formatting its code. flake8 is used for linting. mypy is used for type checking. All these are combined into pre-commit to run before each commit and push. To set it up:
(env)$ python -m pip install pre-commit
(env)$ pre-commit install -t pre-commit -t pre-push --install-hooks
To run the unit tests you need some additional utilities that need to be installed before you can run the tests.
(env)$ python -m pip install -r requirements/tests.txt .
(env)$ python -m pip install -e .
(env)$ pytest --cov
Issuing a new Release
-
Determine the next version you want to release. For that, check the CHANGELOG and the chances made since the last release. Let's call it
$VERSION. -
Start a new branch
release/$VERSION.
console
(env)$ git checkout main
(env)$ git pull
(env)$ git checkout -b "release/$VERSION"
-
Update the CHANGELOG with the new desired version. Also ensure the notes for the new release make sense and are coherant. Remember, the target audience for this changelog.
-
Commit the changes an push them. Then open a merge request.
console
(env)$ git add CHANGELOG.md
(env)$ git commit -m "Release $VERSION"
(env)$ git push -o merge_request.create -u origin "release/$VERSION"
- Once the merge request has been approved and merged, pull the changes, add a git tag and push it:
console
(env)$ git checkout main
(env)$ git pull
(env)$ # If you have a GPG key, please sign the tag:
(env)$ git tag -s -m "Release $VERSION" "$VERSION"
(env)$ # If you do not have a GPG key:
(env)$ git tag -m "Release $VERSION" "$VERSION"
(env)$ git push --tags
Converting Bruker OPUS Files
Bruker OPUS Files can be converted into json using the following snippet:
file_path=/Path/To/Files
import pyjaniml
converter = Converter()
_ = converter.convert_folder_and_zip(file_path)
or directly via the console
python3 pyjaniml /Path/To/Files