Closed timothydmorton closed 5 years ago
Already there https://github.com/CobayaSampler/cobaya/blob/master/cobaya/run.py#L136
But I see now that it's not documented. Will add to the docs, thanks!
Great!
Could cobaya-install
also default to using $COBAYA_MODULES
if -m
is not provided?
(cobaya) [tmorton@perseus ~]$ export COBAYA_MODULES=/tigress/tmorton/cosmology/modules
(cobaya) [tmorton@perseus ~]$ cobaya-install cosmo
usage: cobaya-install [-h] -m /install/path [-f] [--no-progress-bars]
[-C | -D]
input_file.yaml [input_file.yaml ...]
cobaya-install: error: the following arguments are required: -m/--modules
Added and both documented. I hope you don't mind that it will come with 2.0: cherry-picking is a little dangerous at the moment (quite a few changes). It'll be in <2 weeks anyway.
Just another suggestion as you move toward 2.0-- have you considered using a $COBAYA_MODULES environment variable as the default modules directory? That way, if
modules
isn't passed in an info string, then you can just default toos.getenv('COBAYA_MODULES', None)
or something like that as the modules path. This would also make it easier to share.yaml
files between machines (e.g., would avoid having to hard-code paths).If you're interested, I'm happy to give a shot at a PR along these lines.