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

Fix negative xsd range edge cases #178

Merged
merged 2 commits into from
Dec 6, 2023
Merged

Conversation

mhrimaz
Copy link
Contributor

@mhrimaz mhrimaz commented Nov 30, 2023

The current implementation use the abs function to check the value be inside the range. But the range is not symetric for example byte is between [-128,127] the value of ·maxInclusive· to be 127 and ·minInclusive· to be -128`

@mhrimaz mhrimaz changed the title Fix negativ xsd range edge cases Fix negative xsd range edge cases Dec 1, 2023
Copy link
Contributor

@jkhsjdhjs jkhsjdhjs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍, thanks for extending the unittests!

@s-heppner can you approve the workflows?

@s-heppner s-heppner merged commit 7369d2e into eclipse-basyx:main Dec 6, 2023
6 checks passed
@s-heppner
Copy link
Contributor

Thank you very much for your contribution!
I just merged this PR it into main.

jkhsjdhjs pushed a commit to rwth-iat/basyx-python-sdk that referenced this pull request Dec 7, 2023
The current implementation uses the `abs()` function to check
that the value is inside the range.
However, the range is not symmetric.
For example, for a [byte](https://www.w3.org/TR/xmlschema11-2/#byte),
which is between [-128, 127],
the value of
[maxInclusive](https://www.w3.org/TR/xmlschema11-2/#dt-maxInclusive)
should be 127,
and [minInclusive](https://www.w3.org/TR/xmlschema11-2/#dt-minInclusive)
 should be -128.
s-heppner pushed a commit that referenced this pull request Dec 11, 2023
The current implementation uses the `abs()` function to check
that the value is inside the range.
However, the range is not symmetric.
For example, for a [byte](https://www.w3.org/TR/xmlschema11-2/#byte),
which is between [-128, 127],
the value of
[maxInclusive](https://www.w3.org/TR/xmlschema11-2/#dt-maxInclusive)
should be 127,
and [minInclusive](https://www.w3.org/TR/xmlschema11-2/#dt-minInclusive)
 should be -128.
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