From 1cfd36922b6fbe2e3b513fed8d3ed26e21a7511e Mon Sep 17 00:00:00 2001 From: Tom Vo Date: Wed, 6 Nov 2024 12:24:20 -0800 Subject: [PATCH] Bump to v0.7.3 (#712) --- HISTORY.rst | 43 +++++++++++++++++++++++++++++--- conda-env/ci.yml | 2 +- conda-env/dev.yml | 2 +- pyproject.toml | 62 +++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 41 ------------------------------- tbump.toml | 4 +-- xcdat/__init__.py | 2 +- 7 files changed, 105 insertions(+), 51 deletions(-) delete mode 100755 setup.py diff --git a/HISTORY.rst b/HISTORY.rst index a57997ef..8c129133 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,40 @@ History ======= +v0.7.3 (06 November 2024) +------------------------- + +This patch release updates the NumPy constraint to ``numpy >=2.0.0,<3.0.0`` to ensure +compatibility with NumPy 2.0 (which introduces breaking changes). It also fixes a bug +in the ``get_bounds()`` method where bounds could not be found on supported non-CF axes +(e.g., "latitude", "longitude", etc.) even with the ``"bounds"`` attribute set on the +axes. + +Bug Fixes +~~~~~~~~~ + +- Update ``get_bounds()`` to support mappable non-CF axes using ``"bounds"`` attr by + `Tom Vo`_ in https://github.com/xCDAT/xcdat/pull/708 + +Documentation +~~~~~~~~~~~~~ + +- Add link to SciPy talk in docs by `Tom Vo`_ in https://github.com/xCDAT/xcdat/pull/704 + +DevOps +~~~~~~~~~~~~ + +- Adopt ``ruff`` as the central tool for linting, formatting, and import + sorting by `Tom Vo`_ in https://github.com/xCDAT/xcdat/pull/702 +- Update numpy constraint to ``>=2.0.0,<3.0.0`` by `Tom Vo`_ and `Xylar Asay-Davis`_ in + https://github.com/xCDAT/xcdat/pull/711, + https://github.com/xCDAT/xcdat/pull/712 +- Replace ``setup.py`` with ``pyproject.toml`` for modern Python packaging by + `Tom Vo`_ and `Xylar Asay-Davis`_ in https://github.com/xCDAT/xcdat/pull/712 + +**Full Changelog**: https://github.com/xCDAT/xcdat/compare/v0.7.2...v0.7.3 + + v0.7.2 (02 October 2024) ------------------------ @@ -65,10 +99,10 @@ notebooks and documentation are up to date with the latest and relevant informat Bug Fixes ~~~~~~~~~ -- Fixes regrid2 mapping output to input ordering by `Jason Boutte`_ - in https://github.com/xCDAT/xcdat/pull/653 -- Update ``add_missing_bounds()`` to convert ``np.timedelta64`` to ``pd.Timedelta`` - to support Xarray's datetime component accessor `_Jiwoo Lee` in https://github.com/xCDAT/xcdat/pull/660 +- Fixes regrid2 mapping output to input ordering by `Jason Boutte`_ + in https://github.com/xCDAT/xcdat/pull/653 +- Update ``add_missing_bounds()`` to convert ``np.timedelta64`` to ``pd.Timedelta`` + to support Xarray's datetime component accessor `_Jiwoo Lee` in https://github.com/xCDAT/xcdat/pull/660 Documentation ~~~~~~~~~~~~~ @@ -805,3 +839,4 @@ DevOps .. _Jill Chengzhu Zhang: https://github.com/chengzhuzhang .. _Paul Durack: https://github.com/durack1 .. _Ana Ordonez: https://github.com/acordonez +.. _Xylar Asay-Davis: https://github.com/xylar diff --git a/conda-env/ci.yml b/conda-env/ci.yml index 5be1b664..017428c3 100644 --- a/conda-env/ci.yml +++ b/conda-env/ci.yml @@ -11,7 +11,7 @@ dependencies: - cftime - dask - netcdf4 - - numpy >=2.0.0,<=3.0.0 + - numpy >=2.0.0,<3.0.0 - pandas - python-dateutil - xarray >=2024.03.0 diff --git a/conda-env/dev.yml b/conda-env/dev.yml index 3516db46..fad006ab 100644 --- a/conda-env/dev.yml +++ b/conda-env/dev.yml @@ -11,7 +11,7 @@ dependencies: - cftime - dask - netcdf4 - - numpy >=2.0.0,<=3.0.0 + - numpy >=2.0.0,<3.0.0 - pandas - python-dateutil - xarray >=2024.03.0 diff --git a/pyproject.toml b/pyproject.toml index 0e2011e1..62342544 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,65 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "xcdat" +dynamic = ["version"] +description = "Xarray Climate Data Analysis Tools" +readme = "README.rst" +requires-python = ">=3.9" +license = { text = "Apache-2.0" } +authors = [{ name = "xCDAT developers" }] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache-2.0 License", + "Natural Language :: English", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] +keywords = ["xcdat"] +dependencies = [ + "cf_xarray >=0.9.1", + "cftime", + "dask", + "netcdf4", + "numpy >=2.0.0,<3.0.0", + "pandas", + "python-dateutil", + "xarray >=2024.03.0", + "xesmf >=0.8.7", + "xgcm", +] + +[project.urls] +Documentation = "https://xcdat.readthedocs.io/en/latest/getting-started-guide/overview.html" +"Issue Tracker" = "https://github.com/xCDAT/xcdat/issues" + +[project.optional-dependencies] +test = ["pytest", "pytest-cov"] +docs = [ + "sphinx", + "sphinx-autosummary-accessors", + "sphinx-book-theme", + "sphinx-copybutton", + "nbsphinx", + "sphinx-design", + "pandoc", + "ipython", + "gsw-xarray", +] +dev = ["types-python-dateutil", "pre-commit", "ruff", "mypy"] + +[tool.setuptools.packages.find] +include = ["xcdat", "xcdat.*"] + +[tool.setuptools.dynamic] +version = { attr = "xcdat.__version__" } + [tool.ruff] # Exclude a variety of commonly ignored directories. exclude = [ diff --git a/setup.py b/setup.py deleted file mode 100755 index 4c2c0e15..00000000 --- a/setup.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python - -"""The setup script.""" - -from setuptools import find_packages, setup - -with open("README.rst") as readme_file: - readme = readme_file.read() - -with open("HISTORY.rst") as history_file: - history = history_file.read() - -test_requires = ["pytest>=3"] - -setup( - author="xCDAT developers", - python_requires=">=3.9", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: Apache-2.0 License", - "Natural Language :: English", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - ], - description="Xarray Climate Data Analysis Tools", - license="Apache-2.0", - long_description=readme + "\n\n" + history, - include_package_data=True, - keywords="xcdat", - name="xcdat", - packages=find_packages(include=["xcdat", "xcdat.*"]), - test_suite="tests", - tests_require=test_requires, - url="https://github.com/xCDAT/xcdat", - version="0.7.2", - zip_safe=False, -) diff --git a/tbump.toml b/tbump.toml index d6318bb0..55fd2b86 100644 --- a/tbump.toml +++ b/tbump.toml @@ -2,7 +2,7 @@ github_url = "https://github.com/xCDAT/xcdat" [version] -current = "0.7.2" +current = "0.7.3" # Example of a semver regexp. # Make sure this matches current_version before @@ -21,8 +21,6 @@ tag_template = "v{new_version}" # section containing the path of the file, relative to the # tbump.toml location. [[file]] -src = "setup.py" -[[file]] src = "xcdat/__init__.py" # You can specify a list of commands to diff --git a/xcdat/__init__.py b/xcdat/__init__.py index 3881359e..7c649d55 100644 --- a/xcdat/__init__.py +++ b/xcdat/__init__.py @@ -21,4 +21,4 @@ from xcdat.temporal import TemporalAccessor # noqa: F401 from xcdat.utils import compare_datasets # noqa: F401 -__version__ = "0.7.2" +__version__ = "0.7.3"