From d8e551d5a088557cc7c5f4030c4550f491269b17 Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Fri, 7 Jul 2023 14:58:27 -0600 Subject: [PATCH 1/2] Remove Arctic Char layer Resolves #599 --- CHANGELOG.md | 5 ++ qgreenland/config/cfg-lock.json | 81 ------------------- qgreenland/config/datasets/caff.py | 29 ------- .../config/layers/Biology/Fish/caff_char.py | 44 ---------- 4 files changed, 5 insertions(+), 154 deletions(-) delete mode 100644 qgreenland/config/layers/Biology/Fish/caff_char.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 1453eed9..60e666c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# NEXT_RELEASE + +* Remove "Biology/Fish/Arctic Char" layer + + # v3.0.0alpha3 (2023-07-05) - Remove Humanitarian Open Street Map (HOTOSM) layers ("Places/Community map diff --git a/qgreenland/config/cfg-lock.json b/qgreenland/config/cfg-lock.json index 5571cada..a552f031 100644 --- a/qgreenland/config/cfg-lock.json +++ b/qgreenland/config/cfg-lock.json @@ -197,26 +197,6 @@ "title": "IceBridge BedMachine Greenland, Version 5" } }, - "caff_char": { - "assets": { - "only": { - "id": "only", - "urls": [ - "http://geo.abds.is/geonetwork/srv/api/records/4dc7f9b6-b553-445a-a8a3-a0ece574e8ce/attachments/Arctic_Char_2010.zip" - ], - "verify_tls": true - } - }, - "id": "caff_char", - "metadata": { - "abstract": "Circumpolar distribution of Arctic Char species complex\nSalvelinus alpinus, and related species. Arctic Biodiversity\nAssessment, Chapter 6: Fishes: http://www.caff.is/assessment-series/\n10-arctic-biodiversity-assessment/211-arctic-biodiversity-assessment\n-2013-chapter-6-fishes.", - "citation": { - "text": "Conservation of Arctic Flora and Fauna (CAFF www.caff.is)\nworking group of the Arctic Council", - "url": "http://geo.abds.is/geonetwork/srv/eng/catalog.search#/metadata/4dc7f9b6-b553-445a-a8a3-a0ece574e8ce" - }, - "title": "Circumpolar distribution of arctic char species complex Salvelinus alpinus, and related species" - } - }, "caff_murre_colonies": { "assets": { "only": { @@ -4143,67 +4123,6 @@ "show": false } }, - { - "children": [ - { - "layer_cfg": { - "description": "Polygons indicating the 2010 distribution of Arctic Char\npopulations.", - "id": "caff_char", - "in_package": true, - "input": { - "asset": { - "id": "only" - }, - "dataset": { - "id": "caff_char" - } - }, - "show": false, - "steps": [ - { - "args": [ - "unzip", - "{input_dir}/Arctic_Char_2010.zip", - "-d", - "{output_dir}", - "" - ], - "type": "command" - }, - { - "args": [ - "ogr2ogr", - "-lco", - "ENCODING=UTF-8", - "-t_srs", - "EPSG:3413", - "-clipdst", - "{assets_dir}/latitude_shape_40_degrees.geojson", - "-makevalid", - "-dialect", - "sqlite", - "-sql", - "'SELECT\n Geometry,\n SPECIES,\n INTRODUCED,\n OWNER,\n DATA_URL,\n SOURCE,\n CREATED,\n DATE(substr(MODIFIED, 7, 4) || \"-\" ||\n substr(MODIFIED, 4, 2) || \"-\" ||\n substr(MODIFIED, 1, 2)) as MODIFIED,\n CONTACT\n FROM Arctic_Char_2010'", - "{output_dir}/final.gpkg", - "{input_dir}/*.shp" - ], - "type": "command" - } - ], - "style": "semitransparent_polygon", - "tags": [], - "title": "Arctic Char populations 2010" - }, - "name": "caff_char" - } - ], - "name": "Fish", - "settings": { - "expand": false, - "order": null, - "show": false - } - }, { "children": [ { diff --git a/qgreenland/config/datasets/caff.py b/qgreenland/config/datasets/caff.py index dadddb12..a781a207 100644 --- a/qgreenland/config/datasets/caff.py +++ b/qgreenland/config/datasets/caff.py @@ -36,32 +36,3 @@ }, }, ) - -caff_char = Dataset( - id="caff_char", - assets=[ - HttpAsset( - id="only", - urls=[ - "http://geo.abds.is/geonetwork/srv/api/records/4dc7f9b6-b553-445a-a8a3-a0ece574e8ce/attachments/Arctic_Char_2010.zip", - ], - ), - ], - metadata={ - "title": "Circumpolar distribution of arctic char species complex Salvelinus alpinus, and related species", - "abstract": ( - """Circumpolar distribution of Arctic Char species complex - Salvelinus alpinus, and related species. Arctic Biodiversity - Assessment, Chapter 6: Fishes: http://www.caff.is/assessment-series/ - 10-arctic-biodiversity-assessment/211-arctic-biodiversity-assessment - -2013-chapter-6-fishes.""" - ), - "citation": { - "text": ( - """Conservation of Arctic Flora and Fauna (CAFF www.caff.is) - working group of the Arctic Council""" - ), - "url": "http://geo.abds.is/geonetwork/srv/eng/catalog.search#/metadata/4dc7f9b6-b553-445a-a8a3-a0ece574e8ce", - }, - }, -) diff --git a/qgreenland/config/layers/Biology/Fish/caff_char.py b/qgreenland/config/layers/Biology/Fish/caff_char.py deleted file mode 100644 index 5fed7ad6..00000000 --- a/qgreenland/config/layers/Biology/Fish/caff_char.py +++ /dev/null @@ -1,44 +0,0 @@ -from qgreenland.config.datasets.caff import caff_char as dataset -from qgreenland.config.helpers.steps.compressed_vector import compressed_vector -from qgreenland.models.config.layer import Layer, LayerInput - -caff_char = Layer( - id="caff_char", - title="Arctic Char populations 2010", - description=( - """Polygons indicating the 2010 distribution of Arctic Char - populations.""" - ), - tags=[], - style="semitransparent_polygon", - input=LayerInput( - dataset=dataset, - asset=dataset.assets["only"], - ), - steps=[ - *compressed_vector( - input_file="{input_dir}/Arctic_Char_2010.zip", - output_file="{output_dir}/final.gpkg", - ogr2ogr_args=( - "-dialect", - "sqlite", - "-sql", - ( - """'SELECT - Geometry, - SPECIES, - INTRODUCED, - OWNER, - DATA_URL, - SOURCE, - CREATED, - DATE(substr(MODIFIED, 7, 4) || "-" || - substr(MODIFIED, 4, 2) || "-" || - substr(MODIFIED, 1, 2)) as MODIFIED, - CONTACT - FROM Arctic_Char_2010'""" - ), - ), - ), - ], -) From 529b5cf7d8e452a1d3aaeb0a8ca3b814d9f00950 Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Fri, 7 Jul 2023 15:20:27 -0600 Subject: [PATCH 2/2] Exclude pydantic v2 Note: autodoc-pydantic has a similar pin on the main branch, but it hasn't been released with this change yet. https://github.com/mansenfranzen/autodoc_pydantic/commit/1b61fed303d56f5b82b5bae9d53a1969a3446394 --- doc/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/requirements.txt b/doc/requirements.txt index 567bb017..139c0237 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,6 +1,7 @@ # Only for use by ReadTheDocs build system myst-parser==0.15.2 autodoc-pydantic ~=1.5.1 +pydantic <2.0.0a0 sphinx-click==3.0.1 sphinx-selective-exclude ~=1.0.3