Open janosh opened 18 hours ago
If I understand correctly your request, this should already be possible, since the settings are a pydantic BaseSettings: https://docs.pydantic.dev/latest/concepts/pydantic_settings/#environment-variable-names
For example I regularly set my default project with export jfremote_project=$PROJECT_NAME
. In principle you could also change the path of the config file ~/.jfremote.yaml
by setting the environment variable jfremote_config_file
and have it in some other path than the home.
Does this solve your issue?
thanks for the quick reply! this was what i was looking for
export JFREMOTE_PROJECTS_FOLDER=/dir/to/jf_remote/configs
would be great to document the env var prefix JFREMOTE_
for any JobflowRemoteSettings
attribute
Actually it is already documented: https://matgenix.github.io/jobflow-remote/user/projectconf.html#general-settings I admit it may not be that easy to spot. If you have a suggestion of where to move it to make it more reachable I can update it.
i remember now seeing the docs you linked before. just forgot about them. my bad!
i think that's already the best place to document them. if you search for "environment variable" on that page, it only comes up once at the top. the term isn't used again at the bottom where the variable names are actually used. i think adding a subsection titled "Environment Variables" listed under "On this page" would help discoverability. and CONSTANT_CASING the variable names could also help since that's what i'm looking for when skimming the page
Small QoL suggestion: would be nice if the
projects_folder
which currently can only be configured in~/.jfremote.yaml
could also be set via env varJF_REMOTE_PROJECTS_FOLDER
. one motivation for this is that some HPC setups don't provide access to the home folder from compute nodeshttps://github.com/Matgenix/jobflow-remote/blob/8df197923b77862035f893d58d1cf1e022869cf1/src/jobflow_remote/config/settings.py#L19-L21