Closed f3fora closed 3 years ago
I was already working on this, and we now have a config file for rendering options. I've gone back and forth on whether the mount options should go into the config file as well. What's blocking me at the moment is that both the argparser and configparser are set up to provide defaults when an option is not specified. So there's no way at present to detect that an option wasn't given with one, and therefore the other one should be used. It's obviously possible to do this, but all the things I've thought of feel ugly.
I'll leave this open, and I welcome thoughts about implementation. But the rendering configs are the big ones, I think, since there's no other way to specify them, so we may wait on the rest of this.
You can set the default values in configparser
and suppress the default in argparse
parser = argparse.ArgumentParser(argument_default=argparse.SUPPRESS)
Then use the values you get to update the dictionary of configparser
ones.
In such a way, the priority of default is:
Maybe the code can be more organized between files. Having args/config parser in fuse.py
and config.py
does not have any sense.
Default
mode
option is hardcoded inrmfuse
andrmrl.render
ones inrmcl
orrmrl
.I think it would be a great idea to have a config file for defaults. If it would be managed by
configparser
, it should look like:However,
rmfuse
has no explicit dependence onrmrl
and it is impossible to pass args tormrl.render
So, do you prefer to manage render defaults directly withrmrl
?Moreover,
rmfuse
andrmcl
have different version dependence onrmrl
, and this can be a problem.