Skip to content

Commit

Permalink
move measurement unit to snake case
Browse files Browse the repository at this point in the history
  • Loading branch information
MBueschelberger committed Dec 18, 2024
1 parent 34d4bed commit 2f46979
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion data2rdf/parsers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def to_dict(
}
if hasattr(metadatum, "measurement_unit"):
prop[
"measurementUnit"
"measurement_unit"
] = metadatum.measurement_unit.model_dump(exclude={"config"})
metadata.append(prop)
if dsms_schema:
Expand Down
14 changes: 7 additions & 7 deletions tests/abox/csv_pipeline_test/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
},
{
"label": "OriginalGaugeLength",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -85,7 +85,7 @@
},
{
"label": "ParallelLength",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -95,7 +95,7 @@
},
{
"label": "SpecimenThickness",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -105,7 +105,7 @@
},
{
"label": "SpecimenWidth",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -115,7 +115,7 @@
},
{
"label": "TestingRate",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM-PER-SEC",
"label": "Millimetre per Second",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -125,7 +125,7 @@
},
{
"label": "Preload",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MegaPA",
"label": "Megapascal",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -135,7 +135,7 @@
},
{
"label": "Temperature",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/DEG_C",
"label": "degree Celsius",
"namespace": "http://qudt.org/vocab/unit",
Expand Down
14 changes: 7 additions & 7 deletions tests/abox/csv_pipeline_test/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
},
{
"label": "OriginalGaugeLength",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -88,7 +88,7 @@
},
{
"label": "ParallelLength",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -98,7 +98,7 @@
},
{
"label": "SpecimenThickness",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -108,7 +108,7 @@
},
{
"label": "SpecimenWidth",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -118,7 +118,7 @@
},
{
"label": "TestingRate",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM-PER-SEC",
"label": "Millimetre per Second",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -128,7 +128,7 @@
},
{
"label": "Preload",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MegaPA",
"label": "Megapascal",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -138,7 +138,7 @@
},
{
"label": "Temperature",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/DEG_C",
"label": "degree Celsius",
"namespace": "http://qudt.org/vocab/unit",
Expand Down
2 changes: 1 addition & 1 deletion tests/abox/json_pipeline_test/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
{
"label": "WidthChange",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand Down
2 changes: 1 addition & 1 deletion tests/abox/json_pipeline_test/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
{
"label": "WidthChange",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand Down
10 changes: 5 additions & 5 deletions tests/abox/xls_pipeline_test/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
{
"label": "OriginalGaugeLength",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -35,7 +35,7 @@
},
{
"label": "SpecimenWidth",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -45,7 +45,7 @@
},
{
"label": "SpecimenThickness",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -71,7 +71,7 @@
},
{
"label": "TestingRate",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM-PER-SEC",
"label": "Millimetre per Second",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -85,7 +85,7 @@
},
{
"label": "Temperature",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/DEG_C",
"label": "degree Celsius",
"namespace": "http://qudt.org/vocab/unit",
Expand Down
20 changes: 10 additions & 10 deletions tests/abox/xls_pipeline_test/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
{
"label": "OriginalGaugeLength",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -40,7 +40,7 @@
},
{
"label": "SpecimenWidth",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -50,7 +50,7 @@
},
{
"label": "SpecimenThickness",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -76,7 +76,7 @@
},
{
"label": "TestingRate",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM-PER-SEC",
"label": "Millimetre per Second",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -90,7 +90,7 @@
},
{
"label": "Temperature",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/DEG_C",
"label": "degree Celsius",
"namespace": "http://qudt.org/vocab/unit",
Expand Down Expand Up @@ -118,7 +118,7 @@
},
{
"label": "OriginalGaugeLength",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -128,7 +128,7 @@
},
{
"label": "SpecimenWidth",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -138,7 +138,7 @@
},
{
"label": "SpecimenThickness",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM",
"label": "Millimetre",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -164,7 +164,7 @@
},
{
"label": "TestingRate",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/MilliM-PER-SEC",
"label": "Millimetre per Second",
"namespace": "http://qudt.org/vocab/unit",
Expand All @@ -178,7 +178,7 @@
},
{
"label": "Temperature",
"measurementUnit": {
"measurement_unit": {
"iri": "http://qudt.org/vocab/unit/DEG_C",
"label": "degree Celsius",
"namespace": "http://qudt.org/vocab/unit",
Expand Down

0 comments on commit 2f46979

Please sign in to comment.