Skip to main content

Classes for AniML handling

Project description

pyjaniml

Version License: MIT Python Versions: see setup.py

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

  1. 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.

  2. Start a new branch release/$VERSION.

    (env)$ git checkout main
    (env)$ git pull
    (env)$ git checkout -b "release/$VERSION"
    
  3. 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.

  4. 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"
    
  5. 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
    
  6. Check the build pipeline

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyjaniml-1.0.0.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

pyjaniml-1.0.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file pyjaniml-1.0.0.tar.gz.

File metadata

  • Download URL: pyjaniml-1.0.0.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for pyjaniml-1.0.0.tar.gz
Algorithm Hash digest
SHA256 410c2d1dd7f9f50cb0640158cbda3908d35d69741292401405ed6fdb138626bf
MD5 5c05c1c722c51c79f91d0e4cf5ec6dfe
BLAKE2b-256 3a897fec2750dc43caed7eab0ebd67c9b4d2b47a11897ccf220c8450ebd532db

See more details on using hashes here.

File details

Details for the file pyjaniml-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyjaniml-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for pyjaniml-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 95c86319e544528c5291fb1f321c97da6fabd9f4419e6de919538abe28030dc4
MD5 7f46fe4568ab3be27c83389f6de3608b
BLAKE2b-256 571844615042e1b111b51d2a31cf1b89d5a62de797f1a89b1a960978c1c34468

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page