-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #180 from aberges-SLAC/getPVAlias
ENH: add getPVAliases and grep_more_ioc scripts
- Loading branch information
Showing
6 changed files
with
1,025 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Constants used in grep_more_ioc and getPVAliases | ||
""" | ||
############################################################################### | ||
# %% Imports | ||
############################################################################### | ||
|
||
import glob as gb | ||
|
||
############################################################################### | ||
# %% Constants | ||
############################################################################### | ||
|
||
# Check the directories for the iocmanager config file | ||
VALID_HUTCH = sorted([d for d in gb.glob('/cds/group/pcds/pyps/config' | ||
+ '/*/') | ||
if gb.glob(d + 'iocmanager.cfg')]) | ||
# Trim to 3 letter hutch code, include 'all' = '*' | ||
VALID_HUTCH = ['all'] + [s.rsplit(r'/', maxsplit=2)[-2] for s in VALID_HUTCH] | ||
|
||
# Keys from iocmanager. Found in /cds/group/pcds/config/*/iocmanager/utils.py | ||
# Update this as needed | ||
DEF_IMGR_KEYS = ['procmgr_config', 'hosts', 'dir', 'id', 'cmd', | ||
'flags', 'port', 'host', 'disable', 'history', | ||
'delay', 'alias', 'hard'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/bash | ||
|
||
# execute python script | ||
THIS_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]}")")" | ||
|
||
/cds/group/pcds/pyps/conda/py39/envs/pcds-5.8.2/bin/python "${THIS_DIR}/getPVAliases.py" "$@" |
Oops, something went wrong.