diff --git a/tests/abox/xls_pipeline_test/input/mapping/mapping_suffix.json b/tests/abox/xls_pipeline_test/input/mapping/mapping_suffix.json index 99985b2..fc166a8 100644 --- a/tests/abox/xls_pipeline_test/input/mapping/mapping_suffix.json +++ b/tests/abox/xls_pipeline_test/input/mapping/mapping_suffix.json @@ -15,6 +15,7 @@ { "iri": "https://w3id.org/steel/ProcessOntology/TimeStamp", "key": "Datum", + "suffix": "Time2", "value_location": "AD6", "worksheet": "Protokoll" }, @@ -119,7 +120,7 @@ { "iri": "https://w3id.org/steel/ProcessOntology/TestTime", "key": "Zeit", - "suffix": "Time", + "suffix": "Time1", "time_series_start": "A15", "unit_location": "A14", "worksheet": "Messdaten" diff --git a/tests/abox/xls_pipeline_test/output/output_pipeline_suffix.ttl b/tests/abox/xls_pipeline_test/output/output_pipeline_suffix.ttl index 266ec1c..a06d029 100644 --- a/tests/abox/xls_pipeline_test/output/output_pipeline_suffix.ttl +++ b/tests/abox/xls_pipeline_test/output/output_pipeline_suffix.ttl @@ -2,257 +2,158 @@ @prefix dcat: . @prefix dcterms: . @prefix fileid: . -@prefix foaf: . -@prefix ns1: . +@prefix foaf1: . @prefix qudt: . @prefix rdfs: . @prefix xsd: . -fileid:TensileTestExperiment a ns1:Activity ; - ns1:generated fileid:AbsoluteCrossheadTravel, - fileid:Extension, - fileid:Remark, - fileid:StandardForce, - fileid:TimeStamp, - fileid:dataset ; - ns1:hadPlan fileid:TestStandard ; - ns1:used fileid:DisplacementTransducer, - fileid:ForceMeasuringDevice, - fileid:TensileTestSpecimen, - fileid:TensileTestingMachine, - fileid:TestingFacility ; - ns1:wasAssociatedWith fileid:Tester ; - ns1:wasInfluencedBy fileid:ExperimentPreparation . +fileid:dataset a dcat:Dataset ; + dcterms:hasPart fileid:tableGroup ; + dcat:distribution [ a dcat:Distribution ; + dcat:accessURL "https://www.example.org/download"^^xsd:anyURI ; + dcat:mediaType "https://www.iana.org/assignments/media-types/application/vnd.ms-excel"^^xsd:anyURI ] . -fileid:TestingStandard a ns1:Plan . +fileid:AbsoluteCrossheadTravel a ; + qudt:hasUnit "http://qudt.org/vocab/unit/MilliM"^^xsd:anyURI . -fileid:ExperimentPreparation a ns1:Activity ; - ns1:atLocation fileid:TestingLab ; - ns1:generated fileid:OriginalGaugeLength, - fileid:Preload, - fileid:TestingRate ; - ns1:wasAssociatedWith fileid:DisplacementTransducer, - fileid:ForceMeasuringDevice, - fileid:TensileTestSpecimen, - fileid:TensileTestingMachine, - fileid:Tester ; - ns1:wasInfluencedBy fileid:SamplePreparatation . +fileid:Extension a ; + qudt:hasUnit "http://qudt.org/vocab/unit/MilliM"^^xsd:anyURI . fileid:MachineData a ; rdfs:label "M_1"^^xsd:string . -fileid:ParallelLength a ns1:Entity ; - ns1:wasAttributedTo fileid:TensileTestSpecimen . +fileid:Material a , + ; + rdfs:label "Werkstoff_1"^^xsd:string . + +fileid:OriginalGaugeLength a ; + qudt:hasUnit "http://qudt.org/vocab/unit/MilliM"^^xsd:anyURI ; + qudt:value 15 . fileid:PercentageElongation a ; qudt:hasUnit "http://qudt.org/vocab/unit/FRACTION"^^xsd:anyURI . -fileid:Preload a ns1:Entity ; - ns1:wasAttributedTo fileid:TensileTestingMachine . - -fileid:Project a ns1:Activity ; - ns1:generated fileid:ProjectName, - fileid:ProjectNumber ; - ns1:wasAssociatedWith fileid:TestingFacility . - -fileid:ProjectName a ns1:Entity . +fileid:ProjectNumber a ; + rdfs:label "Projekt_1"^^xsd:string . fileid:SampleIdentifier-2 a ; rdfs:label 123456 . -fileid:SamplePreparatation a ns1:Activity ; - ns1:generated fileid:ParallelLength, - fileid:SpecimenThickness, - fileid:SpecimenType, - fileid:SpecimenWidth ; - ns1:wasAssociatedWith fileid:Material, - fileid:TensileTestSpecimen ; - ns1:wasInfluencedBy fileid:Project . +fileid:SpecimenThickness a ; + qudt:hasUnit "http://qudt.org/vocab/unit/MilliM"^^xsd:anyURI ; + qudt:value "1.5"^^xsd:float . + +fileid:SpecimenType a ; + rdfs:label "Fz 10x20"^^xsd:string . -fileid:Temperature a ns1:Entity, - ; +fileid:SpecimenWidth a ; + qudt:hasUnit "http://qudt.org/vocab/unit/MilliM"^^xsd:anyURI ; + qudt:value "9.5"^^xsd:float . + +fileid:StandardForce a ; + qudt:hasUnit "http://qudt.org/vocab/unit/KiloN"^^xsd:anyURI . + +fileid:Temperature a ; qudt:hasUnit "http://qudt.org/vocab/unit/DEG_C"^^xsd:anyURI ; - qudt:value "25"^^xsd:integer ; - ns1:wasAttributedTo fileid:TestingLab . + qudt:value 25 . + +fileid:Tester a ; + rdfs:label "Fe"^^xsd:string . -fileid:Time a ; +fileid:TestingRate a ; + qudt:hasUnit "http://qudt.org/vocab/unit/MilliM-PER-SEC"^^xsd:anyURI ; + qudt:value "0.02"^^xsd:float . + +fileid:Time1 a ; qudt:hasUnit "http://qudt.org/vocab/unit/SEC"^^xsd:anyURI . +fileid:Time2 a ; + rdfs:label "2016-10-11 00:00:00"^^xsd:string . + fileid:WidthChange a ; qudt:hasUnit "http://qudt.org/vocab/unit/MilliM"^^xsd:anyURI . -fileid:dataset a dcat:Dataset, - ns1:Entity ; - dcterms:hasPart fileid:tableGroup ; - dcat:distribution [ a dcat:Distribution ; - dcat:accessURL "https://www.example.org/download/"^^xsd:anyURI ; - dcat:mediaType "https://www.iana.org/assignments/media-types/application/vnd.ms-excel"^^xsd:anyURI ] . - fileid:tableGroup a csvw:TableGroup ; csvw:table [ a csvw:Table ; + rdfs:label "Metadata" ; + csvw:row [ a csvw:Row ; + qudt:quantity fileid:Temperature ; + csvw:titles "Prüftemperatur"^^xsd:string ], + [ a csvw:Row ; + csvw:describes fileid:SampleIdentifier-2 ; + csvw:titles "Probenkennung 2"^^xsd:string ], + [ a csvw:Row ; + qudt:quantity fileid:SpecimenWidth ; + csvw:titles "Probenbreite b"^^xsd:string ], + [ a csvw:Row ; + csvw:describes fileid:Material ; + csvw:titles "Werkstoff"^^xsd:string ], + [ a csvw:Row ; + qudt:quantity fileid:SpecimenThickness ; + csvw:titles "Probendicke a"^^xsd:string ], + [ a csvw:Row ; + csvw:describes fileid:Tester ; + csvw:titles "Prüfer"^^xsd:string ], + [ a csvw:Row ; + qudt:quantity fileid:OriginalGaugeLength ; + csvw:titles "Messlänge Standardweg"^^xsd:string ], + [ a csvw:Row ; + csvw:describes fileid:MachineData ; + csvw:titles "Prüfmaschine"^^xsd:string ], + [ a csvw:Row ; + csvw:describes fileid:ProjectNumber ; + csvw:titles "Projekt"^^xsd:string ], + [ a csvw:Row ; + csvw:describes fileid:Time2 ; + csvw:titles "Datum"^^xsd:string ], + [ a csvw:Row ; + csvw:describes fileid:SpecimenType ; + csvw:titles "Probenform"^^xsd:string ], + [ a csvw:Row ; + qudt:quantity fileid:TestingRate ; + csvw:titles "Prüfgeschwindigkeit"^^xsd:string ] ], + [ a csvw:Table ; rdfs:label "Time series data" ; csvw:tableSchema [ a csvw:Schema ; csvw:column [ a csvw:Column ; + qudt:quantity fileid:StandardForce ; + csvw:titles "Standardkraft"^^xsd:string ; + foaf1:page [ a foaf1:Document ; + dcterms:format "https://www.iana.org/assignments/media-types/application/json"^^xsd:anyURI ; + dcterms:identifier "https://www.example.org/column-2"^^xsd:anyURI ; + dcterms:type "http://purl.org/dc/terms/Dataset"^^xsd:anyURI ] ], + [ a csvw:Column ; qudt:quantity fileid:WidthChange ; csvw:titles "Breitenänderung"^^xsd:string ; - foaf:page [ a foaf:Document ; + foaf1:page [ a foaf1:Document ; dcterms:format "https://www.iana.org/assignments/media-types/application/json"^^xsd:anyURI ; - dcterms:identifier "https://www.example.org/download/column-0"^^xsd:anyURI ; + dcterms:identifier "https://www.example.org/column-0"^^xsd:anyURI ; dcterms:type "http://purl.org/dc/terms/Dataset"^^xsd:anyURI ] ], [ a csvw:Column ; - qudt:quantity fileid:TestTime ; + qudt:quantity fileid:Time1 ; csvw:titles "Zeit"^^xsd:string ; - foaf:page [ a foaf:Document ; + foaf1:page [ a foaf1:Document ; dcterms:format "https://www.iana.org/assignments/media-types/application/json"^^xsd:anyURI ; - dcterms:identifier "https://www.example.org/download/column-5"^^xsd:anyURI ; + dcterms:identifier "https://www.example.org/column-5"^^xsd:anyURI ; dcterms:type "http://purl.org/dc/terms/Dataset"^^xsd:anyURI ] ], [ a csvw:Column ; - qudt:quantity fileid:PercentageElongation ; - csvw:titles "Dehnung"^^xsd:string ; - foaf:page [ a foaf:Document ; + qudt:quantity fileid:Extension ; + csvw:titles "Standardweg"^^xsd:string ; + foaf1:page [ a foaf1:Document ; dcterms:format "https://www.iana.org/assignments/media-types/application/json"^^xsd:anyURI ; - dcterms:identifier "https://www.example.org/download/column-1"^^xsd:anyURI ; + dcterms:identifier "https://www.example.org/column-3"^^xsd:anyURI ; dcterms:type "http://purl.org/dc/terms/Dataset"^^xsd:anyURI ] ], [ a csvw:Column ; - qudt:quantity fileid:StandardForce ; - csvw:titles "Standardkraft"^^xsd:string ; - foaf:page [ a foaf:Document ; + qudt:quantity fileid:PercentageElongation ; + csvw:titles "Dehnung"^^xsd:string ; + foaf1:page [ a foaf1:Document ; dcterms:format "https://www.iana.org/assignments/media-types/application/json"^^xsd:anyURI ; - dcterms:identifier "https://www.example.org/download/column-2"^^xsd:anyURI ; + dcterms:identifier "https://www.example.org/column-1"^^xsd:anyURI ; dcterms:type "http://purl.org/dc/terms/Dataset"^^xsd:anyURI ] ], [ a csvw:Column ; qudt:quantity fileid:AbsoluteCrossheadTravel ; csvw:titles "Traversenweg absolut"^^xsd:string ; - foaf:page [ a foaf:Document ; + foaf1:page [ a foaf1:Document ; dcterms:format "https://www.iana.org/assignments/media-types/application/json"^^xsd:anyURI ; - dcterms:identifier "https://www.example.org/download/column-4"^^xsd:anyURI ; - dcterms:type "http://purl.org/dc/terms/Dataset"^^xsd:anyURI ] ], - [ a csvw:Column ; - qudt:quantity fileid:Extension ; - csvw:titles "Standardweg"^^xsd:string ; - foaf:page [ a foaf:Document ; - dcterms:format "https://www.iana.org/assignments/media-types/application/json"^^xsd:anyURI ; - dcterms:identifier "https://www.example.org/download/column-3"^^xsd:anyURI ; - dcterms:type "http://purl.org/dc/terms/Dataset"^^xsd:anyURI ] ] ] ], - [ a csvw:Table ; - rdfs:label "Metadata" ; - csvw:row [ a csvw:Row ; - csvw:describes fileid:Tester ; - csvw:titles "Prüfer"^^xsd:string ], - [ a csvw:Row ; - csvw:describes fileid:SampleIdentifier-2 ; - csvw:titles "Probenkennung 2"^^xsd:string ], - [ a csvw:Row ; - qudt:quantity fileid:SpecimenThickness ; - csvw:titles "Probendicke a"^^xsd:string ], - [ a csvw:Row ; - qudt:quantity fileid:OriginalGaugeLength ; - csvw:titles "Messlänge Standardweg"^^xsd:string ], - [ a csvw:Row ; - csvw:describes fileid:ProjectNumber ; - csvw:titles "Projekt"^^xsd:string ], - [ a csvw:Row ; - qudt:quantity fileid:TestingRate ; - csvw:titles "Prüfgeschwindigkeit"^^xsd:string ], - [ a csvw:Row ; - qudt:quantity fileid:SpecimenWidth ; - csvw:titles "Probenbreite b"^^xsd:string ], - [ a csvw:Row ; - csvw:describes fileid:Material ; - csvw:titles "Werkstoff"^^xsd:string ], - [ a csvw:Row ; - csvw:describes fileid:MachineData ; - csvw:titles "Prüfmaschine"^^xsd:string ], - [ a csvw:Row ; - csvw:describes fileid:TimeStamp ; - csvw:titles "Datum"^^xsd:string ], - [ a csvw:Row ; - qudt:quantity fileid:Temperature ; - csvw:titles "Prüftemperatur"^^xsd:string ], - [ a csvw:Row ; - csvw:describes fileid:SpecimenType ; - csvw:titles "Probenform"^^xsd:string ] ] . - -fileid:AbsoluteCrossheadTravel a ns1:Entity, - ; - qudt:hasUnit "http://qudt.org/vocab/unit/MilliM"^^xsd:anyURI ; - ns1:wasDerivedFrom fileid:DisplacementTransducer . - -fileid:Extension a ns1:Entity, - ; - qudt:hasUnit "http://qudt.org/vocab/unit/MilliM"^^xsd:anyURI ; - ns1:wasDerivedFrom fileid:DisplacementTransducer . - -fileid:Material a ns1:Agent, - , - ; - rdfs:label "Werkstoff_1"^^xsd:string . - -fileid:OriginalGaugeLength a ns1:Entity, - ; - qudt:hasUnit "http://qudt.org/vocab/unit/MilliM"^^xsd:anyURI ; - qudt:value "15"^^xsd:integer ; - ns1:wasAttributedTo fileid:DisplacementTransducer . - -fileid:ProjectNumber a ns1:Entity, - ; - rdfs:label "Projekt_1"^^xsd:string . - -fileid:SpecimenThickness a ns1:Entity, - ; - qudt:hasUnit "http://qudt.org/vocab/unit/MilliM"^^xsd:anyURI ; - qudt:value "1.5"^^xsd:float ; - ns1:wasAttributedTo fileid:TensileTestSpecimen . - -fileid:SpecimenType a ns1:Entity, - ; - rdfs:label "Fz 10x20"^^xsd:string ; - ns1:wasAttributedTo fileid:TensileTestSpecimen . - -fileid:SpecimenWidth a ns1:Entity, - ; - qudt:hasUnit "http://qudt.org/vocab/unit/MilliM"^^xsd:anyURI ; - qudt:value "9.5"^^xsd:float ; - ns1:wasAttributedTo fileid:TensileTestSpecimen . - -fileid:StandardForce a ns1:Entity, - ; - qudt:hasUnit "http://qudt.org/vocab/unit/KiloN"^^xsd:anyURI ; - ns1:wasDerivedFrom fileid:ForceMeasuringDevice . - -fileid:TestingRate a ns1:Entity, - ; - qudt:hasUnit "http://qudt.org/vocab/unit/MilliM-PER-SEC"^^xsd:anyURI ; - qudt:value "0.02"^^xsd:float ; - ns1:wasAttributedTo fileid:TensileTestingMachine . - -fileid:TimeStamp a ; - rdfs:label "2016-10-11 00:00:00"^^xsd:string . - -fileid:ForceMeasuringDevice a ns1:Agent, - ns1:Entity ; - ns1:atLocation fileid:TestingLab . - -fileid:Tester a ns1:Agent, - ; - rdfs:label "Fe"^^xsd:string ; - ns1:actedOnBehalfOf fileid:TestingFacility ; - ns1:atLocation fileid:TestingLab . - -fileid:TensileTestingMachine a ns1:Agent, - ns1:Entity ; - ns1:atLocation fileid:TestingLab . - -fileid:TestingFacility a ns1:Location, - ns1:Organization . - -fileid:DisplacementTransducer a ns1:Agent, - ns1:Entity ; - ns1:atLocation fileid:TestingLab . - -fileid:TestingLab a ns1:Agent, - ns1:Location ; - ns1:atLocation fileid:TestingFacility . - -fileid:TensileTestSpecimen a ns1:Agent, - ns1:Entity . + dcterms:identifier "https://www.example.org/column-4"^^xsd:anyURI ; + dcterms:type "http://purl.org/dc/terms/Dataset"^^xsd:anyURI ] ] ] ] . diff --git a/tests/abox/xls_pipeline_test/test_pipeline.py b/tests/abox/xls_pipeline_test/test_pipeline.py index 5a697f2..c026dd7 100644 --- a/tests/abox/xls_pipeline_test/test_pipeline.py +++ b/tests/abox/xls_pipeline_test/test_pipeline.py @@ -310,7 +310,6 @@ def test_excel_pipeline_suffix() -> None: raw_data=raw_data, mapping=os.path.join(mapping_folder, "mapping_suffix.json"), parser=Parser.excel, - additional_triples=template, parser_args={"dropna": True, "unit_from_macro": True}, )