-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating --cds-items option in epicsqarch-qs #384
Conversation
I have to fix a bunch of things, something happened when I did a git pull. |
…search for the experiment and then bring up an cds items.
acbbcfe
to
9b6312d
Compare
Don't worry about the pip build failures, there's some disturbance in the python-ci-sphere right now due to some major package releases. I'll work through these in a follow-up PR. I'll review the contents of your PR now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this a lot!
I have a ton of comments about maintenance/code health (thinking about the lifetime of the code beyond this PR) and not a lot about your intended changes, which look good.
hutch_python/epics_arch.py
Outdated
@@ -7,6 +7,7 @@ | |||
import sys | |||
from dataclasses import dataclass | |||
|
|||
from kerberos import GSSError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This technically adds a pykerberos
dependency to hutch-python
. It's already an implicit dependency because it's used by some of our dependencies, but it's good practice to call out explicit dependencies in the package files in case a sub-dependency stops requiring it.
pykerberos
needs to be added to conda-recipe/meta.yaml
and to requirements.txt
on this technicality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I decided to add this statement when I was trying to understand how Kerberos tokens work on our hutch machines. Do all hutch-opr machines have a Kerberos tokens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think of kerberos as a centralized authentication service. Every normal user on each of our servers on the network should be able to get kerberos tokens.
That being said, hutch *opr users don't normally get kerberos tokens... Maybe we need to do something special for these again? In the past these have accessed the questionnaire via hard-coded read-only username/password pairs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, yeah, maybe we could do something special? I think Vincent wanted this to be able to run from an opr account. Or maybe we could do a read-only URL or something? If that's a thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the past we passed in a username and password into the init for QuestionnaireClient
that came from a file in the opr home area:
- https://github.com/pcdshub/psdm_qs_cli/blob/9d6bed253aa3a9f2c49f2fe43d3402b8cd9a6042/psdm_qs_cli/QuestionnaireClient.py#L49
hutch-python/hutch_python/qs_load.py
Lines 85 to 94 in a2b1b55
cfg = ConfigParser() cfgs = cfg.read(['qs.cfg', '.qs.cfg', os.path.expanduser('~/.qs.cfg'), 'web.cfg', '.web.cfg', os.path.expanduser('~/.web.cfg')]) # Ws-auth if cfgs: user = cfg.get('DEFAULT', 'user', fallback=None) try: pw = cfg.get('DEFAULT', 'pw')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do all the opr machines still have this file? I can try to implement this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iirc all the opr home areas have this file
check out your favorite opr's home and find .web.cfg
$ ll /cds/home/opr/*/.web.cfg
-rw-rw-r-- 1 cxiopr cxiopr 63 Aug 27 2020 /cds/home/opr/cxiopr/.web.cfg
-rw-rw-r-- 1 mecopr mecopr 63 Nov 6 2023 /cds/home/opr/mecopr/.web.cfg
-rw-r--r-- 1 mfxopr mfxopr 63 Oct 16 2020 /cds/home/opr/mfxopr/.web.cfg
-rw-rw-r-- 1 rixopr xs 63 Apr 20 2021 /cds/home/opr/rixopr/.web.cfg
-rw-rw-r-- 1 tmoopr ps-tmo 63 Apr 15 2021 /cds/home/opr/tmoopr/.web.cfg
-rw-r--r-- 1 xcsopr xcsopr 63 Aug 27 2020 /cds/home/opr/xcsopr/.web.cfg
-rw-r--r-- 1 xppopr xppopr 63 Aug 27 2020 /cds/home/opr/xppopr/.web.cfg
…okens and edited cases for propsal ID matching.
Hey the tests are running again! Great! |
By and large this is very good, just the two remaining things:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with this!
If you're happy and finished, feel free to mark this as "ready for review" (currently marked as a draft) and click merge if you want (or I'll click if for you)
You should also click the "Update branch" button
I feel like it is good, are you satisfied with the new cases that I added to filter the commissioning experiments? I think we covered as many cases as we can. |
Yes, I think you've done your full due diligence with your regex filters. It could miss an oddly named one here or there but there's only so much we can do with finite time. I suspect it wouldn't make sense to change them again unless we get another new naming convention. |
OK, that sounds good. That was my only concern, Ill covert it and update now. |
Description
I updated --cds-items to include a parser that helps the users find their experiments better. It handles a few different formats for the experiment name and if it can't find it right away it allows the user to input in the relevant information.
Motivation and Context
It was requested by Vincent, the previous version required you to know the run number and proposal id. This way is slightly more interactive and allows you to 'search' for the experiment.
How Has This Been Tested?
I didn't do any unit testing. I just tested it will all of the proposal id formats that I saw in the questionnaire and what was returned from getProposalsList from psdm_qs_cli.
Where Has This Been Documented?
Pre-merge checklist
docs/pre-release-notes.sh
and created a pre-release documentation page