Skip to main content

ITk Serial Number parser

Project description

itksn v0.1.0

Helper utility for parsing ITk Serial Numbers


itksn logo
CI/CD CI - Test CI - Coverage
Docs Docs Zenodo
Package PyPI - Downloads PyPI - Version PyPI platforms Conda-Forge
Meta GitHub - Discussion GitHub - Issue License - BSD 3.0

Using

From the command line, you can parse serial numbers. If there is an error in parsing, it will loudly complain (sometimes).

$ itksn parse 20UPGMC2291234
Container:
    atlas_project = (enum) atlas_detector b'20'
    system_code = (enum) phaseII_upgrade b'U'
    project_code = (enum) pixel_general b'PG'
    subproject_code = (enum) Module_carrier b'MC'
    identifier = Container:
        module_type = (enum) Linear_triplet_module_carrier b'2'
        module_version = (enum) Quad_v2p1 b'2'
        manufacturer = b'9' (total 1)
        number = b'1234' (total 4)

$ itksn parse 20UPGR40012345
Container:
    atlas_project = (enum) atlas_detector b'20'
    system_code = (enum) phaseII_upgrade b'U'
    project_code = (enum) pixel_general b'PG'
    subproject_code = (enum) Digital_quad_module b'R4'
    identifier = Container:
        FE_chip_version = (enum) RD53A b'0'
        reserved = b'0' (total 1)
        number = b'12345' (total 5)

$ itksn parse 20UPGPD0012345
Container:
    atlas_project = (enum) atlas_detector b'20'
    system_code = (enum) phaseII_upgrade b'U'
    project_code = (enum) pixel_general b'PG'
    subproject_code = (enum) Dual_PCB b'PD'
    identifier = Container:
        FE_chip_version = (enum) RD53A b'0'
        reserved = b'0' (total 1)
        number = b'12345' (total 5)

$ itksn parse 20UPGFW2123456
Container:
    atlas_project = (enum) atlas_detector b'20'
    system_code = (enum) phaseII_upgrade b'U'
    project_code = (enum) pixel_general b'PG'
    subproject_code = (enum) FE_chip_wafer b'FW'
    identifier = Container:
        batch_number = (enum) CROC b'2'
        number = b'123456' (total 6)

Installation

In a fresh virtual environment, you can install from PyPI:

$ python -m pip install itksn

or from the main branch of the GitHub repository:

$ python -m pip install "git+https://github.com/kratsg/itksn.git"

The above is actually cloning and installing directly from the Git repository.

However, if you want to, you can of course also install it directly from the Git repository "locally" by first cloning the repo and then from the top level of it running

$ python -m pip install .

Contributing

As this library is experimental contributions of all forms are welcome.

If you have ideas on how to improve the API or fix a bug please open an Issue.

You are of course also most welcome and encouraged to open PRs.

Developing

To develop, use a virtual environment.

Once the environment is activated, clone the repo from GitHub

git clone git@github.com:kratsg/itksn.git

and you can use hatch for running tests/development, e.g.

hatch run +py=3.7 dev:test

(Optional) Then setup the Git pre-commit hooks by running

pre-commit install

Acknowledgements

References

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

itksn-0.1.0.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

itksn-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file itksn-0.1.0.tar.gz.

File metadata

  • Download URL: itksn-0.1.0.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for itksn-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2168066055f70d9f2c8739d314276f8bc73ceaa8f3e63129cc36550f472812af
MD5 cd7723217198f3d318651304694b10ec
BLAKE2b-256 52ad16936d8c26cbc804601e4b898b5a9b8a265677fd7c5fd55309fa97fd824b

See more details on using hashes here.

File details

Details for the file itksn-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: itksn-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for itksn-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c3dd7b285e852b8ff0f0c931f4e9fbc2089f28e9134dc69e31eb5f5b51aa658
MD5 6e02855917e41493ef27d33fa8b5fd54
BLAKE2b-256 bc19199ddc67ff7b8c8e9a64857cd1afeff200e61110a082f909e5ababb7b042

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