In 0.7 flags are independent of support for configuration files. In a future release we’ll promote config files as a proper flags interface. It will also be possible to configure multiple interfaces to direct some flags to one destination and other flags to another. Alas none of this is available yet.
You can sill get this done though. Use the config dependency type: Dependencies.
Here’s an example:
You want to specify args
for flag-dest
. By default this will pass all flags as command line options. You can disable that for specific flags using arg-skip: yes
. You can do this for every arg that you don’t parse with argparse. To skip all flags by default, set default-flag-arg-skip
to yes
for the operation.
op:
flags-dest: args
default-flag-arg-skip: yes
flags:
# Add your flag defs used for config.yml
gpu:
arg-skip: no
requires:
- config: config.yml