Conversation
|
This will close #189. A few touch-ups still needed. We also agree that we need a "desync experiment" command. This has been discussed before, but is now even a bit more useful when using API key for auth (effectively can work like a logout) |
Experiments (proposals) are "authorized". Then, one of the authorized experiments is "activated". Multiple proposals may be authorized at the same time, but only one proposal can be active at a time. This should make more clear what the tool is doing, and how the policy works, as opposed to before (authorize/activate vs activate/select or activate/load). Includes some other minor word fixes.
…ormalized_beamline
| "/v1/facility/nsls2/cycles/current" | ||
| ).raise_for_status() | ||
| return cycle_response.json()["cycle"] | ||
| print( |
There was a problem hiding this comment.
Do we have a proper logger for this already? I guess, printing is okay still.
There was a problem hiding this comment.
A reflection on this: in its current implementation, this is a CLI tool (+callable from Python). I typically don't expect tools I call from terminal to print to syslog, for example. That is, unless I'm doing something with services, which this tool isn't exactly quite yet. It does set information in Redis for us, maybe that is sort of service like, but I'm not bought in.
Not to say that using a logger for this == we have to put things in syslog, but thinking in terms of intent/patterns. I don't think I'd expect this version of the tool to be logging. And I'm also not sure I'd put Redis metadata in the logs on random workstations.
Also, when I call verbose with a terminal command I'm expecting more stdout/stderr to appear in the stream. Sometimes that is also logged, but I don't expect it to mean "turn on logging".
So, I think I favor that this remains a print for now.
Summary of changes so far:
md['data_sessions_authorized']switch_proposallet's you rotate through any proposals that are currently activatedpassword_grantonly for now, but could use any auth flow that Tiled supports (sets us up for the future, i.e. OIDC)sync-experimentruns, reducing the need to have multiple logins (API key will be used for subsequent Tiled clients)