From 0016a2f21e78d00b1a94eefe4db8e476358483eb Mon Sep 17 00:00:00 2001 From: Mattia Almansi Date: Fri, 24 May 2024 14:48:13 +0200 Subject: [PATCH 1/2] add pip dependencies (#47) --- c3s_eqc_automatic_quality_control/__init__.py | 9 ++++++++- .../diagnostics.py | 4 +++- pyproject.toml | 20 +++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/c3s_eqc_automatic_quality_control/__init__.py b/c3s_eqc_automatic_quality_control/__init__.py index 8a7c304..6c76ff9 100644 --- a/c3s_eqc_automatic_quality_control/__init__.py +++ b/c3s_eqc_automatic_quality_control/__init__.py @@ -13,6 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from . import download, plot, utils try: # NOTE: the `version.py` file must not be present in the git repository @@ -22,4 +23,10 @@ # Local copy or not installed with setuptools __version__ = "999" -__all__ = ["__version__"] +__all__ = [ + "__version__", + "download", + "diagnostics", + "plot", + "utils", +] diff --git a/c3s_eqc_automatic_quality_control/diagnostics.py b/c3s_eqc_automatic_quality_control/diagnostics.py index 519494c..a829122 100644 --- a/c3s_eqc_automatic_quality_control/diagnostics.py +++ b/c3s_eqc_automatic_quality_control/diagnostics.py @@ -24,7 +24,7 @@ import xarray as xr from xarray.core.common import DataWithCoords -from . import _grid_cell_area, _regrid, _spatial_weighted, _time_weighted, utils +from . import _grid_cell_area, _spatial_weighted, _time_weighted, utils __all__ = [ "annual_weighted_mean", @@ -90,6 +90,8 @@ def regrid( DataArray or Dataset Interpolated object """ + from . import _regrid + call_kwargs = {} for key in {"keep_attrs", "skipna", "na_thres", "output_chunks"} & set(kwargs): call_kwargs[key] = kwargs.pop(key) diff --git a/pyproject.toml b/pyproject.toml index 9be4dda..3e45799 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,26 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Topic :: Scientific/Engineering" ] +dependencies = [ + "cacholote", + "cads-toolbox", + "cartopy", + "cf-xarray", + "cgul", + "emohawk", + "fsspec", + "joblib", + "matplotlib", + "numpy", + "pandas", + "plotly", + "pyproj", + "shapely", + "tqdm", + "typing_extensions", + "xarray", + "xskillscore" +] description = "C3S EQC Automatic Quality Control" dynamic = ["version"] license = {file = "LICENSE"} From cc202bad1a067a608afeaa94d681bef71efc0709 Mon Sep 17 00:00:00 2001 From: Mattia Almansi Date: Fri, 24 May 2024 14:48:54 +0200 Subject: [PATCH 2/2] template update --- .cruft.json | 2 +- .pre-commit-config.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.cruft.json b/.cruft.json index 41c3fca..7350a11 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/ecmwf-projects/cookiecutter-conda-package", - "commit": "6d3c980d7a6e07e3b39b17bf0d02dffe9bbf5aa6", + "commit": "22f52dd88a2ec84dfa380d8e2c655e0b3752a10a", "checkout": null, "context": { "cookiecutter": { diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1261adf..6c78570 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,7 +17,7 @@ repos: - id: blackdoc additional_dependencies: [black==23.11.0] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.2 + rev: v0.4.4 hooks: - id: ruff args: [--fix, --show-fixes]