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.(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.
(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:
(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
Metadata
Release files for pyjaniml 1.0.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 |
|---|---|---|---|---|
| pyjaniml-1.0.0.tar.gz | 25.6 kB | Without provenance | Details for pyjaniml-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyjaniml-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for pyjaniml-1.0.0-py3-none-any.whl |
Total release size: 35.6 kB
Release files / pyjaniml-1.0.0.tar.gz
| Download URL | pyjaniml-1.0.0.tar.gz |
|---|---|
| Size | 25.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
410c2d1dd7f9f50cb0640158cbda3908d35d69741292401405ed6fdb138626bf
|
|
BLAKE2b-256 checksum How to use checksums |
3a897fec2750dc43caed7eab0ebd67c9b4d2b47a11897ccf220c8450ebd532db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|
Release files / pyjaniml-1.0.0-py3-none-any.whl
| Download URL | pyjaniml-1.0.0-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
95c86319e544528c5291fb1f321c97da6fabd9f4419e6de919538abe28030dc4
|
|
BLAKE2b-256 checksum How to use checksums |
571844615042e1b111b51d2a31cf1b89d5a62de797f1a89b1a960978c1c34468
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|
Security for pyjaniml 1.0.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.