lcls_naming_tool
A tool that checks the form and content of PV and device names with respect to the LCLS naming convention.
Taxons used are sourced from:
https://docs.google.com/spreadsheets/d/1u5EfR9FIvwyTieWiMkCRqpBfHj-_xm3AygjFlxxWgDc/edit?gid=0#gid=0
https://docs.google.com/spreadsheets/d/1SeQhfwZ6O-wg8tyr_MCQZY1boJC-6j3N6EzexfZB-AU/edit?gid=0#gid=0
Instructions
Use at the command line:
In your current working directory type source /cds/group/pcds/pyps/conda/venvs/lcls_naming_tool/bin/activate
To check if a PV or device name is valid pipe in the name to the tool. For example, $ echo "MR2K4:KBO:PIP:01:PUMPSIZE" | ./lcls_naming_tool.py
To check if a list of names is valid pipe in the file name to the tool. For example, $ cat pvlist.txt | ./lcls_naming_tool.py (names should be separated by newline characters.)
To view the current version add -v or --version. For example, $ echo "MR2K4:KBO:PIP:01:PUMPSIZE" | ./lcls_naming_tool.py --version
Use in a Python script:
In your current working directory set up the environment:
source /cds/group/pcds/pyps/conda/venvs/lcls_naming_tool/bin/activate
git clone git@github.com:pcdshub/lcls_naming_tool.git
export PYTHONPATH=$PWD/lcls_naming_tool/lcls_naming_tool
To call the LCLS Naming Tool module from lcls_naming_tool import load_taxons, validate
In your main function load_taxons() should be called first. It takes no parameters and loads all the approved taxons in JSON format. The function validate() takes a PV or device name in string format as a parameter and returns True for a valid name or False for an invalid name.
To run the web server:
ssh psca@psctlws01
cd /u1/psca/prod/apps/lcls_naming_tool
git pull
supervisorctl
supervisor> stop lcls_naming_tool
supervisor> start lcls_naming_tool
Website is hosted at https://pswww.slac.stanford.edu/lcls_naming_tool/
Requirements
Python 3.9+
Flask 2.2.5 (web only)
Gunicorn 23.0.0 (web only)
Installation
Running the Tests
Metadata
Release files for lcls-naming-tool 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lcls_naming_tool-1.0.1.tar.gz | 891.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lcls_naming_tool-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 911.6 kB
Release files / lcls_naming_tool-1.0.1.tar.gz
| Download URL | lcls_naming_tool-1.0.1.tar.gz |
|---|---|
| Size | 891.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53f6ae25786d5ffe10a2a39c4ba38cdd14de05700222712728d225af53ec496c
|
|
BLAKE2b-256 checksum How to use checksums |
a75a6862a2ae1d0b27ee3977a11a1999f0a3e6d7d7569ec8b7cfea04b8ef2cee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / lcls_naming_tool-1.0.1-py3-none-any.whl
| Download URL | lcls_naming_tool-1.0.1-py3-none-any.whl |
|---|---|
| Size | 20.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e5261a21dec938985fbb97fb3aa0022d0a042b10635a8d3bef1703ee44a90e52
|
|
BLAKE2b-256 checksum How to use checksums |
46e250ad04c9ad73d4b2f92c2299868de377a9ae576c3cc086e1cdf383a3576e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|