diff --git a/.cruft.json b/.cruft.json index c766158f9..91ba6ce51 100644 --- a/.cruft.json +++ b/.cruft.json @@ -17,7 +17,7 @@ "changelog_url": "https://docs.sunpy.org/projects/ndcube/en/stable/whatsnew/changelog.html", "issue_tracker_url": "https://github.com/sunpy/ndcube/issues", "license": "BSD 2-Clause", - "minimum_python_version": "3.11", + "minimum_python_version": "3.12", "use_compiled_extensions": "n", "enable_dynamic_dev_versions": "y", "include_example_code": "n", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52700d2a3..c98f37973 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,9 +58,9 @@ jobs: posargs: -n auto envs: | - linux: py314 - - windows: py312 + - windows: py313 - macos: py312 - - linux: py311-oldestdeps + - linux: py312-oldestdeps - linux: asdf_schemas secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.ruff.toml b/.ruff.toml index ffaf55311..9f474dd4f 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -1,4 +1,4 @@ -target-version = "py310" +target-version = "py312" line-length = 120 exclude = [ ".git,", diff --git a/.sunpy-template.yml b/.sunpy-template.yml deleted file mode 100644 index ae68d33f5..000000000 --- a/.sunpy-template.yml +++ /dev/null @@ -1,13 +0,0 @@ -default_context: - package_name: ndcube - module_name: ndcube - short_description: A package for multi-dimensional contiguous and non-contiguous coordinate aware arrays. - author_name: The SunPy Community - author_email: sunpy@googlegroups.com - license: BSD 2-Clause - project_url: http://docs.sunpy.org/projects/ndcube/ - github_repo: sunpy/ndcube - minimum_python_version: 3.9 - use_compiled_extensions: n - include_example_code: n - _provide_setuppy_fallback: y diff --git a/ndcube/ndcube.py b/ndcube/ndcube.py index a9bcbb0ed..55e524b33 100644 --- a/ndcube/ndcube.py +++ b/ndcube/ndcube.py @@ -801,10 +801,12 @@ def reproject_to(self, """ try: from reproject import reproject_adaptive, reproject_exact, reproject_interp # noqa: PLC0415 - from reproject.wcs_utils import has_celestial # noqa: PLC0415 - except ModuleNotFoundError: - raise ImportError(f"The {type(self).__name__}.reproject_to method requires " - f"the `reproject` library to be installed.") + from reproject._wcs_utils import has_celestial # noqa: PLC0415 + except ModuleNotFoundError as e: + raise ImportError( + f"The {type(self).__name__}.reproject_to method requires " + f"the `reproject` library to be installed." + ) from e algorithms = { "interpolation": reproject_interp, diff --git a/pyproject.toml b/pyproject.toml index 1025186ab..4a55a4ad1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,17 +9,17 @@ build-backend = "setuptools.build_meta" [project] name = "ndcube" description = "A package for multi-dimensional contiguous and non-contiguous coordinate aware arrays." -requires-python = ">=3.11" +requires-python = ">=3.12" readme = { file = "README.rst", content-type = "text/x-rst" } license-files = ["licenses/LICENSE.rst"] authors = [ { name = "The SunPy Community", email = "sunpy@googlegroups.com" }, ] dependencies = [ - "astropy>=6.1.0", + "astropy>=7.0.2", "gwcs>=0.24.0", - "numpy>=1.26.0", # Keeping numpy at 1.26 for a while longer - "scipy>=1.14.1", + "numpy>=2.1.0", + "scipy>=1.15.0", ] dynamic = ["version"] @@ -27,18 +27,18 @@ dynamic = ["version"] # These are truly optional deps or deps only used for testing where we # want oldestdeps to test them tests-optional = [ - "dask>=2024.1.0", - "specutils>=1.13.0", + "dask>=2024.6.0", + "specutils>=1.16.0", "sunpy>=6.1.0", ] tests-only = [ "pytest-astropy", - "pytest-cov", - "pytest-doctestplus", - "pytest-mpl>=0.12", - "pytest-xdist", - "pytest", - "pytest-memray; sys_platform != 'win32'", + "pytest-cov>=6.0.0", + "pytest-doctestplus>=1.3.0", + "pytest-mpl>=0.18.0", + "pytest-xdist>=3.7.0", + "pytest>=8.3.0", + "pytest-memray>=1.7.0; sys_platform != 'win32'", ] tests-minimal = [ "ndcube[plotting,reproject,tests-only]", @@ -49,20 +49,20 @@ tests = [ ] docs = [ "ndcube[all,tests-optional]", - "sphinx", - "sphinx-automodapi", - "sunpy-sphinx-theme", - "packaging", - "sphinx-changelog>=1.5.0", - "sphinx-gallery", - "sphinxext-opengraph", + "sphinx>=7.4.0", + "sphinx-automodapi>=0.18.0", + "sunpy-sphinx-theme>=2.0.12", + "packaging>=24.2", + "sphinx-changelog>=1.6.0", + "sphinx-gallery>=0.17.0", + "sphinxext-opengraph>=0.10.0", ] plotting = [ - "matplotlib>=3.9.0", - "mpl_animators>=1.2", + "matplotlib>=3.10.0", + "mpl_animators>=1.2.0", ] reproject = [ - "reproject>=0.14", # first version with 3.12 support + "reproject>=0.14.0", ] asdf = [ "asdf>=3.3.0", @@ -70,7 +70,7 @@ asdf = [ ] asdf-tests = [ "ndcube[asdf]", - "pytest-asdf-plugin", + "pytest-asdf-plugin>=0.1.0", ] all = [ "ndcube[plotting,reproject]", @@ -110,13 +110,13 @@ version_file = "ndcube/_version.py" enabled = true [tool.gilesbot.circleci_artifacts.figure_report] - url = ".tmp/py310-figure/figure_test_images/fig_comparison.html" - message = "Click details to see the figure test comparisons, for py310-figure." + url = ".tmp/py314-figure/figure_test_images/fig_comparison.html" + message = "Click details to see the figure test comparisons, for py314-figure." report_on_fail = true [tool.gilesbot.circleci_artifacts.figure_report_devdeps] - url = ".tmp/py310-figure-devdeps/figure_test_images/fig_comparison.html" - message = "Click details to see the figure test comparisons for py310-figure-devdeps." + url = ".tmp/py314-figure-devdeps/figure_test_images/fig_comparison.html" + message = "Click details to see the figure test comparisons for py314-figure-devdeps." report_on_fail = true [tool.gilesbot.towncrier_changelog] diff --git a/pytest.ini b/pytest.ini index a1c2f7bff..e29605871 100644 --- a/pytest.ini +++ b/pytest.ini @@ -60,3 +60,5 @@ filterwarnings = ignore:FigureCanvasAgg is non-interactive, and thus cannot be shown:UserWarning # wcsaxes/formatter_locator.py hates angles ignore:.*invalid value encountered in do_format.*:RuntimeWarning + # General issues with older pyparsing + ignore::pyparsing.warnings.PyparsingDeprecationWarning diff --git a/tox.ini b/tox.ini index e41473dc2..f3c3ab665 100644 --- a/tox.ini +++ b/tox.ini @@ -3,10 +3,10 @@ min_version = 4.0 requires = tox-pypi-filter>=0.14 envlist = - py{311,312,313,314} + py{312,313,314} py313-minimal py314-devdeps - py311-oldestdeps + py312-oldestdeps codestyle build_docs asdf_schemas @@ -69,7 +69,7 @@ extras = commands_pre = oldestdeps: minimum_dependencies ndcube --extras plotting reproject asdf tests-optional --filename requirements-min.txt # Pin down pyparsing because of incompatibility with old mpl - oldestdeps: pip install -r requirements-min.txt pyparsing<3.3 + oldestdeps: pip install -r requirements-min.txt oldestdeps: python -c "import astropy.time; astropy.time.update_leap_seconds()" pip freeze --all --no-input commands =