-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix xmlreader allowed bool values #286
Fix xmlreader allowed bool values #286
Conversation
…values Do not allow integer values 0 or 1 as boolean values from input to prevent possible misunderstandings, e.g., in case of the shifted parameter a value of zero could be intended. Updated error message for users accordingly to help fixing input files. Signed-off-by: Christoph Niethammer <[email protected]>
Signed-off-by: Christoph Niethammer <[email protected]>
Signed-off-by: Christoph Niethammer <[email protected]>
… xml Signed-off-by: Christoph Niethammer <[email protected]>
Signed-off-by: Christoph Niethammer <[email protected]>
99c5284
to
c3d8911
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good change since it improves the readibility of the config files. However, it will probably break a lot of configuration files of the users in the beginning.
In addition, also the "documentation" in the header files should be updated, e.g. here. Is this "documentation" in the header also parsed by Doxygen?
…bool values in xml Signed-off-by: Christoph Niethammer <[email protected]>
… bool values Signed-off-by: Christoph Niethammer <[email protected]>
Thanks for the thorough review. Yes, this might cause users to update their configuration files. However, no existing functionality is removed by these changes. Also, the user will get an error message and appropriate information on what to change in his configuration file. Yes, Doxygen parses all source files as well as a few files in the doc directory for the generation of the documentation. |
Alright, thank you. We could also search for something like |
…bool values in xml Signed-off-by: Christoph Niethammer <[email protected]>
…n xml Signed-off-by: Christoph Niethammer <[email protected]>
…ter to use true/false for bool values in xml Signed-off-by: Christoph Niethammer <[email protected]>
…se true/false for bool values in xml Signed-off-by: Christoph Niethammer <[email protected]>
I checked now the codebase with the following grep command for possible issues
This has one items left that is not covered with this PR:
I thereby consider this PR as complete |
Very nice! 👍 |
Description
This is part of the work for #255 addressing the checks for the shifted parameter in the input files.
The way this is fixed here is by making the xmlreader generally more strict in parsing boolean input values.
Fix xmlreader to only accept true/false, yes/no or on/off as boolean values now
Fix examples to use false and true as boolean values in xml input files where they failed to
Fix unit tests to use false and true as boolean values in xml input files where they failed to
Added the new DropletCoalescence example to list of standard inputs to be tested
Tested running all examples in the "examples/example-list.txt" for 10 time steps
Tested running internal unit tests