Add support for Json format input files #118
Merged
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.
Add support for Json format input files
Current situation
We have discussed adding support for JSON input files here:
Add support for JSON input files
Currently, we have unit tests for the existing legacy format *.in to lock down that behavior, and system tests that also use *.in input files.
Release Notes
This change adds support for a V0 for JSON input files and associated unit tests.
The legacy behavior of the existing executable program is preserved: a single input argument will be interpreted as a legacy input *.in file, and execute as before. If input argument flags are provided, the new behavior will be utilized as per the description in main.cxx:
Preserved legacy behavior:
./svOneDSolver inputFilename.inUpdated behavior:
Parse input args as:
-argName argValue -anotherArg anotherValueCurrent options:
-jsonInput inputFilename-legacyToJson legacyInput.in jsonInput.jsonDocumentation
Documentation will be forthcoming in a follow-up submission once the input argument interfaces and JSON input files have been verified in the system tests.
Testing
Unit tests have been added for the JSON serialize/deserializer.
The existing system tests and unit tests cover the existing behavior and legacy input files.
No testing (including manual testing) has been done for the new input args. This will be managed in a subsequent submission which will add system tests that utilize the input args using equivalent JSON files for each of the existing system tests.
Next up
Other follow-up
Reviewers
@mrp089 @ktbolt
Code of Conduct & Contributing Guidelines