pcdshub / engineering_tools

A repository of scripts, configuration useful for the PCDS team
Other
4 stars 26 forks source link

MAINT: get_info s3df compatibility #179

Closed ZLLentz closed 7 months ago

ZLLentz commented 7 months ago

Description

Motivation and Context

How Has This Been Tested?

I set my PATH to my clone of engineering tools and removed the previous tagged engineering tools from my PATH. Then I verified functionality and failure modes on both systems:

Basic functionality (using get_lastRun): It's the same results in each system which is a good sign.

zlentz@psbuild-rhel7-02:~/.../engineering_tools/scripts(mnt_get_info_s3df -)$ ./get_lastRun -H xpp
5
zlentz@psbuild-rhel7-02:~/.../engineering_tools/scripts(mnt_get_info_s3df -)$ ./get_lastRun -H tmo
131
zlentz@psbuild-rhel7-02:~/.../engineering_tools/scripts(mnt_get_info_s3df -)$ ./get_lastRun -H cxi
18
[zlentz@sdfiana008 scripts]$ ./get_lastRun -H xpp
5
[zlentz@sdfiana008 scripts]$ ./get_lastRun -H tmo
131
[zlentz@sdfiana008 scripts]$ ./get_lastRun -H cxi
18

Basic functionality using the script directly seems to work too:

zlentz@psbuild-rhel7-02:~/.../engineering_tools/scripts(mnt_get_info_s3df -)$ ./get_info --exp --hutch XPP
xppl1026722
[zlentz@sdfiana008 scripts]$ ./get_info --exp --hutch XPP
xppl1026722

Error state if the python interpreters are both not found (by modifying the script to look for the wrong ones): It tells you why it isn't running and what it tried to use.

zlentz@psbuild-rhel7-02:~/.../engineering_tools/scripts(master +)$ ./get_lastRun -H xpp
No known python executable is available! Tried all of /cds/group/pcds/pyps/conda/py36/envs/pcds-3.4.0/bin/pythonasfd /sdf/group/lcls/ds/ana/sw/conda1/inst/envs/ana-4.0.60-py3/bin/python
[zlentz@sdfiana008 scripts]$ ./get_lastRun -H xpp
No known python executable is available! Tried all of /cds/group/pcds/pyps/conda/py36/envs/pcds-3.4.0/bin/python /sdf/group/lcls/ds/ana/sw/conda1/inst/envs/ana-4.0.60-py3/bin/pythonasdfasd

Error codes from get_info.py are properly passed to get_info:

zlentz@psbuild-rhel7-02:~/.../engineering_tools/scripts(mnt_get_info_s3df -)$ ./get_info asefasfe
usage: get_info.py [-h] [--run] [--exp] [--live] [--ended] [--hutch HUTCH]
                   [--station STATION] [--getHutch] [--gethutch]
                   [--getstation] [--getbase] [--getinstrument] [--getcnf]
                   [--files_for_run FILES_FOR_RUN]
                   [--nfiles_for_run NFILES_FOR_RUN] [--setExp SETEXP]
get_info.py: error: unrecognized arguments: asefasfe
zlentz@psbuild-rhel7-02:~/.../engineering_tools/scripts(mnt_get_info_s3df -)$ echo $?
2

Where Has This Been Documented?

Only here, in the release notes later, and in the jira ticket