Skip to content

Commit

Permalink
Add happy path test for the EDR GeoJSON feature collection.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffrey-Vervoort-KNMI committed Mar 1, 2024
1 parent 90ce008 commit 8a3b259
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
88 changes: 88 additions & 0 deletions tests/test_data/edr-geojson-feature-collection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
5.1797,
52.0989,
1.9
]
},
"properties": {
"name": "DE BILT AWS",
"parameter-name": [
"air_temperature_1.5_maximum_PT10M",
"dew_point_temperature_1.5_mean_PT1M",
"duration_of_sunshine_2.0_point_PT0S",
"wind_speed_10_mean_PT10M"
]
},
"id": "06260"
}
],
"parameters": {
"tx_dryb_10": {
"type": "Parameter",
"description": "Temperature, air, maximum, 10",
"unit": {
"label": "degree Celsius",
"symbol": {
"value": "°C",
"type": "http://www.opengis.net/def/uom/UCUM/"
}
},
"observedProperty": {
"id": "https://vocab.nerc.ac.uk/standard_name/air_temperature",
"label": "Air temperature maximum"
}
},
"t_dewp_10": {
"type": "Parameter",
"description": "Temperature air dewpoint 10",
"unit": {
"label": "degree Celsius",
"symbol": {
"value": "°C",
"type": "http://www.opengis.net/def/uom/UCUM/"
}
},
"observedProperty": {
"id": "https://vocab.nerc.ac.uk/standard_name/dew_point_temperature",
"label": "Dew Point Temperature"
}
},
"sq_10": {
"type": "Parameter",
"description": "Sunshine duration, duration derived from radiation, 10",
"unit": {
"label": "minute",
"symbol": {
"value": "min",
"type": "http://www.opengis.net/def/uom/UCUM/"
}
},
"observedProperty": {
"id": "https://vocab.nerc.ac.uk/standard_name/duration_of_sunshine",
"label": "Sunshine duration"
}
},
"ff_10m_10": {
"type": "Parameter",
"description": "Wind, speed, average, converted to 10 metres, 10",
"unit": {
"label": "metre per second",
"symbol": {
"value": "m/s",
"type": "http://www.opengis.net/def/uom/UCUM/"
}
},
"observedProperty": {
"id": "https://vocab.nerc.ac.uk/standard_name/wind_speed",
"label": "wind_speed_10_mean_PT10M"
}
}
}
}
2 changes: 2 additions & 0 deletions tests/test_edr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from edr_pydantic.capabilities import LandingPageModel
from edr_pydantic.collections import Collections
from edr_pydantic.collections import Instance
from edr_pydantic.edr_feature_collection import EDRFeatureCollection
from edr_pydantic.unit import Unit
from pydantic import ValidationError

Expand All @@ -13,6 +14,7 @@
("doc-example-collections.json", Collections),
("simple-instance.json", Instance),
("landing-page.json", LandingPageModel),
("edr-geojson-feature-collection.json", EDRFeatureCollection),
]


Expand Down

0 comments on commit 8a3b259

Please sign in to comment.