Repository navigation
Add JSON schemas for the system tests YAML files - #948
Open
NopeCharon wants to merge 2 commits into
Open
NopeCharon wants to merge 2 commits into
NopeCharon wants to merge 2 commits into
Conversation
Add JSON schemas for tests.yaml, components.yaml, and the metadata.yaml files of the tutorials, in tests/schemas/. They describe the structure that the Python parsers in tests/metadata_parser and tests/systemtests expect, including the optional fields (max_time, max_time_windows, timeout, tolerance, skip_compare, run-before, run-after, external sources, build_timeout, value_options). Every schema-covered file now starts with a "# yaml-language-server: $schema=..." comment, so that editors using the YAML language server (e.g., VS Code) offer autocompletion and documentation, and report mistakes while editing. The schemas are also validated against all respective files via check-jsonschema in the pre-commit hooks, and thus in the "Check style" workflow, so that malformed test definitions are caught before the system tests run. The schemas themselves are checked against the JSON Schema metaschema. Document the schemas in tests/README.md. Closes precice#403
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.
Adds JSON schemas for
tests/tests.yaml,tests/components.yaml, and themetadata.yamlfiles of the tutorials (intests/schemas/), following up on #403 and the discussion in the earlier attempt #722.tests/metadata_parser/andtests/systemtests/TestSuite.pyaccept, including optional fields (max_time,max_time_windows,timeout,tolerance,skip_compare,run-before,run-after,externalsources,build_timeout,value_options). The placeholdernonecases with an emptyrun:are allowed.# yaml-language-server: $schema=...comment, so editors using the YAML language server (e.g., VS Code) get autocompletion, hover documentation, and inline warnings.tests/README.md, including a note to extend the schema when adding options.The component templates (
tests/component-templates/) are Jinja templates and are not covered.Closes #403
Checklist
changelog-entries/<PRnumber>.md.