[rose]: metadata for optional configs

Some more metadata questions!

Is there a sensible way to record metadata for an optional config?

I’m wanting to create an app, and have an optional configurations which implement test modes.
In test mode, the optional configuration may specify arguments not present in the default configuration.
Or the argument values may be something I want to explain - e.g. in default config ARG1=normal_value, while in an optional config ARG1=crazy_value, and I want to give a reason for why crazy_value - ideally in a help metadata entry.
Note am testing at this rose/cylc level (rather than within the app itself) as in some cases the test mode may specify a value intended to test app integration/suite handling for edge-cases.

I guess I could try workarounds like:

  1. don’t try to use metadata to record why an optional config has given values, instead keep this information in relevant commit messages (and hope later reader thinks to use blame & friends)
  2. ensure the standard app/meta/rose-meta.conf documents all args (ie. across all configs, default and optional)
  3. for a given arg present in multiple configs, use comments in the optional config to explain the variant used there, and rely on the app comments behaviour
  4. for a given arg present in multiple configs, have the [help] text exhaustively documents all reasoning, e.g.
[env=ARG1]
title=arg1 file
description=The input file to use for arg1
help=Files used depend on the the configuration:
      = Default: provided by suite
      =opt-config-1: test the app handles small values
      =opt-config-2: test the app can handle datagaps
...
      =opt-config-N: test the app restarts if encounters NaNs

I’m currently leaning towards 2. and 3. However, I’m just wanting to check that there isn’t a rose-meta.conf-per-optional-config option I’m missing, which might let me avoid the above workarounds!

Apologies if this is covered somewhere - I can’t see it (or have missed it!) in the places I’ve looked:

The metadata applies to the entire configuration - there isn’t any optional config specific metadata. I agree that your options 2 & 3 make sense.

All Rose configs can have optional configs so that includes metadata configs. However, I’m not really sure why the optional config documentation specifically mentions this since I can’t think of a good use case.

1 Like

Very helpful, thanks Dave!