Closed Peter9192 closed 1 year ago
Now not ideal, as config fields are used on import time. For example at https://github.com/phenology/springtime/blob/ce3bdfd250b3439fe18f78914291147aba0531a2/src/springtime/datasets/phenocam.py#L23
You need to change configuration before importing things that use config.
Use https://pypi.org/project/xdg-base-dirs/ to get cache and config dir
springtime --output-dir /tmp/outputdir --cache ~/.cache/springtime --config ~/.config/springtime <recipe>
# for example ~/.config/springtime/pep725_credentials.txt
I would like to have several options for output location:
--output-dir /tmp/myoutput
so data.csv is written in /tmp/myoutput/data.csv`. --output-dir .
so data.csv is written in ./data.csv
. /tmp/springtime-jobs/springtime-24072023T14:18:23/data.csv
/tmp/springtime-jobs
with --output-root-dir
. If --output-dir
is absent then <output-root-dir>/springtime-24072023T14:18:23/data.csv
If --output-root-dir
is absent then it is .
.
Perhaps use hydra https://hydra.cc/docs/intro/