Validate input yaml - #100
Merged
Merged
Conversation
lrobion
force-pushed
the
validate-yaml-input
branch
from
August 10, 2026 21:07
98ed65f to
4cb62d3
Compare
Contributor
Author
|
Moving these goals as another PR to make it easier to review:
|
lrobion
marked this pull request as ready for review
August 11, 2026 21:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft to start work on #99, all tests in
test_yamlreader.cppTEST_CASE("Validate Input Files")TEST_CASE("Validate Input Files")TEST_CASE("Validate Input Files")operator[]lookup because it returns the first). This is not an issue currently, but might be when we dump the finalized YAML. Tested inTEST_CASE("mergeYamlNodes keeps each key exactly once")TEST_CASE("mergeYamlNodes rejects non-scalar keys")readAdvancedMenuinstead of indefaults/input.yamldefaults/input.yamland ran the build, the default values would not have been updated because this is done at the configure step)SampleRunDir/which has been superseded byexamples/issl_rhi140/(it cannot run without an input met.nc and there is no reason to maintain it anymore)APCEMM now throws more helpful error messages for bad YAML files:
Invalid field in YAML input file '/home/louis/code/APCEMM/examples/issl_rhi140/example.yaml': Duplicate key found: 'PARAMETER MENU -> METEOROLOGICAL PARAMETERS SUBMENU -> Pressure [hPa] (double)'. Each key must appear only once. Group all the entries of a menu under a single heading.Invalid field in YAML input file '/home/louis/code/APCEMM/examples/issl_rhi140/example.yaml': Unknown key found: 'PARAMETER MENU -> METEOROLOGICAL PARAMETERS SUBMENU -> Unsupported field'