From 803e677b426ce784416e4145b2652becbe887261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Dupuis?= Date: Fri, 25 Oct 2024 14:22:28 -0400 Subject: [PATCH] cleaning (dependencies, remove xclim53 hacks) --- .pre-commit-config.yaml | 2 +- .readthedocs.yml | 4 ---- CHANGELOG.rst | 2 +- environment-dev.yml | 1 + pyproject.toml | 7 +++---- tox.ini | 2 -- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8d027634c..9f0014211 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -68,7 +68,7 @@ repos: rev: v1.8.0 hooks: - id: numpydoc-validation - exclude: ^docs/|^tests/|src/xsdba/xclim_submodules/ + exclude: ^docs/|^tests/ - repo: https://github.com/python-jsonschema/check-jsonschema rev: 0.29.2 hooks: diff --git a/.readthedocs.yml b/.readthedocs.yml index 66b4c6ad7..c623e5eec 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -15,10 +15,6 @@ build: tools: python: "mambaforge-22.9" jobs: - pre_install: - # FIXME: This is a workaround to install xclim v0.53, which is not released. - - mamba install -y -n base -c conda-forge "xclim=0.52.2" - - python -m pip install git+https://github.com/Ouranosinc/xclim.git@main pre_build: - sphinx-apidoc -o docs/apidoc --private --module-first src/xsdba - sphinx-build -M gettext docs docs/_build diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4c58781b4..63f054c42 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,7 +10,7 @@ Contributors: Éric Dupuis (:user:`coxipi`), Trevor James Smith (:user:`Zeitsper Changes ^^^^^^^ * Split `sdba` from `xclim` and duplicate code where needed. (:pull:`8`) -* `calendar` and `units` are copy (or almost) of given modules in `xclim`. Perhaps in the future some functionalities can be put in a common generic module (:pull:`8`) +* `units` are a copy (or almost) of given modules in `xclim`. A lot of duplicated code from xclim's `calendar` is also in xsdba's `base`. (:pull:`8`) .. _changes_0.1.0: diff --git a/environment-dev.yml b/environment-dev.yml index 7bba6d471..49422351c 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -17,6 +17,7 @@ dependencies: - scipy >=1.9.0 - statsmodels - xarray >=2023.11.0 + - xclim >= 0.53 - yamale # Dev tools and testing - netcdf4 diff --git a/pyproject.toml b/pyproject.toml index e0dfffa79..0e761f95e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,3 @@ -# SPLIT: many checks removed - [build-system] requires = ["flit_core >=3.9,<4"] build-backend = "flit_core.buildapi" @@ -76,7 +74,8 @@ dev = [ "ruff >=0.5.7", "pooch >=1.8.0", "pre-commit >=3.5.0", - "xdoctest>=1.1.5" + "xdoctest>=1.1.5", + "xclim >= 0.53" ] docs = [ # Documentation and examples @@ -98,7 +97,6 @@ docs = [ "sphinxcontrib-bibtex", "sphinxcontrib-svg2pdfconverter[Cairosvg]" ] -extras = ["xclim>=0.52"] all = ["xsdba[dev]", "xsdba[docs]"] [project.scripts] @@ -257,6 +255,7 @@ allow_untyped_defs = true disable_error_code = "attr-defined" ignore_missing_imports = true +# SPLIT: many checks removed [tool.numpydoc_validation] checks = [ "all", # report on all checks, except the below diff --git a/tox.ini b/tox.ini index 1996fe242..5b5ffe28d 100644 --- a/tox.ini +++ b/tox.ini @@ -59,8 +59,6 @@ commands_pre = pip list pip check commands = - ; Install the development version of xclim until v0.53.0 is released - pip install git+https://github.com/Ouranosinc/xclim.git@main pytest --cov xsdba -m "not requires_atmosds" {posargs} ; Coveralls requires access to a repo token set in .coveralls.yml in order to report stats coveralls: - coveralls