Unify the get-suite-config and get-site-config commands as config.
cylc config [OPTIONS] [REG]
Examples:
# print global configuration
$ cylc config
# print workflow configuration
$ cylc config myflow
# print specific configuration from the global config
$ cylc config -i '[platforms][myplatform]hosts'
# print workflow config, first setting the initial cycle point
$ cylc config --initial-cycle-point=now myflow
This handles the renaming of site (global) and suite (flow).
--print-run-dir - not sure what the future for this option is, possibly obsolete--python - useless (Python can't parse natively), can implement --format json if required.--mark-up - what format was that implemented for?--tasks - deprecated--run-mode - obsolete--suite-owner - obsolete--all-tasks - untested and appears broken (prints entire sparse config for each task)--user, --host - remove command reinvokation, just use SSH.Replace --print-site-dir with --print-filenames which should print the tree of config files that cylc config would have read (if they were present).
$ cylc config --print-filenames myflow
/opt/cylc/global.cylc
/opt/cylc/8/global.cylc
/opt/cylc/8.0a3/global.cylc
/opt/cylc/8.0a3.dev/global.cylc
~/.cylc/global.cylc
~/.cylc/8/global.cylc
~/.cylc/8.0a3/global.cylc
~/.cylc/8.0a3.dev/global.cylc
~/cylc-run/myflow/flow.cylc
This helps verify $CYLC_CONF_PATH has been set correctly and may be helpful for testing.
Not important, can be added later if we want it.
--mark-up- what format was that implemented for?
Author: Hilary James Oliver <[email protected]> 2012-07-23 14:18:151
+parser.add_option( "-m", "--mark-output",
+ help="Prefix output lines with '!cylc!' to aid "
+ "in automatic parsing (output can be contaminated by "
+ "stdout from login scripts, for example, for remote "
+ "invocation).",
+ action="store_true", default=False, dest="markoutput" )
(later changed to --mark-up for some reason)
This was added for use by the early GUI, for cleaning get-config output.
It can definitely be removed :+1:
Good idea, can't see any reason not to do it. :+1:
--print-run-dir- not sure what the future for this option is, possibly obsolete
Should there be a new command to replace this, e.g. something like cylc get-run-dir?
It's used in the test_header: https://github.com/cylc/cylc-flow/blob/56125456002da9b9383123f81a7268d3e61e9ada/tests%2Ffunctional%2Flib%2Fbash%2Ftest_header#L883-L884
We were considering removing support for configuring the run dir on a per-platform basis (as the new symlink support renders it obsolete) which would mean the run dir is always $HOME/cylc-run.
Replace
--print-site-dirwith--print-filenameswhich should print the tree of config files thatcylc configwould have read (if they were present).
I can't find --print-site-dir anywhere?
Edit: that's because it's since been removed probably. Will create a new --print-filenames or --print-hierarchy or something like that.
Will create a new
--print-filenamesor--print-hierarchyor something like that.
As part of this, I have had another look at
https://github.com/cylc/cylc-flow/blob/eece5ac21a4d4847c66fa50b20bf4c0fca4ac286/cylc%2Fflow%2Fsuite_files.py#L354-L358
Is this side effect still desirable? Maybe it should only happen if you pass an arg register=True or something? Or, is it my imagination or do I remember @datamel mentioning changing this?
Registration is dead (on mel's cylc install branch) so this behaviour can be removed.
Ah, I should probably wait for #4000 to be merged before finishing this then
Most helpful comment
Ah, I should probably wait for #4000 to be merged before finishing this then