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

Formal definition for Rule UID definition settings: full semantic version or not? #203

Open
MatteoRagni opened this issue Nov 8, 2024 · 1 comment
Labels
isState:New A new issue that needs to be classified to a type. isType:Question General questions about the project, work-flow or anything related to the standard
Milestone

Comments

@MatteoRagni
Copy link
Collaborator

MatteoRagni commented Nov 8, 2024

The discussion started from another PR in the OpenDRIVE checker repo. We need to load the definition setting and compare with the applicable version. Using reduced version will create a disalignment in meaning, which should be addressed.

I'm quoting the core of the discussion below:

Using RuleType we already make sure that the version is in format (\d+)(\.\d+)?(\.\d+)? (not exactly, just for the sake of the comment), thus we can easily parse with:

r = RuleType(*args)
semver.VersionInfo(*r.definition_settings.split("."))

This has a severe limitation: 1.7 is interpreted as 1.7.0. And this kind of parse, while correct from a semantic version point of view, it is incorrect from a semver specification point of view, where the comparison operator has an effect on the intended operation:

  • <2 is actually the requirement for <=1.[max].[max]
  • >2 is actually the requirement for >=3.0.0

The version in the uid is 1.7. It is referring to 1.7.0 or 1.7.[max]. There are not enough information in the uid itself to know, a convention shall be enforced.

So the discussion really pivotes on:

  • if ASAM enforces semver for all the standards than we can enforce the full semantic versioning in rule uid
  • otherwise we can forcibly set the convention that elision means minimum, thus 1.7 in uid is 1.7.0

I want to raise the question to @pmai or @AsamDiegoSanchez.

Originally posted by @MatteoRagni in asam-ev/qc-opendrive#118 (comment)

@MatteoRagni MatteoRagni added isType:Question General questions about the project, work-flow or anything related to the standard isState:New A new issue that needs to be classified to a type. labels Nov 8, 2024
@AsamDiegoSanchez
Copy link
Member

From ASAM side, we must support the use of major.minor.patch, so we would tend to use the full semantic versioning in rule uid if posible.

@AsamDiegoSanchez AsamDiegoSanchez added this to the Wish List milestone Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
isState:New A new issue that needs to be classified to a type. isType:Question General questions about the project, work-flow or anything related to the standard
Projects
None yet
Development

No branches or pull requests

2 participants