Skip to main content

ITk Serial Number parser

Project description

itksn

GitHub Project GitHub Actions Status: CI Code Coverage Code style: black

Helper utility for parsing ITk Serial Numbers

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 master 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 install all necessary packages for development

python -m pip install --ignore-installed --upgrade -e .[complete]

(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.0.3.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

itksn-0.0.3-py2.py3-none-any.whl (6.8 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: itksn-0.0.3.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for itksn-0.0.3.tar.gz
Algorithm Hash digest
SHA256 860ab2556440ad5a3a72eb63746d4250dfd1c44340e81cbe37ae81a1006db153
MD5 682542feac1083ed285d8094dfe2c55a
BLAKE2b-256 a71fbc7f3a7f4042f779368360043ba8fdd908d0604e7319a5a430f47e468a71

See more details on using hashes here.

File details

Details for the file itksn-0.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: itksn-0.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for itksn-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ef490f12766f299eababbf63ab2b86292a882f1a27ed0f59aef7855769385564
MD5 7e954a6c7aca4ce517edb1f04cfe884a
BLAKE2b-256 f1896d67fc4956e4b7e0bc81c951ec3a91188a708cc9aa959b4e98c66995c3a5

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