Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add access date to Natural Earth citations #745

Merged
merged 6 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3.4"
services:

luigi:
image: "nsidc/luigi:dev"
image: "nsidc/qgreenland:dev"
build: "."
volumes:
# Code
Expand Down
112 changes: 8 additions & 104 deletions environments/main/conda-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1760,18 +1760,6 @@ package:
sha256: 711602276ae39276cb0faaca6fd0ac851fff0ca17151917569174841ef830bbd
category: main
optional: false
- name: bump2version
version: 1.0.1
manager: conda
platform: linux-64
dependencies:
python: ''
url: https://conda.anaconda.org/conda-forge/noarch/bump2version-1.0.1-pyh9f0ad1d_0.tar.bz2
hash:
md5: 1b3fd56f54baa99e3c9967caf279f66f
sha256: c3cf2e47b0aee001025ad29061222b552a60362ec9febd355c5eb4d3a06beef8
category: main
optional: false
- name: cachy
version: 0.3.0
manager: conda
Expand Down Expand Up @@ -2641,15 +2629,15 @@ package:
category: main
optional: false
- name: setuptools
version: 68.0.0
version: 68.1.2
manager: conda
platform: linux-64
dependencies:
python: '>=3.7'
url: https://conda.anaconda.org/conda-forge/noarch/setuptools-68.0.0-pyhd8ed1ab_0.conda
url: https://conda.anaconda.org/conda-forge/noarch/setuptools-68.1.2-pyhd8ed1ab_0.conda
hash:
md5: 5a7739d0f57ee64133c9d32e6507c46d
sha256: 083a0913f5b56644051f31ac40b4eeea762a88c00aa12437817191b85a753cec
md5: 4fe12573bf499ff85a0a364e00cc5c53
sha256: dc5a777597e05ceddefc87d2f96389b7ae0afb097e558307af83a453db3e3887
category: main
optional: false
- name: six
Expand Down Expand Up @@ -2763,17 +2751,17 @@ package:
category: main
optional: false
- name: tornado
version: 6.3.2
version: 6.3.3
manager: conda
platform: linux-64
dependencies:
libgcc-ng: '>=12'
python: '>=3.10,<3.11.0a0'
python_abi: 3.10.*
url: https://conda.anaconda.org/conda-forge/linux-64/tornado-6.3.2-py310h2372a71_0.conda
url: https://conda.anaconda.org/conda-forge/linux-64/tornado-6.3.3-py310h2372a71_0.conda
hash:
md5: 1c510e74c87dc9b8fe1f7f9e8dbcef96
sha256: 56bcfc59da0f6fc78afe79447b8b1327e9149a52c9dc6ee805ac73bf18ac22b6
md5: dfb49d3ac440e1a236080f9c300e642f
sha256: 38d517c89f79f3ff0d8f3f1ce46218e0f8e3a3fea743e7f3661eb913919aa94e
category: main
optional: false
- name: traitlets
Expand Down Expand Up @@ -4995,16 +4983,6 @@ package:
sha256: 4117022ed18bce8852389885decbf26519d016a8926a0dc21923f77789d64455
category: main
optional: false
- name: mdurl
version: 0.1.2
manager: pip
platform: linux-64
dependencies: {}
url: https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl
hash:
sha256: 84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8
category: main
optional: false
- name: sphinx-selective-exclude
version: 1.0.3
manager: pip
Expand All @@ -5015,77 +4993,3 @@ package:
sha256: 76fc8fd7c24311e0ca2199a9e4db2156585acd7652a5cead98b07ef4f70f9b78
category: main
optional: false
- name: autodoc-pydantic
version: 1.5.1
manager: pip
platform: linux-64
dependencies:
sphinx: '>=3.4'
pydantic: '>=1.5'
url: https://files.pythonhosted.org/packages/bd/4c/5e3bedc712d5eabc7dc085caf009793c18902906ee3afd991ece56f5a2fb/autodoc_pydantic-1.5.1-py3-none-any.whl
hash:
sha256: d42e9e9432acbda2db82a37669995c7d068f66d06d1d8aefdc8ee8c5ef3f4f59
category: main
optional: false
- name: markdown-it-py
version: 3.0.0
manager: pip
platform: linux-64
dependencies:
mdurl: '>=0.1,<1.0'
url: https://files.pythonhosted.org/packages/42/d7/1ec15b46af6af88f19b8e5ffea08fa375d433c998b8a7639e76935c14f1f/markdown_it_py-3.0.0-py3-none-any.whl
hash:
sha256: 355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1
category: main
optional: false
- name: sphinx-rtd-theme
version: 1.0.0
manager: pip
platform: linux-64
dependencies:
sphinx: '>=1.6'
docutils: <0.18
url: https://files.pythonhosted.org/packages/e0/d2/3818e4730e314719e27f639c44164419e40eed826d63753dc480262036e8/sphinx_rtd_theme-1.0.0-py2.py3-none-any.whl
hash:
sha256: 4d35a56f4508cfee4c4fb604373ede6feae2a306731d533f409ef5c3496fdbd8
category: main
optional: false
- name: rich
version: 13.5.2
manager: pip
platform: linux-64
dependencies:
pygments: '>=2.13.0,<3.0.0'
markdown-it-py: '>=2.2.0'
url: https://files.pythonhosted.org/packages/8d/5f/21a93b2ec205f4b79853ff6e838e3c99064d5dbe85ec6b05967506f14af0/rich-13.5.2-py3-none-any.whl
hash:
sha256: 146a90b3b6b47cac4a73c12866a499e9817426423f57c5a66949c086191a8808
category: main
optional: false
- name: rich-click
version: 1.6.1
manager: pip
platform: linux-64
dependencies:
click: '>=7'
rich: '>=10.7.0'
url: https://files.pythonhosted.org/packages/f4/f2/3fbb0e6eee13a484dc8aaca450e9322d267fc3839b6769841492f1594037/rich_click-1.6.1-py3-none-any.whl
hash:
sha256: 0fcf4d1a09029d79322dd814ab0b2e66ac183633037561881d45abae8a161d95
category: main
optional: false
- name: bump-my-version
version: 0.9.2
manager: pip
platform: linux-64
dependencies:
click: '*'
pydantic: <2.0.0
rich-click: '*'
rich: '*'
tomlkit: '*'
url: https://files.pythonhosted.org/packages/e5/04/e415ea7199be27375e4613a5d5c1aafc3f99633d0dd4d1ecb514a5de1fb0/bump_my_version-0.9.2-py3-none-any.whl
hash:
sha256: ff0b78339c10a91e460419802f30a0c5b0aa1489bca016c0b46ef6e4d5a7e170
category: main
optional: false
28 changes: 14 additions & 14 deletions qgreenland/config/cfg-lock.json

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions qgreenland/config/datasets/asiaq_nunagis.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@
"""
),
"citation": {
"text": (
"""ASIAQ Greenland Survey (2023). Date accessed: {{date_accessed}}."""
),
"text": ("""ASIAQ Greenland Survey (2023) {{date_accessed}}"""),
"url": "https://www.asiaq-greenlandsurvey.gl/",
},
},
Expand Down
2 changes: 1 addition & 1 deletion qgreenland/config/datasets/background.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"title": "Natural Earth II with Shaded Relief and Water (1:10m)",
"abstract": "Natural Earth II (Public Domain).",
"citation": {
"text": "Made with Natural Earth",
"text": "Made with Natural Earth {{date_accessed}}",
"url": (
"https://github.com/nvkelso/natural-earth-vector"
"/blob/master/LICENSE.md"
Expand Down
4 changes: 2 additions & 2 deletions qgreenland/config/datasets/geus_mineral_occurrences.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"""Thorning, L., Christensen, L. A., Dawes, P. R., Garde, A. A.,
Heijboer, T. C., Kalvig, P., Larsen, L. M., Larsen, U., Nielsen, T. F.,
Rehnström, E. F., Thomassen, B., Thrane, K., Schjøth, F. & Secher, K. "Greenland
mineral occurrences map (GMOM)", GEUS GeoNetwork catalogue. Accessed on
MattF-NSIDC marked this conversation as resolved.
Show resolved Hide resolved
{{date_accessed}}."""
mineral occurrences map (GMOM)", GEUS GeoNetwork catalogue.
{{date_accessed}}"""
),
"url": "https://data.geus.dk/geonetwork/srv/eng/catalog.search#/metadata/8884ead8-45fc-4d1a-ae67-325182cde646",
},
Expand Down
4 changes: 2 additions & 2 deletions qgreenland/config/datasets/ice_cores.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"citation": {
"text": (
"""World Data Center (2020). Ice core locations. Download:
http://gis.ncdc.noaa.gov/kml/paleo_icecore.kmz. Date accessed:
{{date_accessed}}."""
http://gis.ncdc.noaa.gov/kml/paleo_icecore.kmz.
{{date_accessed}}"""
),
"url": "http://www.ncdc.noaa.gov/paleo/icecore.html",
},
Expand Down
4 changes: 2 additions & 2 deletions qgreenland/config/datasets/land_ocean_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"title": "Natural Earth Land (10m)",
"abstract": ("""Natural Earth Land (Public Domain)."""),
"citation": {
"text": ("""Made with Natural Earth"""),
"text": ("""Made with Natural Earth {{date_accessed}}"""),
"url": "https://github.com/nvkelso/natural-earth-vector/blob/master/LICENSE.md",
},
},
Expand All @@ -35,7 +35,7 @@
"title": "Natural Earth Ocean (10m)",
"abstract": ("""Natural Earth Ocean (Public Domain)."""),
"citation": {
"text": ("""Made with Natural Earth"""),
"text": ("""Made with Natural Earth {{date_accessed}}"""),
"url": "https://github.com/nvkelso/natural-earth-vector/blob/master/LICENSE.md",
},
},
Expand Down
2 changes: 1 addition & 1 deletion qgreenland/config/datasets/nunagis_protected_areas.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
Breeding Areas."""
),
"citation": {
"text": ("""NunaGIS (2020). Date accessed: {{date_accessed}}."""),
"text": ("""NunaGIS (2020) {{date_accessed}}"""),
"url": "https://kort.nunagis.gl/server/rest/services/Hosted",
},
},
Expand Down
8 changes: 4 additions & 4 deletions qgreenland/config/datasets/political_boundaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"""NunaGIS (2020). Municipalities by population numbers in 2019,
Greenland. Web:
https://kort.nunagis.gl/portal/home/item.html?id=b70a43b814e84
78c9514208548ca5f61.
Date accessed: {{date_accessed}}."""
78c9514208548ca5f61
{{date_accessed}}."""
),
"url": "https://kort.nunagis.gl/portal/home/item.html?id=b70a43b814e8478c9514208548ca5f61",
},
Expand All @@ -50,7 +50,7 @@
ISO, HASC)."""
),
"citation": {
"text": ("""Made with Natural Earth"""),
"text": ("""Made with Natural Earth {{date_accessed}}"""),
"url": "https://github.com/nvkelso/natural-earth-vector/blob/master/LICENSE.md",
},
},
Expand Down Expand Up @@ -84,7 +84,7 @@
Intelligence Agency, and elsewhere."""
),
"citation": {
"text": ("""Made with Natural Earth"""),
"text": ("""Made with Natural Earth {{date_accessed}}"""),
"url": "https://github.com/nvkelso/natural-earth-vector/blob/master/LICENSE.md",
},
},
Expand Down
2 changes: 1 addition & 1 deletion qgreenland/config/datasets/promice_stations.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"PROMICE and GC-Net automated weather station data in Greenland",
https://doi.org/10.22008/FK2/IW73UU, GEUS Dataverse.

Date accessed: {{date_accessed}}."""
{{date_accessed}}"""
),
"url": "https://dataverse.geus.dk/dataset.xhtml?persistentId=doi:10.22008/FK2/IW73UU",
},
Expand Down
2 changes: 1 addition & 1 deletion qgreenland/config/datasets/soil_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
Arnoldussen, O. Arnalds, and M. Yli-Halla. 2002. Northern
Circumpolar Soils Map, Version 1. Greenland. Ottawa, Canada.
Research Branch, Agriculture and Agri-Food Canada. doi:
https://doi.org/. {{date_accessed}}."""
https://doi.org/10.7265/eb1s-4551. {{date_accessed}}"""
),
"url": "https://nsidc.org/data/GGD602/versions/1",
},
Expand Down
2 changes: 1 addition & 1 deletion qgreenland/config/datasets/timezones.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
styling."""
),
"citation": {
"text": ("""Made with Natural Earth"""),
"text": ("""Made with Natural Earth {{date_accessed}}"""),
"url": "https://github.com/nvkelso/natural-earth-vector/blob/master/LICENSE.md",
},
},
Expand Down
3 changes: 1 addition & 2 deletions qgreenland/config/datasets/wmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@
"text": """
NCEI Geomagnetic Modeling Team and British Geological Survey. 2019.
World Magnetic Model 2020. NOAA National Centers for Environmental
Information. doi: 10.25921/11v3-da71, 2020, Date accessed:
{{date_accessed}}.
Information. doi: 10.25921/11v3-da71, 2020 {{date_accessed}}.
""",
"url": "https://doi.org/10.25921/11v3-da71",
},
Expand Down
3 changes: 2 additions & 1 deletion qgreenland/util/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,5 @@ def _populate_date_accessed(text: str, *, layer_cfg: Layer) -> str:
mtime = fetch_dir.stat().st_mtime
date_accessed = dt.datetime.utcfromtimestamp(mtime)

return text.replace("{{date_accessed}}", date_accessed.date().isoformat())
date_accessed_str = f"[Accessed on: {date_accessed.date().isoformat()}]"
return text.replace("{{date_accessed}}", date_accessed_str)
2 changes: 1 addition & 1 deletion tasks/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def validate(ctx, verbose=False):
print("🎉🦆 Configuration validation passed.")


@task
@task(aliases=["lock"])
MattF-NSIDC marked this conversation as resolved.
Show resolved Hide resolved
def export(ctx):
"""Export the config as a JSON string."""
init_config()
Expand Down