Skip to content
Snippets Groups Projects
Commit 9f4274fd authored by Carsten Hinz's avatar Carsten Hinz
Browse files

made toargridding version an dynamic global_cf_attributes

version is now taken from pyproject.toml

added *swp files to ignore
parent c7272f06
Branches
Tags
1 merge request!11Creation of first beta release version
...@@ -10,3 +10,4 @@ data/ ...@@ -10,3 +10,4 @@ data/
tests/results tests/results
tests/temp_data_cache/ tests/temp_data_cache/
notTracked/ notTracked/
*.swp
...@@ -10,6 +10,8 @@ from toargridding.static_metadata import global_cf_attributes, TOARVariable ...@@ -10,6 +10,8 @@ from toargridding.static_metadata import global_cf_attributes, TOARVariable
from typing import Dict from typing import Dict
import importlib.metadata
date_created = datetime.utcnow().strftime("%Y-%m-dT%H:%M:%SZ") date_created = datetime.utcnow().strftime("%Y-%m-dT%H:%M:%SZ")
#date_created = datetime.now(datetime.UTC).strftime("%Y-%m-dT%H:%M:%SZ") # fix as utcnow will be removed in the future #date_created = datetime.now(datetime.UTC).strftime("%Y-%m-dT%H:%M:%SZ") # fix as utcnow will be removed in the future
...@@ -204,6 +206,7 @@ def get_global_attributes(metadata: Metadata) -> Dict: ...@@ -204,6 +206,7 @@ def get_global_attributes(metadata: Metadata) -> Dict:
"time_coverage_end": metadata.time.end.isoformat(), "time_coverage_end": metadata.time.end.isoformat(),
# "time_coverage_duration": 0, # TODO insert durations # "time_coverage_duration": 0, # TODO insert durations
# "time_coverage_resolution": 0, # "time_coverage_resolution": 0,
"product_version": f"version of toargridding {importlib.metadata.version( __package__ or __name__ )}",
} }
for key, value in metadata.moreOptions.items(): for key, value in metadata.moreOptions.items():
if not key in dynamic_cf_attributes: if not key in dynamic_cf_attributes:
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
"creator_type": "institution", "creator_type": "institution",
"creator_institution": "The Tropospheric Ozone Assessment Report (TOAR) Data Centre, Research Centre Jülich, Jülich, Germany", "creator_institution": "The Tropospheric Ozone Assessment Report (TOAR) Data Centre, Research Centre Jülich, Jülich, Germany",
"publisher_type": "institution", "publisher_type": "institution",
"product_version": "version of toargridding ?",
"references": "https://toar-data.fz-juelich.de/", "references": "https://toar-data.fz-juelich.de/",
"license": "CC-BY 4", "license": "CC-BY 4",
"acknowledgment": "This project was funded by the EU’s ERC programme, Grant Agreement 78576. This work is part of the Tropospheric Ozone Assessment Report (TOAR) which was supported by the International Global Atmospheric Chemistry (IGAC) project, the National Oceanic and Atmospheric Administration (NOAA), Forschungszentrum Jülich, and the World Meteorological Organisation (WMO). Many institutions and agencies supported the implementation of the measurements, and the processing, quality assurance, and submission of the data contained in the TOAR database" "acknowledgment": "This project was funded by the EU’s ERC programme, Grant Agreement 78576. This work is part of the Tropospheric Ozone Assessment Report (TOAR) which was supported by the International Global Atmospheric Chemistry (IGAC) project, the National Oceanic and Atmospheric Administration (NOAA), Forschungszentrum Jülich, and the World Meteorological Organisation (WMO). Many institutions and agencies supported the implementation of the measurements, and the processing, quality assurance, and submission of the data contained in the TOAR database"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment