Repository navigation
feat(schema): Validate each component on its own - #886
Merged
Merged
Conversation
- Parameter, Node and VirtualNode gain validate_reference. - VirtualNode gains validate_member and members. - validate()'s walks call them. - Four wrapping NetworkProblem variants replace ten per-rule ones. - Messages are kept, with minor wording changes.
- NodeProblem and VirtualNodeProblem gain InvalidLocalParameter. - Node::validate and VirtualNode::validate report their locals' problems. - validate() still reports each as InvalidParameter, after its node's own.
- NodeProblem and VirtualNodeProblem gain DuplicateLocalParameterName. - Node::validate and VirtualNode::validate check their locals' names. - Such a model already fails at build, as DuplicateParameterName.
- MetricSet::validate reports each literal, by its index. - validate() reports them as InvalidMetricSet. - Such a model already fails at build, as LiteralConstantOutputNotSupported.
- Node gains validate_edge_from and validate_edge_to. - validate_edge calls them, checking each end's flow before its slot.
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.
Parameter,NodeandVirtualNodegainvalidate_reference;VirtualNodegainsvalidate_memberandmembers.Nodegainsvalidate_edge_fromandvalidate_edge_to.validate()andvalidate_edge()call them.Node::validateandVirtualNode::validateinclude their local parameters.MetricSet::validate). Both reject only models that already fail at build.InvalidMember,InvalidNodeReference,InvalidVirtualNodeReference,InvalidParameterReference) replace ten per-ruleNetworkProblemvariants. Messages are kept, with minor wording changes.