Skip to main content

A tool that checks the form and content of names with respect to the LCLS naming convention.

Project description

https://github.com/pcdshub/lcls_naming_tool/actions/workflows/standard.yml/badge.svg https://img.shields.io/pypi/v/lcls_naming_tool.svg

Documentation

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://github.com/pcdshub/lcls_naming_tool/blob/main/docs/LCLS_Photon_Source_and_Systems_Nomenclature.pdf

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:

  1. In your current working directory type source /cds/group/pcds/pyps/conda/venvs/lcls_naming_tool/bin/activate

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

  3. 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.)

  4. 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:

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

  1. To call the LCLS Naming Tool module from lcls_naming_tool import load_taxons, validate

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

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

lcls_naming_tool-1.0.1.tar.gz (891.5 kB view details)

Uploaded Source

Built Distribution

lcls_naming_tool-1.0.1-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file lcls_naming_tool-1.0.1.tar.gz.

File metadata

  • Download URL: lcls_naming_tool-1.0.1.tar.gz
  • Upload date:
  • Size: 891.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for lcls_naming_tool-1.0.1.tar.gz
Algorithm Hash digest
SHA256 53f6ae25786d5ffe10a2a39c4ba38cdd14de05700222712728d225af53ec496c
MD5 6fb895f61e3800fcb209442379c5e889
BLAKE2b-256 a75a6862a2ae1d0b27ee3977a11a1999f0a3e6d7d7569ec8b7cfea04b8ef2cee

See more details on using hashes here.

File details

Details for the file lcls_naming_tool-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for lcls_naming_tool-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e5261a21dec938985fbb97fb3aa0022d0a042b10635a8d3bef1703ee44a90e52
MD5 db35082afceb40b4bc27e7b50ea2522d
BLAKE2b-256 46e250ad04c9ad73d4b2f92c2299868de377a9ae576c3cc086e1cdf383a3576e

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