Open dpmatthews opened 2 years ago
(It's somewhat unfortunate that we ever went down this CLI config override track).
flow-config/*-start.cylc
is written at ~line 1150 of scheduler.py
.
flow-config/flow-processed.cylc
is written at around line 10 in cylc/flow/parsec/fileparse.py
having been processed by read_and_proc
, which does receive datetime options from the CLI.
cylc.flow.parsec.fileparse.read_and_proc
could be made to process CLI datetime options as if they were template variables.The difference between initial cycle point
and the other cycle point settings in *-start.cylc
would appear to be due to this line: https://github.com/cylc/cylc-flow/blob/09581beb94250374215bea925f2bec985f6c13c2/cylc/flow/config.py#L273-L276
This is done before the dense config is loaded, so it modifies the sparse config. The sparse config is what gets dumped to *-start.cylc
. No other cycle point option is overridden for the sparse config, they are only overridden for the dense config,
Related to this is the fact that
cylc config
accepts--icp
as an option but none of the other cycle point settings which seems rather strange.
That seems like the larger problem actually. If you have R1/$ = foo
and don't specify flow.cylc[scheduling]final cycle point
, then you can't use cylc config
or cylc validate
on the workflow
The flow-processed shows the config after pre-processing, the other file shows the config after loading by Cylc. This loading can modify the config in other ways too e.g:
So the processed config has always been inconsistent. Is this a problem?
Would dumping the CLI options in a comment at the top of the file suffice?
That would be an improvement. Maybe also a comment along the lines of:
# note: command line options can override flow.cylc settings
If I have this workflow:
and then run it using this command:
then
flow-config/flow-processed.cylc
contains:whereas
flow-config/*-start.cylc
contains:Related to this is the fact that
cylc config
accepts--icp
as an option but none of the other cylc point settings which seems rather strange.