You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To avoid putting tokens or credientials in scripts and jupyter notebooks, I usually parse them from a config file. It would be nice to move this code inside pyscicat.
Current behavior
Creating a ScicatClient currently requires either a token or a username/password to be supplied. Providing only the base_url results in an AssertionError.
Proposed behavior
If neither token nor credentials are supplied, read them from the following sources:
$SCICAT_TOKEN environmental variable
$SCICAT_USER and $SCICAT_PASSWORD
The file $XDG_CONFIG_HOME/scicat/config.ini (path subject to discussion) containing either of the above variables.
For instance, I might set /.config/scicat/config.ini to the following:
I often want to switch between production and development tokens. Maybe this could also be added somehow in the config (eg different ini sections for each environment, plus an easy way to switch between them).
Summary
To avoid putting tokens or credientials in scripts and jupyter notebooks, I usually parse them from a config file. It would be nice to move this code inside pyscicat.
Current behavior
Creating a
ScicatClient
currently requires either a token or a username/password to be supplied. Providing only the base_url results in an AssertionError.Proposed behavior
If neither token nor credentials are supplied, read them from the following sources:
$SCICAT_TOKEN
environmental variable$SCICAT_USER
and$SCICAT_PASSWORD
$XDG_CONFIG_HOME/scicat/config.ini
(path subject to discussion) containing either of the above variables.For instance, I might set
/.config/scicat/config.ini
to the following:The text was updated successfully, but these errors were encountered: