From 037320cb079505b64a5f63826780e23dec3e0e78 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:08:17 -0500 Subject: [PATCH 1/4] pin dependencies --- pyproject.toml | 57 +++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index eeaa682..837b573 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ requires-python = ">=3.10.0" keywords = ["xsdba"] license = {file = "LICENSE"} classifiers = [ - "Development Status :: 2 - Pre-Alpha", + "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", @@ -28,54 +28,54 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", # "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: Implementation :: CPython" + "Programming Language :: Python :: Implementation :: CPython", + "Topic :: Scientific/Engineering :: Information Analysis", + "Topic :: Scientific/Engineering :: Mathematics" ] dynamic = ["description", "version"] dependencies = [ - "boltons", - "bottleneck", - "cf_xarray>=0.10.0", # not sure if we need to be that strict - "cftime", - "dask", + "boltons >=20.1", + "bottleneck >=1.3.1", + "cf_xarray>=0.10.0", + "cftime >=1.4.1", + "dask >=2024.8.1", "h5netcdf>=1.3.0", - "jsonpickle", - # TODO : for notebooks ... does this fall in optional deps? - "nc_time_axis", - "numba", + "jsonpickle >=3.1.0", + "numba >=0.54.1", "numpy >=1.23.0,<2.0", "pint>=0.24.3", "scipy >=1.9.0", - "statsmodels", + "statsmodels >=0.14.2", "xarray >=2023.11.0", - "yamale" + "yamale >=5.0.0" ] [project.optional-dependencies] dev = [ # Dev tools and testing - "pip >=24.3.1", + "black ==24.10.0", + "blackdoc ==0.3.9", "bump-my-version >=0.28.0", - "watchdog >=4.0.0", + "coverage >=7.5.0", + "coveralls >=4.0.1", "flake8 >=7.1.1", "flake8-rst-docstrings >=0.3.0", "flit >=3.9.0,<4.0", - "tox >=4.23.2", - "coverage >=7.5.0", - "coveralls >=4.0.1", + "isort ==5.13.2", "mypy", "netcdf4", - "numpydoc >=1.8.0; python_version >='3.9'", + "numpydoc >=1.8.0", + "pip >=24.3.1", + "pooch >=1.8.0", + "pre-commit >=3.5.0", "pytest <8.0.0", "pytest-cov >=5.0.0", "pytest-xdist >=3.2.0", - "black ==24.10.0", - "blackdoc ==0.3.9", - "isort ==5.13.2", "ruff >=0.7.0", - "pooch >=1.8.0", - "pre-commit >=3.5.0", - "xdoctest>=1.1.5", - "xclim >= 0.53.2" + "tox >=4.23.2", + "watchdog >=4.0.0", + "xclim >= 0.53.2", + "xdoctest>=1.1.5" ] docs = [ # Documentation and examples @@ -85,8 +85,9 @@ docs = [ "sphinx-copybutton", "sphinx-intl", "sphinx-rtd-theme >=1.0", - "nbsphinx", - "ipython", + "nbsphinx >=0.9.5", + "nc-time-axis >=1.4.1", + "ipython >=8.5.0", "ipykernel", "jupyter_client", # ADD From f1c7c4bd49876251b521b2d7f0e277b0f1d07136 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Fri, 13 Dec 2024 11:46:52 -0500 Subject: [PATCH 2/4] update cookiecutter --- .cruft.json | 2 +- .pre-commit-config.yaml | 4 ++-- environment-dev.yml | 48 +++++++++++++++++++++-------------------- environment-docs.yml | 17 +++++++++------ pyproject.toml | 23 ++++++++++---------- tox.ini | 3 ++- 6 files changed, 51 insertions(+), 46 deletions(-) diff --git a/.cruft.json b/.cruft.json index 43c4926..c92fa7e 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/Ouranosinc/cookiecutter-pypackage", - "commit": "f750ad2185cbb56df6f7e98a269bdd8399283ea8", + "commit": "b27c2d5f8126ea1aefae29a6f5ccfdafad96395d", "checkout": null, "context": { "cookiecutter": { diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5052bd2..e711162 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ repos: rev: v3.19.0 hooks: - id: pyupgrade - args: [ '--py39-plus' ] + args: [ '--py310-plus' ] - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: @@ -42,7 +42,7 @@ repos: - id: isort exclude: ^docs/ - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.1 + rev: v0.8.2 hooks: - id: ruff args: [ '--fix' ] diff --git a/environment-dev.yml b/environment-dev.yml index f7a2579..7fd2165 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -3,42 +3,44 @@ channels: - conda-forge - defaults dependencies: - - python >=3.9,<3.13 - - boltons - - bottleneck + - python >=3.10,<3.13 + - boltons >=20.1 + - bottleneck >=1.3.1 - cf_xarray >=0.10.0 # not sure if we need to be that strict - - cftime - - dask # why was this not installed? This is only pulled in by xclim, optional for xarray. + - cftime >=1.4.1 + - dask >=2024.8.1 - h5netcdf >=1.3.0 - - jsonpickle - - numba + - jsonpickle >=3.1.0 + - numba >=0.54.1 - numpy >=1.23.0,<2.0 # to accommodate numba - pint>=0.24.3 - scipy >=1.9.0 - - statsmodels + - statsmodels >=0.14.2 + - typer >=0.12.3 - xarray >=2023.11.0 - - xclim >= 0.53 - - yamale + - yamale >=5.0.0 + # Extras + - xclim >= 0.53.2 # Dev tools and testing - - netcdf4 - - pip >=24.3.1 + - black ==24.10.0 + - blackdoc ==0.3.9 - bump-my-version >=0.28.0 - - watchdog >=4.0.0 + - coverage >=7.5.0 + - coveralls >=4.0.1 - flake8 >=7.1.1 - flake8-rst-docstrings >=0.3.0 - flit >=3.9.0,<4.0 - - tox >=4.23.2 - - coverage >=7.5.0 - - coveralls >=4.0.1 - - typer >=0.12.3 - - pytest <8.0.0 - - pytest-cov >=5.0.0 - - pytest-xdist >=3.2.0 - - black ==24.10.0 - - blackdoc ==0.3.9 - isort ==5.13.2 + - mypy + - netcdf4 - numpydoc >=1.8.0 + - pip >=24.3.1 - pooch >=1.8.0 - pre-commit >=3.5.0 - - ruff >=0.7.0 + - pytest <8.0.0 + - pytest-cov >=5.0.0 + - pytest-xdist >=3.2.0 + - ruff >=0.8.2 + - tox >=4.23.2 + - watchdog >=4.0.0 - xdoctest>=1.1.5 diff --git a/environment-docs.yml b/environment-docs.yml index f6dd18e..438861b 100644 --- a/environment-docs.yml +++ b/environment-docs.yml @@ -4,16 +4,19 @@ channels: - defaults dependencies: - python >=3.12,<3.13 - - sphinx >=7.0.0 + # Docs + - ipykernel + - ipython >=8.5.0 + - jupyter_client + - nbsphinx >=0.9.5 + - nc-time-axis >=1.4.1 - pandoc - - sphinx-rtd-theme >=1.0 - - sphinx-autoapi + - pooch >=1.8.0 + - sphinx >=7.0.0 + - sphinx-autobuild >=2024.4.16 - sphinx-codeautolink - sphinx-copybutton - sphinx-intl + - sphinx-rtd-theme >=1.0 - sphinxcontrib-bibtex - sphinxcontrib-napoleon - - typer >=0.12.3 - - nbsphinx - - ipython - - ipykernel diff --git a/pyproject.toml b/pyproject.toml index 837b573..2208d1f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,7 @@ dependencies = [ "pint>=0.24.3", "scipy >=1.9.0", "statsmodels >=0.14.2", + "typer >=0.12.3", "xarray >=2023.11.0", "yamale >=5.0.0" ] @@ -71,7 +72,7 @@ dev = [ "pytest <8.0.0", "pytest-cov >=5.0.0", "pytest-xdist >=3.2.0", - "ruff >=0.7.0", + "ruff >=0.8.2", "tox >=4.23.2", "watchdog >=4.0.0", "xclim >= 0.53.2", @@ -79,23 +80,21 @@ dev = [ ] docs = [ # Documentation and examples + "ipykernel", + "ipython >=8.5.0", + "jupyter_client", + "nbsphinx >=0.9.5", + "nc-time-axis >=1.4.1", "pooch >=1.8.0", "sphinx >=7.0.0", + "sphinx-autobuild >=2024.4.16", + "sphinx-autodoc-typehints", "sphinx-codeautolink", "sphinx-copybutton", "sphinx-intl", - "sphinx-rtd-theme >=1.0", - "nbsphinx >=0.9.5", - "nc-time-axis >=1.4.1", - "ipython >=8.5.0", - "ipykernel", - "jupyter_client", - # ADD - "sphinx-autobuild >=2024.4.16", - "sphinx-autodoc-typehints", "sphinx-mdinclude", - "sphinxcontrib-bibtex", - "sphinxcontrib-svg2pdfconverter[Cairosvg]" + "sphinx-rtd-theme >=1.0", + "sphinxcontrib-bibtex" ] all = ["xsdba[dev]", "xsdba[docs]"] diff --git a/tox.ini b/tox.ini index 2179d5d..6cd981e 100644 --- a/tox.ini +++ b/tox.ini @@ -25,7 +25,7 @@ deps = isort ==5.13.2 flake8 >=7.1.1 flake8-rst-docstrings >=0.3.0 - ruff >=0.7.0 + ruff >=0.8.2 numpydoc >=1.8.0 commands = make lint @@ -36,6 +36,7 @@ allowlist_externals = extras = docs commands = + make autodoc make --directory=docs clean html allowlist_externals = make From d59d63488baf6077514413044e8d5a7471b24c2e Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Fri, 13 Dec 2024 13:53:25 -0500 Subject: [PATCH 3/4] update CHANGELOG.rst --- CHANGELOG.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 63f054c..a3d66d3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,9 +9,10 @@ Contributors: Éric Dupuis (:user:`coxipi`), Trevor James Smith (:user:`Zeitsper Changes ^^^^^^^ -* Split `sdba` from `xclim` and duplicate code where needed. (: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`) - +* Split `sdba` from `xclim` into its own standalone package. Where needed, some common functionalities were duplicated: (:pull:`8`) + * ``xsdba.units`` is an adaptation of the ``xclim.core.units` modules. + * Many functions and definitions found in ``xclim.core.calendar`` have been adapted to ``xsdba.base``. +* Dependencies have been updated to reflect the new package structure. (:pull:`45`) .. _changes_0.1.0: From da3d822b87a554774638f24d96908fbfbc20304d Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:08:13 -0500 Subject: [PATCH 4/4] fix inline backtick issue --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a3d66d3..0a2fcd1 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` into its own standalone package. Where needed, some common functionalities were duplicated: (:pull:`8`) - * ``xsdba.units`` is an adaptation of the ``xclim.core.units` modules. + * ``xsdba.units`` is an adaptation of the ``xclim.core.units`` modules. * Many functions and definitions found in ``xclim.core.calendar`` have been adapted to ``xsdba.base``. * Dependencies have been updated to reflect the new package structure. (:pull:`45`)