From 10234beba7e838fa4889180fd2f33d922f369e56 Mon Sep 17 00:00:00 2001 From: StevenHosper Date: Fri, 18 Oct 2024 11:03:12 +0200 Subject: [PATCH 1/5] Preparing release 0.50 --- CHANGES.md | 6 ++++-- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 18b20f1..2d0b572 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,9 +1,11 @@ # Changelog for BROStar API -## 0.50 (unreleased) +## 0.50 (2024-10-18) -- Nothing changed yet. +- Added all GMW-Event templates. +- Improved GLD and GMN templates. +- Minor bugfixes. ## 0.49 (2024-09-24) diff --git a/pyproject.toml b/pyproject.toml index 4ed13e8..109f4f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ description = "Simplify data management for BRO" authors = [] license = {file = "LICENSE.txt"} readme = "README.md" -version = "0.50.dev0" +version = "0.50" [project.optional-dependencies] test = ["pytest"] # pytest added by nens-meta From f54fcc80d531778d97caddc710f10397acda7ee9 Mon Sep 17 00:00:00 2001 From: StevenHosper Date: Fri, 18 Oct 2024 13:55:54 +0200 Subject: [PATCH 2/5] Back to development: 0.51 --- CHANGES.md | 6 ++++++ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 2d0b572..3ce1eeb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Changelog for BROStar API +## 0.51 (unreleased) + + +- Nothing changed yet. + + ## 0.50 (2024-10-18) diff --git a/pyproject.toml b/pyproject.toml index 109f4f2..4ed13e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ description = "Simplify data management for BRO" authors = [] license = {file = "LICENSE.txt"} readme = "README.md" -version = "0.50" +version = "0.50.dev0" [project.optional-dependencies] test = ["pytest"] # pytest added by nens-meta From 210f0e1f3bd93a5587b91cb36d40cc0afbfce18d Mon Sep 17 00:00:00 2001 From: StevenHosper Date: Fri, 18 Oct 2024 14:05:16 +0200 Subject: [PATCH 3/5] Fix #112: Also added processReference as a dynamic option. --- api/bro_upload/templates/registration_GLD_Addition.html | 2 +- api/bro_upload/upload_datamodels.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/bro_upload/templates/registration_GLD_Addition.html b/api/bro_upload/templates/registration_GLD_Addition.html index 3d6df8a..94e8b35 100644 --- a/api/bro_upload/templates/registration_GLD_Addition.html +++ b/api/bro_upload/templates/registration_GLD_Addition.html @@ -72,7 +72,7 @@ - + diff --git a/api/bro_upload/upload_datamodels.py b/api/bro_upload/upload_datamodels.py index 13789c6..8222e8e 100644 --- a/api/bro_upload/upload_datamodels.py +++ b/api/bro_upload/upload_datamodels.py @@ -305,8 +305,6 @@ class GAR(BaseModel): # GLD - - class GLDStartregistration(BaseModel): objectIdAccountableParty: str | None = None groundwaterMonitoringNets: list[str] | None = None @@ -339,6 +337,8 @@ class GLDAddition(BaseModel): observationType: str evaluationProcedure: str measurementInstrumentType: str + processReference: str + airPressureCompensationType: str | None = None beginPosition: str endPosition: str resultTime: str From cb1f252754f620150fc8d5c1a9a2ba808f1334db Mon Sep 17 00:00:00 2001 From: StevenHosper Date: Fri, 18 Oct 2024 15:15:35 +0200 Subject: [PATCH 4/5] add airPressureCompensationType to template --- api/bro_upload/templates/registration_GLD_Addition.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/bro_upload/templates/registration_GLD_Addition.html b/api/bro_upload/templates/registration_GLD_Addition.html index 94e8b35..acde76f 100644 --- a/api/bro_upload/templates/registration_GLD_Addition.html +++ b/api/bro_upload/templates/registration_GLD_Addition.html @@ -73,6 +73,14 @@ +{% if sourcedocs_data.airPressureCompensationType %} + + + + {{ sourcedocs_data.airPressureCompensationType }} + + +{% endif %} From c6179b644e26e4f4e2c1d5c3c17de5a29d9fbe92 Mon Sep 17 00:00:00 2001 From: StevenHosper Date: Fri, 18 Oct 2024 15:15:51 +0200 Subject: [PATCH 5/5] Fix GLD-replace and delete templates --- .../templates/delete_GLD_Addition.html | 198 +++++++++--------- .../templates/replace_GLD_Addition.html | 10 +- 2 files changed, 112 insertions(+), 96 deletions(-) diff --git a/api/bro_upload/templates/delete_GLD_Addition.html b/api/bro_upload/templates/delete_GLD_Addition.html index ac0023a..2438ea5 100644 --- a/api/bro_upload/templates/delete_GLD_Addition.html +++ b/api/bro_upload/templates/delete_GLD_Addition.html @@ -1,74 +1,82 @@ - {{ metadata.requestReference }} - {{ metadata.deliveryAccountableParty }} - {{ metadata.broId }} - {{ metadata.qualityRegime }} - {{ metadata.correctionReason }} - - - - - - - - - - - - - - principalInvestigator - - - - - {{ sourcedocs_data.date }} - - - - - - - - {{ sourcedocs_data.investigatorKvk }} - - - - - - - {{ sourcedocs_data.observationType }} - - - - - - - {{ sourcedocs_data.beginPosition }} - {{ sourcedocs_data.endPosition }} - - - - - {{ sourcedocs_data.resultTime }} - - - - - - - + xmlns:wml2="http://www.opengis.net/waterml/2.0" + xmlns:gmd="http://www.isotc211.org/2005/gmd" + xmlns:gco="http://www.isotc211.org/2005/gco" + xmlns:om="http://www.opengis.net/om/2.0" + xmlns:swe="http://www.opengis.net/swe/2.0" + xmlns:brocom="http://www.broservices.nl/xsd/brocommon/3.0" + xmlns:gldcom="http://www.broservices.nl/xsd/gldcommon/1.0" + xmlns:gml="http://www.opengis.net/gml/3.2" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.broservices.nl/xsd/isgld/1.0 https://schema.broservices.nl/xsd/isgld/1.0/isgld-messages.xsd"> + {{ metadata.requestReference }} + {{ metadata.deliveryAccountableParty }} + {{ metadata.broId }} + {{ metadata.qualityRegime }} + {{ metadata.correctionReason }} + + + + + + + + + + + + + + principalInvestigator + + + + + {{ sourcedocs_data.date }} + + + + + + + + {{ sourcedocs_data.investigatorKvk }} + + + + + + + {{ sourcedocs_data.observationType }} + + + + + + + {{ sourcedocs_data.beginPosition }} + {{ sourcedocs_data.endPosition }} + + + + + {{ sourcedocs_data.resultTime }} + + + + + + + {% if sourcedocs_data.airPressureCompensationType %} + + + + {{ sourcedocs_data.airPressureCompensationType }} + + + {% endif %} + {{ sourcedocs_data.evaluationProcedure }} @@ -85,30 +93,30 @@ - + {% for tvp in sourcedocs_data.timeValuePairs %} - - - {{ tvp.time }} - {{ tvp.value }} - - - - - - {{ tvp.statusQualityControl }} - - - - - - - + + + {{ tvp.time }} + {{ tvp.value }} + + + + + + {{ tvp.statusQualityControl }} + + + + + + + {% endfor %} - - - - - - - + + + + + + + diff --git a/api/bro_upload/templates/replace_GLD_Addition.html b/api/bro_upload/templates/replace_GLD_Addition.html index 25a1133..7dd3004 100644 --- a/api/bro_upload/templates/replace_GLD_Addition.html +++ b/api/bro_upload/templates/replace_GLD_Addition.html @@ -72,7 +72,15 @@ - + +{% if sourcedocs_data.airPressureCompensationType %} + + + + {{ sourcedocs_data.airPressureCompensationType }} + + +{% endif %}