Skip to content

Commit

Permalink
Update supported & tested python versions (#361)
Browse files Browse the repository at this point in the history
* Fixes CI testing of codestyle
* Update supported python versions
* Fix: improve docs on incrementing python version

Closes #353
  • Loading branch information
benjaminrose committed Apr 6, 2023
1 parent c039892 commit 66c95ef
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 28 deletions.
40 changes: 23 additions & 17 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
tags:
- '*'
pull_request:
workflow_dispatch:


jobs:
Expand All @@ -24,37 +25,42 @@ jobs:

- name: Build the docs
os: ubuntu-latest
python: 3.8
python: 3.x
toxenv: build_docs

- name: Python 3.9 with minimal dependencies
- name: Latest Python with minimal dependencies
os: ubuntu-latest
python: 3.9
toxenv: py39
python: 3.x
toxenv: py3

- name: Python 3.9 with full coverage
- name: Python 3.11 with full coverage
os: ubuntu-latest
python: 3.9
toxenv: py39-alldeps-cov
python: 3.11
toxenv: py311-alldeps-cov

- name: Python 3.6 with oldest supported version of all dependencies
- name: Python 3.7 with oldest supported version of all dependencies
os: ubuntu-latest
python: 3.6
toxenv: py36-oldestdeps

- name: Python 3.7 (MacOS X) with all optional dependencies
os: macos-latest
python: 3.7
toxenv: py37-alldeps
toxenv: py37-oldestdeps

- name: Python 3.8 (Windows) with all optional dependencies
os: windows-latest
- name: Python 3.8 (MacOS X) with all optional dependencies
os: macos-latest
python: 3.8
toxenv: py38-alldeps

- name: Python 3.9 (Windows) with all optional dependencies
os: windows-latest
python: 3.9
toxenv: py39-alldeps

- name: Python 3.10 with all optional dependencies
os: ubuntu-latest
python: "3.10"
toxenv: py310-alldeps

- name: Download all of the builtins
os: ubuntu-latest
python: 3.9
python: 3.x
toxenv: builtins

steps:
Expand Down
11 changes: 11 additions & 0 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,14 @@ release:
once it passes all tests.
- The docs for the release will show up on readthedocs.org as the new
``stable`` version.

**Bumping Minimum Supported Python Version**

Versions are hardcoded in

- tox.ini - update the ``envlist = py{...}`` line.
- setup.cfg - update ``python_requires``, ``install_requires``, and ``oldestdeps`` as needed.
- .github/workflows/run_tests.yml - update the ``python`` and
``toxenv`` lines
- docs/install.rst - Ensure that the first line "SNCosmo works on
Python 3.x+" is correct
2 changes: 1 addition & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Installation
************

SNCosmo works on Python 3.4+ and depends on the
SNCosmo works on Python 3.7+ and depends on the
following Python packages:

- `numpy <http://www.numpy.org/>`_
Expand Down
18 changes: 9 additions & 9 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ packages =
sncosmo.tests
zip_safe = False
install_requires =
astropy>=1.3.0
extinction>=0.4.2
numpy>=1.13.3
scipy>=0.19.0
astropy>=3.1
extinction>=0.4.4
numpy>=1.14.5 # 1.14.6 seems to work but not with oldest-supported-numpy
pyyaml>=3.13
python_requires = >=3.5
scipy>=1.3.0
python_requires = >=3.7

[options.extras_require]
oldestdeps = # Oldest versions supported, used for tests.
astropy==1.3.0
extinction==0.4.2
numpy==1.13.3
scipy==0.19.0
astropy==3.1
extinction==0.4.4
numpy==1.14.5
pyyaml==3.13
scipy==1.3.0
test = # Required to run the test suite.
pytest
pytest-astropy
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py{36,37,38,39}{,-alldeps}{,-oldestdeps}{,-cov}
py{37,38,39,310,311}{,-alldeps}{,-oldestdeps}{,-cov}
builtins
codestyle
build_docs
Expand Down

0 comments on commit 66c95ef

Please sign in to comment.