ITk Serial Number parser
Project description
itksn v0.2.2
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 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
- @matthefeickert's heputilities repository for a quick start
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file itksn-0.2.2.tar.gz
.
File metadata
- Download URL: itksn-0.2.2.tar.gz
- Upload date:
- Size: 26.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04fdc8900eedea47f02c7d6682497aa12cd7b1a3db55ee19b0bfa7f04429c107 |
|
MD5 | fefb08a7bf46d2a63537c00c02544459 |
|
BLAKE2b-256 | d073d5227307b41c65f20df5bc89d3218b1eb511caa00e9f927b8dc0e7ad36d6 |
File details
Details for the file itksn-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: itksn-0.2.2-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4d48c89ceccfdf6455caa0eaba7018a11c201d9c78e711600377d883158ac40 |
|
MD5 | 4c60b5797eae7228b9773ce066a7a391 |
|
BLAKE2b-256 | feec4365ed00088885d68f267ed2e834a7aeb1ea0c24d7c70d45c0700b7e0952 |