Clean up input file parsers and add system tests for JSON input files#121
Merged
mrp089 merged 8 commits intoSimVascular:masterfrom Mar 6, 2025
Merged
Clean up input file parsers and add system tests for JSON input files#121mrp089 merged 8 commits intoSimVascular:masterfrom
mrp089 merged 8 commits intoSimVascular:masterfrom
Conversation
…ariable when the model is created. This uses joint node associations defined in JSON input files. The legacy serializer behavior is preserved -- instead of using the listed joint node, we use sequential nodes from the node list to correspond to the joints. That's how createAndRunModel used to extract the node associations.
…n from legacy serializer. The output options are (for now) part of the options struct... until we can house them elsewhere. This frees the options from interactions with any global variables. (2) Updates to the json serializer: actually use node assocations now that the model will utilize them. Also include outputType and vtkOutputType until we move them.
…st_integration.py) with an option for the binary location passed to pytest. That enables simple running of pytest regardless of the particular location of the binary directory. For example: pytest Tests/SystemTests --relativeExePath="../svOneDSolver_build/bin/OneDSolver" Also: make the system tests actually execute tests in the temporary directory so that we don't have artifacts generated in whatever directory we run the tests from.
…ing JSON input files. Add documentation for the executable usage and running unit and system tests
1 task
mrp089
approved these changes
Mar 6, 2025
| pip install numpy pytest-xdist | ||
| ``` | ||
|
|
||
| With `xdist` available, run the tests in parallel (`-n <number of cores>`). |
Member
There was a problem hiding this comment.
I did not know that this was possible. Smart!!
| ('flow', 1, -1, -1, 'point', 3.9925, 1e-6), | ||
| ('flow', 2, -1, -1, 'point', 3.9925, 1e-6), | ||
| ]) | ||
| ] |
Member
There was a problem hiding this comment.
I am to blame for this mess. I opened #122 to fix that in the future.
|
|
||
| The one-dimensional equations for the flow of a Newtonian, incompressible fluid in a deforming, elastic domain consist of the continuity equation, a single axial momentum balance equation, a constitutive equation, and suitable initial and boundary conditions. | ||
|
|
||
| ## Usage |
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.
Clean up input file parsers and add system tests for JSON input files
Current situation
I'm currently working on adding JSON input file support:
#114
We added JSON input file support previously. There are a rough patches in the input file parser and there are no system tests for the JSON input files or the conversion from legacy files to JSON input files.
Release Notes
Enable joint node associations
Enable direct joint node assocations by using the jointNode options variable when the model is created. This uses joint node associations defined in JSON input files. The legacy serializer behavior is preserved -- instead of using the listed joint node, we use sequential nodes from the node list to correspond to the joints. That's how createAndRunModel used to extract the node associations.
Clean up global usage
Additional clean up of options: (1) eliminate direct global population from legacy serializer. The output options are (for now) part of the options struct... until we can house them elsewhere. This frees the options from interactions with any global variables. (2) Updates to the json serializer: actually use node assocations now that the model will utilize them. Also include outputType and vtkOutputType until we move them.
Add system tests and documentation
Add system tests for conversion to JSON input files and simulation using JSON input files. Add documentation for the executable usage and running unit and system tests
Documentation
See updated readme.md
Testing
Manually ran tests and verified tests ran in GitHub actions
Code of Conduct & Contributing Guidelines