Cylc-flow: Generalise [runtime] metadata items

Created on 26 Jun 2017  路  5Comments  路  Source: cylc/cylc-flow

The new importance item added to runtime namespaces by #2320 suffers from the problem that its meaning is entirely user-defined - all Cylc does is pass it (if need be) to task event handlers. Essentially title, description and URL are in the same category, although they obviously have more standard usage (and are also displayed by GUI tooltip, and 'browse' right-click menu item).

So, as discussed in the June meeting in Exeter, rather than let items like this continue to proliferate, we should generalise them to entirely user-defined metadata sections.

As a first cut, I suggest we keep title, description, and URL, but move them into a metadata section and allow arbitrary additional items, like this:

[runtime]
    [[NAME]]
         [[[metadata]]]
               title = blah
               description = blah
               URL = blah
               __MANY__ = blah  # (using the cfgspec wildcard item)

Alternatively, we could leave the existing items where they are (at the top level), or entirely drop them as pre-defined items. The latter choice might be problematic for existing tool-tip and browse-to functionality though. @cylc/core - any preference?

small

Most helpful comment

I prefer (but not strongly):

  • [meta] instead of [metadata]. Less to type. (And just as easy to understand, and already standard in some languages. E.g. meta tag in HTML.)
  • Move title, description and URL to the new section internally, but provide the usual upgrade and do not deprecate the old setting for the foreseeable future. Internally, it should then be nice and simple to pass around a single meta dict to relevant functionalities.

All 5 comments

@hjoliver - what about "group" too? (as used in gscan but probably nowhere else at this point)

group is a suite-level setting, not a task-level setting, so should not be relevant here.

I prefer (but not strongly):

  • [meta] instead of [metadata]. Less to type. (And just as easy to understand, and already standard in some languages. E.g. meta tag in HTML.)
  • Move title, description and URL to the new section internally, but provide the usual upgrade and do not deprecate the old setting for the foreseeable future. Internally, it should then be nice and simple to pass around a single meta dict to relevant functionalities.

@challurip - we should also do the same with suite metadata, for consistency and to allow arbitrary metadata about suites. (e.g. the "importance" of particular suites could be passed to suite and task event handlers that are used by many suites). Could be on a follow-up PR.

Closed by #2349

Suite level metadata can be a new issue (unless we get the PR in really quickly - I need to check with @challurip )

Was this page helpful?
0 / 5 - 0 ratings

Related issues

oliver-sanders picture oliver-sanders  路  3Comments

hjoliver picture hjoliver  路  5Comments

sadielbartholomew picture sadielbartholomew  路  5Comments

kinow picture kinow  路  3Comments

oliver-sanders picture oliver-sanders  路  5Comments