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
It can be tedious providing all of the necessary arguments to Plotypus, and if you're reusing the same ones over and over, it would be nice to be able to save them to a config file. Also, new users are likely to be overwhelmed by the number of available parameters, so if we could simply provide several files with reasonable defaults for various usages, that would be useful.
For this reason, I think we should add support for a configuration file, which would provide default values for arguments. The variables in the config file would have names identical to the CLI arguments.
Take, for example, the following call to plotypus.
$ plotypus --input foo/bar.dat --period 12.34
One could instead create a config file
# foo.conf
input = foo/bar.dat
period = 12.34
and call it with
$ plotypus --config foo.conf
and to override the input file, run
$ plotypus --config foo.conf --input bar/baz.dat
We could also have an option which causes the built-in defaults to be printed to stdout, which would make for a good starting point for making a custom config file, which does not break (as easily) when plotypus is upgraded.
It can be tedious providing all of the necessary arguments to Plotypus, and if you're reusing the same ones over and over, it would be nice to be able to save them to a config file. Also, new users are likely to be overwhelmed by the number of available parameters, so if we could simply provide several files with reasonable defaults for various usages, that would be useful.
For this reason, I think we should add support for a configuration file, which would provide default values for arguments. The variables in the config file would have names identical to the CLI arguments.
Take, for example, the following call to plotypus.
One could instead create a config file
and call it with
and to override the input file, run
We could also have an option which causes the built-in defaults to be printed to stdout, which would make for a good starting point for making a custom config file, which does not break (as easily) when plotypus is upgraded.
$ plotypus --config-defaults > default.conf
I found two packages made to serve this purpose (ConfigArgParse and argparse_config), as well as a StackOverflow post, which suggests several approaches.
I suggest not starting work on this until more pressing issues are taken care of, but it will probably be simple enough to fit into the next release.
The text was updated successfully, but these errors were encountered: