metomi/rose — pull request #1163 by benfitzpatrick (2014-03-07 15:59:28+00:00)
Title: rose metadata: do not require section for compulsory=true options

This change alters the metadata specification to
allow compulsory options to be missing from a
configuration if and only if their parent section
is also missing.

The compulsory macro logic has been refactored
to reflect this, which also fixes a few bugs in the
handling of compulsory options in duplicate
sections:
* error updating for these sections in rose edit
* the `--fix` bug described in #1158.

The compulsory change has also revealed some
flaws in the handling of latent duplicate sections in
`rose edit`. Previously, defining a latent section via
metadata that read:
```
[namelist:missing_duplicate_section]
duplicate=true
```
would have produced a latent section object in
`rose edit` whose name was
`namelist:missing_duplicate_section`, instead of
`namelist:missing_duplicate_section(1)` which is
now the current behaviour.

@matthewrmshin, please test and review.

I'll also ask some users to have a test before we
can merge this in.