feat: add limits to input attributes#4063
Open
kdrienCG wants to merge 38 commits into
Open
Conversation
Will not compile due to std::optional instantiation (used by m_minValue and m_maxVavlue) for abstract types like PartitionBase
setLimits() has the same capabilities and should be the only one kept.
dkachuma
approved these changes
May 20, 2026
dkachuma
left a comment
Contributor
There was a problem hiding this comment.
I really like this idea. It will simplify greatly some of the boiler plate validation code.
Will this work for lists of numbers?
dkachuma
approved these changes
May 20, 2026
This part may be refactored, to build the range string somewhere else
MelReyCG
reviewed
Jun 22, 2026
MelReyCG
left a comment
Contributor
There was a problem hiding this comment.
Please apply this feature on at least one (maybe basic) 'Group' to demonstrate usage (array and scalar ideally).
Contributor
Author
Applied to |
MelReyCG
reviewed
Jun 23, 2026
Causes problems with getDataContext(). See src/coreComponents/dataRepository/Group.cpp:139 "In the Conduit node hierarchy everything begins with 'Problem', we should change it so that the ProblemManager actually uses the root Conduit Node but that will require a full rebaseline."
MelReyCG
requested changes
Jun 25, 2026
MelReyCG
requested changes
Jun 25, 2026
MelReyCG
approved these changes
Jun 29, 2026
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.
This PR adds the possibility to specify a min and/or a max value to
Wrappers attributes.The goal is to provide the foundations for two follow-up efforts planned in future PRs:
Usage:
This will serve as a documentation for values, but also prevents users from making typos that could lead to wrong results, taking time to find (if noticed).
The limits come with 3 modes:
The mode can be set when specifying the limit, using this syntax:
... or it will default to
Errorif unset.Limits also support inclusive and exclusive bounds:
Not using
inclusive(...)orexclusive(...)will default to an inclusive limit.When using
LimitMode::Error, the following output is produced when an input value exceeds a limit:Some examples: