Skip to content
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

Enforce minimum/maximum values specified in SDFormat description files (Retry PR) #303

Merged
merged 5 commits into from
Jun 25, 2020

Conversation

azeey
Copy link
Collaborator

@azeey azeey commented Jun 23, 2020

Currently, some SDFormat description files contain min and max values, but the parser does not enforce those values in any way. This PR adds a validation step in the parser that checks if scalar values are within the allowed range. Note that this PR addresses only element values, not attributes.

Toward #260.

This is a retry of #259.

azeey added 3 commits June 23, 2020 17:10
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
@azeey azeey self-assigned this Jun 23, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2020

Codecov Report

Merging #303 into sdf10 will increase coverage by 0.17%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            sdf10     #303      +/-   ##
==========================================
+ Coverage   86.66%   86.83%   +0.17%     
==========================================
  Files          59       59              
  Lines        9071     9138      +67     
==========================================
+ Hits         7861     7935      +74     
+ Misses       1210     1203       -7     
Impacted Files Coverage Δ
include/sdf/Element.hh 100.00% <ø> (ø)
include/sdf/Param.hh 72.91% <ø> (+0.57%) ⬆️
src/Element.cc 97.65% <100.00%> (+0.05%) ⬆️
src/Param.cc 93.37% <100.00%> (+1.22%) ⬆️
src/parser.cc 78.52% <100.00%> (+0.99%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7630c8f...a450b3c. Read the comment docs.

@scpeters
Copy link
Member

I would add something to the Migration guide about this, and the changelog as well

Signed-off-by: Addisu Z. Taddese <[email protected]>
@azeey azeey merged commit 83eb29e into gazebosim:sdf10 Jun 25, 2020
scpeters pushed a commit to scpeters/sdformat that referenced this pull request Jun 30, 2020
…s (Retry PR) (gazebosim#303)

Currently, some SDFormat description files contain min and max values, but the parser does not enforce those values in any way. This PR adds a validation step in the parser that checks if scalar values are within the allowed range. Note that this PR addresses only element values, not attributes.
scpeters pushed a commit to scpeters/sdformat that referenced this pull request Jun 30, 2020
…s (Retry PR) (gazebosim#303)

Currently, some SDFormat description files contain min and max values,
but the parser does not enforce those values in any way.
This PR adds a validation step in the parser that checks if scalar values
are within the allowed range.
Note that this PR addresses only element values, not attributes.

Signed-off-by: Steve Peters <[email protected]>
scpeters pushed a commit that referenced this pull request Jul 2, 2020
…s (Retry PR) (#303)

Currently, some SDFormat description files contain min and max values,
but the parser does not enforce those values in any way.
This PR adds a validation step in the parser that checks if scalar values
are within the allowed range.
Note that this PR addresses only element values, not attributes.

Signed-off-by: Steve Peters <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants