Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions artifacts/openlabel-v2/openlabel-v2.owl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4462,6 +4462,14 @@ openlabel_v2:Odd a owl:Class,
owl:onProperty openlabel_v2:illuminationCloudinessValue ;
owl:someValuesFrom xsd:string ] openlabel_v2:Odd ) .

[] rdfs:subClassOf [ a owl:Restriction ;
owl:onProperty openlabel_v2:DrivableAreaEdge ;
owl:someValuesFrom xsd:string ] ;
owl:intersectionOf ( [ a owl:Restriction ;
owl:onProperty openlabel_v2:DrivableAreaEdge ;
owl:someValuesFrom [ a rdfs:Datatype ;
owl:oneOf ( "EdgeNone" ) ] ] openlabel_v2:Odd ) .

[] rdfs:subClassOf [ a owl:Restriction ;
owl:onProperty openlabel_v2:LongitudinalDownSlope ;
owl:someValuesFrom [ a rdfs:Datatype ;
Expand Down Expand Up @@ -4489,13 +4497,6 @@ openlabel_v2:Odd a owl:Class,
owl:onProperty openlabel_v2:particulatesWaterValue ;
owl:someValuesFrom xsd:string ] openlabel_v2:Odd ) .

[] rdfs:subClassOf [ a owl:Restriction ;
owl:onProperty openlabel_v2:DrivableAreaEdge ;
owl:someValuesFrom xsd:string ] ;
owl:intersectionOf ( [ a owl:Restriction ;
owl:onProperty openlabel_v2:DrivableAreaEdge ;
owl:someValuesFrom xsd:string ] openlabel_v2:Odd ) .

[] rdfs:subClassOf [ a owl:Restriction ;
owl:onProperty openlabel_v2:LongitudinalUpSlope ;
owl:someValuesFrom [ a rdfs:Datatype ;
Expand Down
158 changes: 79 additions & 79 deletions artifacts/openlabel-v2/openlabel-v2.shacl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -1614,32 +1614,32 @@ openlabel_v2:Behaviour a sh:NodeShape ;
sh:order 1 ;
sh:path openlabel_v2:MotionAccelerate ] ;
sh:sparql [ a sh:SPARQLConstraint ;
sh:message "If motionDriveValue is provided, MotionDrive must be true."@en ;
sh:message "If motionAccelerateValue is provided, MotionAccelerate must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/MotionDrive> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/motionDriveValue> ?value . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/MotionAccelerate> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/motionAccelerateValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If motionDecelerateValue is provided, MotionDecelerate must be true."@en ;
sh:message "If motionDecelerateValue is provided, MotionDecelerate must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/MotionDecelerate> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/motionDecelerateValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If motionAccelerateValue is provided, MotionAccelerate must be true."@en ;
sh:message "If motionDriveValue is provided, MotionDrive must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/MotionAccelerate> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/motionAccelerateValue> ?value . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/MotionDrive> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/motionDriveValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ] ;
Expand Down Expand Up @@ -2073,169 +2073,169 @@ openlabel_v2:Odd a sh:NodeShape ;
sh:order 15 ;
sh:path openlabel_v2:IlluminationArtificial ] ;
sh:sparql [ a sh:SPARQLConstraint ;
sh:message "If weatherRainValue is provided, WeatherRain must be true."@en ;
sh:message "If subjectVehicleSpeedValue is provided, SubjectVehicleSpeed must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/WeatherRain> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/weatherRainValue> ?value . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/SubjectVehicleSpeed> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/subjectVehicleSpeedValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If longitudinalUpSlopeValue is provided, LongitudinalUpSlope must be true."@en ;
sh:message "If daySunElevationValue is provided, DaySunElevation must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/LongitudinalUpSlope> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/longitudinalUpSlopeValue> ?value . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/DaySunElevation> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/daySunElevationValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "EdgeNone is mutually exclusive with other drivable area edge types. If DrivableAreaEdge includes EdgeNone, no other edge values are allowed."@en ;
sh:select """SELECT $this WHERE {
$this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/DrivableAreaEdge> <https://w3id.org/ascs-ev/envited-x/openlabel/v2/EdgeNone> .
$this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/DrivableAreaEdge> ?other .
FILTER (?other != <https://w3id.org/ascs-ev/envited-x/openlabel/v2/EdgeNone>)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If horizontalCurvesValue is provided, HorizontalCurves must be true."@en ;
sh:message "If longitudinalUpSlopeValue is provided, LongitudinalUpSlope must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/HorizontalCurves> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/horizontalCurvesValue> ?value . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/LongitudinalUpSlope> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/longitudinalUpSlopeValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If trafficAgentTypeValue is provided, TrafficAgentType must be true."@en ;
sh:message "If trafficAgentTypeValue is provided, TrafficAgentType must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/TrafficAgentType> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/trafficAgentTypeValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If weatherSnowValue is provided, WeatherSnow must be true."@en ;
sh:message "If horizontalCurvesValue is provided, HorizontalCurves must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/WeatherSnow> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/weatherSnowValue> ?value . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/HorizontalCurves> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/horizontalCurvesValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If daySunElevationValue is provided, DaySunElevation must be true."@en ;
sh:message "If trafficVolumeValue is provided, TrafficVolume must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/DaySunElevation> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/daySunElevationValue> ?value . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/TrafficVolume> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/trafficVolumeValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If laneSpecificationLaneCountValue is provided, LaneSpecificationLaneCount must be true."@en ;
sh:message "EdgeNone is mutually exclusive with other drivable area edge types. If DrivableAreaEdge includes EdgeNone, no other edge values are allowed." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/LaneSpecificationLaneCount> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/laneSpecificationLaneCountValue> ?value . }
$this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/DrivableAreaEdge> <https://w3id.org/ascs-ev/envited-x/openlabel/v2/EdgeNone> .
$this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/DrivableAreaEdge> ?other .
FILTER (?other != <https://w3id.org/ascs-ev/envited-x/openlabel/v2/EdgeNone>)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If laneSpecificationDimensionsValue is provided, LaneSpecificationDimensions must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/LaneSpecificationDimensions> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/laneSpecificationDimensionsValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If subjectVehicleSpeedValue is provided, SubjectVehicleSpeed must be true."@en ;
sh:message "If particulatesWaterValue is provided, ParticulatesWater must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/SubjectVehicleSpeed> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/subjectVehicleSpeedValue> ?value . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/ParticulatesWater> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/particulatesWaterValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If particulatesWaterValue is provided, ParticulatesWater must be true."@en ;
sh:message "If weatherRainValue is provided, WeatherRain must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/ParticulatesWater> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/particulatesWaterValue> ?value . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/WeatherRain> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/weatherRainValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If weatherWindValue is provided, WeatherWind must be true."@en ;
sh:message "If weatherSnowValue is provided, WeatherSnow must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/WeatherWind> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/weatherWindValue> ?value . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/WeatherSnow> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/weatherSnowValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If longitudinalDownSlopeValue is provided, LongitudinalDownSlope must be true."@en ;
sh:message "If trafficFlowRateValue is provided, TrafficFlowRate must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/LongitudinalDownSlope> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/longitudinalDownSlopeValue> ?value . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/TrafficFlowRate> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/trafficFlowRateValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If trafficAgentDensityValue is provided, TrafficAgentDensity must be true."@en ;
sh:message "If weatherWindValue is provided, WeatherWind must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/TrafficAgentDensity> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/trafficAgentDensityValue> ?value . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/WeatherWind> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/weatherWindValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If laneSpecificationDimensionsValue is provided, LaneSpecificationDimensions must be true."@en ;
sh:message "If laneSpecificationLaneCountValue is provided, LaneSpecificationLaneCount must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/LaneSpecificationDimensions> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/laneSpecificationDimensionsValue> ?value . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/LaneSpecificationLaneCount> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/laneSpecificationLaneCountValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If trafficFlowRateValue is provided, TrafficFlowRate must be true."@en ;
sh:message "If illuminationCloudinessValue is provided, IlluminationCloudiness must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/TrafficFlowRate> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/trafficFlowRateValue> ?value . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/IlluminationCloudiness> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/illuminationCloudinessValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If trafficVolumeValue is provided, TrafficVolume must be true."@en ;
sh:message "If longitudinalDownSlopeValue is provided, LongitudinalDownSlope must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/TrafficVolume> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/trafficVolumeValue> ?value . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/LongitudinalDownSlope> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/longitudinalDownSlopeValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ],
[ a sh:SPARQLConstraint ;
sh:message "If illuminationCloudinessValue is provided, IlluminationCloudiness must be true."@en ;
sh:message "If trafficAgentDensityValue is provided, TrafficAgentDensity must be true." ;
sh:select """SELECT $this WHERE {
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/IlluminationCloudiness> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/illuminationCloudinessValue> ?value . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/TrafficAgentDensity> ?flag . }
OPTIONAL { $this <https://w3id.org/ascs-ev/envited-x/openlabel/v2/trafficAgentDensityValue> ?value . }
FILTER (
( !BOUND(?flag) || str(?flag) != "true" ) &&
( !BOUND(?flag) || ?flag != true ) &&
BOUND(?value)
)
}""" ] ;
Expand Down
20 changes: 15 additions & 5 deletions src/tools/utils/registry_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ def add_temporary_test_entries(
# File is outside repo, use absolute path
rel_path = file_path

test_id = f"temporary:{domain}:file{i:03d}"
test_id = f"temporary:{domain}:{test_type}:file{i:03d}"
self._catalog[test_id] = {
"path": str(rel_path),
"domain": domain,
Expand Down Expand Up @@ -838,10 +838,20 @@ def create_temporary_domain(self, paths: List[Path | str]) -> Optional[str]:
).hexdigest()[:8]
temp_domain = f"{TEMP_DOMAIN_PREFIX}{path_hash}"

# Add temporary entries to catalog
self.add_temporary_test_entries(
temp_domain, unique_file_paths, test_type="valid"
)
# Add temporary entries to catalog, classifying each file by the name of
# its parent directory. This lets externally-supplied negative fixtures be
# exercised by `check-failing-tests` in data-paths mode: files under an
# ``invalid`` directory are registered as ``invalid`` test-data (matching
# OMB's own ``tests/data/{domain}/{valid,invalid}/`` convention); every
# other file is registered as ``valid``.
invalid_files = [p for p in unique_file_paths if p.parent.name == "invalid"]
valid_files = [p for p in unique_file_paths if p.parent.name != "invalid"]
if valid_files:
self.add_temporary_test_entries(temp_domain, valid_files, test_type="valid")
if invalid_files:
self.add_temporary_test_entries(
temp_domain, invalid_files, test_type="invalid"
)

print(
f"📋 Created temporary domain '{temp_domain}' with {len(unique_file_paths)} file(s)",
Expand Down
Loading
Loading