diff --git a/.gitignore b/.gitignore index d2a41f322a41f6c51d5daecf291eafacf7fde4ef..f7cc33b4343cf6b1cbdd61a8f934971adedfeec8 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ notTracked/ *.swp log/ */log/ +.venv diff --git a/examples/quality_controll.ipynb b/examples/quality_controll.ipynb index dc44b438f1a2553e9e348204e770073fc4ac3c6d..b3ad13bcb96baf064ec9e4699977d89057db4c68 100644 --- a/examples/quality_controll.ipynb +++ b/examples/quality_controll.ipynb @@ -204,7 +204,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.5" + "version": "3.11.7" } }, "nbformat": 4, diff --git a/pyproject.toml b/pyproject.toml index 3a1df3c3901f48453b3a8f4bfe15e847cd84f922..51d4d7cc7a688866f2574db1390385a8a0760e77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,7 @@ installer = "uv" extra-dependencies = [ "jupyter", "ipykernel", + "cartopy" ] [tool.hatch.envs.hatch-static-analysis] diff --git a/src/toargridding/contributors.py b/src/toargridding/contributors.py new file mode 100644 index 0000000000000000000000000000000000000000..6374a43d15f89ccc10b740f57c4b394b8fd655ab --- /dev/null +++ b/src/toargridding/contributors.py @@ -0,0 +1,25 @@ + + +class contributors: + def __init__(self, requestID, endpoint="not yet defined"): + self.requestID = requestID + self.timeseriesIDs = set() + self.endpoint = endpoint + def get_contributors_endpoint(self): + #TODO here, is the latest point to decide, if we need to provide an endpoint or a curl command to upload a time series id file + pass + def get_offline_command(self): + # write time series IDs to file + # save file + return f"curl {self.endpoint} -file {self.requestID}.contributors" + def get_service_contributors(self): + # TODO: missing implementation + raise NotImplementedError("This has not been implemented as this package is not yet operated as a service.") + def add_timeseries(self, id): + self.timeseriesIDs.add(id) + def add_many_timeseries(self, ids): + for id in ids: + self.timeseriesIDs.add(id) + + + diff --git a/src/toargridding/grids.py b/src/toargridding/grids.py index ca501eeef770df49207d28a206a1ac1e327e1d66..1bd176ffe3692f546d3c2e2bd5f943673d60eefd 100644 --- a/src/toargridding/grids.py +++ b/src/toargridding/grids.py @@ -157,9 +157,7 @@ class RegularGrid(GridDefinition): cell_indices = self.as_cell_index(coords) # will convert cell_indices to float as some nans ar present - print(data) data_with_indices = data.join(cell_indices.to_frame(GridDefinition.cell_index_name), how="outer") - print(data) return data_with_indices.groupby(GridDefinition.cell_index_name) diff --git a/src/toargridding/static_metadata/global_cf_attributes.json b/src/toargridding/static_metadata/global_cf_attributes.json index bab7e034ef99a335e56a03dd391ff8e4d94dc869..25c30a37eef124e370693f6d3977a939dbcaed03 100644 --- a/src/toargridding/static_metadata/global_cf_attributes.json +++ b/src/toargridding/static_metadata/global_cf_attributes.json @@ -12,7 +12,6 @@ "publisher_email": "info@toar-data.org", "publisher_url": "https://toar-data.fz-juelich.de/", "contributor_name": "ask Martin, namen", - "contributor_role": "ask Martin", "institution": "The Tropospheric Ozone Assessment Report (TOAR) Data Centre, Research Centre Jülich, Jülich, Germany", "project": "TOAR-II", "creator_type": "institution", diff --git a/src/toargridding/toar_rest_client.py b/src/toargridding/toar_rest_client.py index 2b2229438b15a43fcd261db7a436e35e401881f0..33a122b2f709decfc9c30ea472dc6e5d5741de74 100644 --- a/src/toargridding/toar_rest_client.py +++ b/src/toargridding/toar_rest_client.py @@ -429,6 +429,7 @@ class AnalysisService: timeseries, timeseries_metadata = self.get_timeseries_and_metadata(metadata) coords = self.get_clean_coords(timeseries_metadata) timeseries = self.get_clean_timeseries(timeseries, metadata) + print(timeseries) return AnalysisRequestResult(timeseries, coords, metadata) def get_timeseries_and_metadata(self, metadata: Metadata) -> tuple[pd.DataFrame, pd.DataFrame]: