From a43e1efea0734b4fd2e81bc452afc08ce26ad25e Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Fri, 8 Sep 2023 13:44:45 -0400 Subject: [PATCH] Bump minversion of dependencies. Got rid of oldest-supported-numpy in build. --- .github/workflows/ci_workflows.yml | 6 +++--- .readthedocs.yaml | 4 ++-- CHANGES.rst | 5 +++++ docs/index.rst | 6 ++---- pyproject.toml | 2 +- setup.cfg | 8 ++++---- synphot/tests/test_units.py | 2 -- tox.ini | 14 +++++++++----- 8 files changed, 26 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index f7e1de72..8f9cdc3f 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -82,8 +82,8 @@ jobs: - name: Test with old dependencies os: ubuntu-20.04 - python: 3.8 - toxenv: py38-test-oldestdeps + python: 3.9 + toxenv: py39-test-oldestdeps - name: Test in OSX os: macos-latest @@ -93,7 +93,7 @@ jobs: # NOTE: If TRDS cannot take the hit, disable --remote-data - name: Test in Windows with remote data os: windows-latest - python: 3.9 + python: '3.11' toxenv: py39-test-alldeps toxposargs: --remote-data diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 9098b731..ce73bf1d 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -3,11 +3,11 @@ version: 2 build: - os: ubuntu-20.04 + os: ubuntu-22.04 apt_packages: - graphviz tools: - python: "3.9" + python: "3.11" sphinx: builder: html diff --git a/CHANGES.rst b/CHANGES.rst index d9e9652d..d3b9d02b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,11 @@ 1.3.0 (unreleased) ================== +- Compatibility with ``numpy`` 2.0. [#363] + +- Bumped minimum supported versions for Python to 3.9, + ``numpy`` to 1.20, ``astropy`` to 5.0, and ``scipy`` to 1.6. [#363] + 1.2.1 (2023-06-01) ================== diff --git a/docs/index.rst b/docs/index.rst index 0b4c8fb9..44bee668 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -42,7 +42,7 @@ reported) or contact `STScI Help Desk `_. Installation and Setup ====================== -**synphot** works for Python 3.8 or later only. It requires the following +**synphot** works for Python 3.9 or later only. It requires the following packages: * numpy @@ -77,12 +77,10 @@ via HTTP, create a local directory where you plan to store the data files >>> from synphot.utils import download_data >>> file_list = download_data('/my/local/dir/trds') # doctest: +SKIP -With ``astropy`` 4.1 or later, you can generate a +With ``astropy``, you can generate a ``$HOME/.astropy/config/synphot.cfg`` file like this (otherwise, you can manually create one from :ref:`synphot_config_file`): -.. doctest-requires:: astropy>=4.1 - >>> from astropy.config import generate_config >>> generate_config(pkgname='synphot') diff --git a/pyproject.toml b/pyproject.toml index 3823812b..8af818c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,5 +2,5 @@ requires = ["setuptools>=30.3.0", "setuptools_scm", "wheel", - "oldest-supported-numpy"] + "numpy>=1.25,<2"] build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg index fbefff1c..2db8e9fc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -48,10 +48,10 @@ zip_safe = False setup_requires = setuptools_scm install_requires = - numpy>=1.18 - astropy>=4.3 - scipy>=1.3 -python_requires = >=3.8 + numpy>=1.20 + astropy>=5 + scipy>=1.6 +python_requires = >=3.9 [options.extras_require] all = diff --git a/synphot/tests/test_units.py b/synphot/tests/test_units.py index 3ffb064a..e8b139d5 100644 --- a/synphot/tests/test_units.py +++ b/synphot/tests/test_units.py @@ -3,8 +3,6 @@ .. note:: VEGAMAG conversion is tested in test_spectrum_source.py. -.. note:: spectral_density_integrated is tested in astropy>=4.1. - """ # THIRD-PARTY diff --git a/tox.ini b/tox.ini index 9b59cc5f..ab2a69f8 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{38,39,310,311}-test{,-alldeps,-oldestdeps,-devdeps,-predeps}{,-cov} + py{39,310,311}-test{,-alldeps,-oldestdeps,-devdeps,-predeps}{,-cov} codestyle twine bandit @@ -10,6 +10,8 @@ requires = pip >= 19.3.1 [testenv] +setenv = + devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple # Pass through the following environemnt variables which are needed for the CI passenv = HOME,WINDIR,CC,CI @@ -37,12 +39,15 @@ deps = # The oldestdeps factor is intended to be used to install the oldest versions of all # dependencies that have a minimum version. - oldestdeps: numpy==1.18.* - oldestdeps: scipy==1.3.* - oldestdeps: astropy==4.3.* + oldestdeps: numpy==1.20.* + oldestdeps: scipy==1.6.* + oldestdeps: astropy==5.0.* # The devdeps factor is intended to be used to install the latest developer version # or nightly wheel of key dependencies. + devdeps: numpy>=0.0.dev0 + devdeps: scipy>=0.0.dev0 + devdeps: astropy>=0.0.dev0 devdeps: git+https://github.com/astropy/specutils.git@main#egg=specutils cov: pytest-cov @@ -52,7 +57,6 @@ extras = alldeps: all commands = - devdeps: pip install -U -i https://pypi.anaconda.org/astropy/simple astropy --pre pip freeze !cov: pytest --pyargs synphot {toxinidir}/docs {posargs} cov: pytest --pyargs synphot {toxinidir}/docs --cov synphot --cov-config={toxinidir}/setup.cfg {posargs}