Skip to content

Commit

Permalink
Bump minversion of dependencies.
Browse files Browse the repository at this point in the history
Got rid of oldest-supported-numpy in build.
  • Loading branch information
pllim committed Sep 8, 2023
1 parent 3f593fd commit a43e1ef
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -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)
==================

Expand Down
6 changes: 2 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ reported) or contact `STScI Help Desk <https://hsthelp.stsci.edu>`_.
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
Expand Down Expand Up @@ -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')

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
requires = ["setuptools>=30.3.0",
"setuptools_scm",
"wheel",
"oldest-supported-numpy"]
"numpy>=1.25,<2"]
build-backend = "setuptools.build_meta"
8 changes: 4 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
2 changes: 0 additions & 2 deletions synphot/tests/test_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 9 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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}
Expand Down

0 comments on commit a43e1ef

Please sign in to comment.