Support the concept of applicable versions #202
Labels
isState:New
A new issue that needs to be classified to a type.
isType:Feature
An issue that adds new features to the project.
Milestone
Is your feature request related to a problem? Please describe.
During the implementation of the OpenDrive Checker Bundle, the following use cases arose that are currently not supported by the QC Framework
asam.net:xodr:1.7.0:junctions.connection.one_connection_element
should only be applied for OpenDrive 1.7.0 and not for OpenDrive 1.8.0 and higher. (Related topic: False positive in check_asam_xodr_junctions_connection_one_connection_element with OpenDRIVE 1.8 qc-opendrive#117)asam.net:xodr:1.7.0:junctions.connection.one_connection_element
can also be applied to OpenDrive 1.6.0.Currently, the version in which a rule can be applied is only defined by the definition setting in the rule UID, which only defines the version lower bound and does not cover the two use cases above.
Describe the solution you'd like
Introduces the concept of applicable versions, which allows the specification of additional upper bounds and alternative lower bounds for versions. The applicable versions can be defined for a specific implementation of a checker. From this discussion, an initial concept and implementation for applicable versions was introduced in the OpenDrive Checker Bundle, which can then be promoted to a framework-level concept.
Applicable Version from OpenDrive Checker Bundle
The
APPLICABLE_VERSIONS
variable can be used to define additional constraints on the versions of the input files that a rule supports, in addition to the definition setting in the rule UID. It can be specified in the same way as the Python Version Specifiers. For example:The specification consists of a series of version clauses, separated by commas. The comma is equivalent to a logical "AND" operator: a candidate version must match all given version clauses in order to match the applicable versions as a whole.
The applicable versions only supports versions of in the full semantic form
major.minor.patch
. Elision ofminor
orpatch
elements are not supported. For example,1.7.0rc1
and1.7
are not supported, but1.7.0
is supported.The applicable versions only supports the following comparison operators.
<
smaller than (upper bound)<=
smaller or equal than (upper bound)>
greater than (lower bound)>=
greater or equal than (lower bound)The definition setting in rule UID and the applicable versions together define the versions of the input file in which a rule can be applied. For example, let's consider a rule UID for ASAM OpenDRIVE
asam.net:xodr:1.6.0:*
. The definition setting in this case is1.6.0
.If no applicable versions is specified, a rule will be applied starting from the definition setting version, up to the most recent one.
APPLICABLE_VERSIONS
variable does not exist, then the rule is applied to OpenDRIVE versions 1.6.0, 1.6.1, 1.7.0, 1.8.0: the internal representation of the version specifier is>=1.6.0
.If the applicable versions is specified, and defines only upper bounds, then the definition setting defines the lower bound
APPLICABLE_VERSIONS = "<1.8.0"
, then the rule is applied to OpenDRIVE versions 1.6.0, 1.6.1, 1.7.0: the internal representation of the version specifier is>=1.6.0,<1.8.0
.If the applicable versions is specified, and defines at least one lower bound, then the definition setting is ignored. Only the lower bounds defined in the applicable versions are taken into account.
APPLICABLE_VERSIONS = ">=1.5.0"
, then the rule is applied to OpenDRIVE versions 1.5.0, 1.6.0, 1.6.1, 1.7.0, 1.8.0: the internal representation of the version specifier is>=1.5.0
.APPLICABLE_VERSIONS
asam.net:xodr:1.6.0:*
""
">=1.6.0"
asam.net:xodr:1.6.0:*
"<1.8.0"
">=1.6.0,<1.8.0"
asam.net:xodr:1.6.0:*
">=1.5.0"
">=1.5.0"
Notes
The applicable versions concept can be supported by an executor implementation of
asam-qc-baselib
in future releases.The text was updated successfully, but these errors were encountered: