Skip to content

Commit

Permalink
Stop using oldest-supported-numpy (#107)
Browse files Browse the repository at this point in the history
* Stop using oldest-supported-numpy

because Python 3.12 does not work with numpy < 1.19.
Also update minimum required python to 3.9.
  • Loading branch information
pllim authored Aug 18, 2023
1 parent c12b70e commit ec40951
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 103 deletions.
52 changes: 35 additions & 17 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
name: ${{ matrix.name }} [ ${{ matrix.os }} ]
Expand All @@ -12,29 +16,29 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: [3.8]
python: [3.9]
toxenv: [test]
toxargs: [-v]

include:

- name: Test with oldest supported versions of our dependencies
os: ubuntu-18.04
python: 3.7
os: ubuntu-20.04
python: 3.9
toxenv: test-oldestdeps
toxargs: -v

- name: Test with medium old supported versions of our dependencies
# Test that we do not have a problem with some specific version (gh-101).
# Comment out if not needed.
os: ubuntu-20.04
os: ubuntu-22.04
python: 3.9
toxenv: test-olddeps
toxargs: -v

- name: Test with development versions of our dependencies
os: ubuntu-latest
python: 3.11
python: '3.11'
toxenv: test-devdeps
toxargs: -v

Expand All @@ -53,12 +57,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install APT packages
Expand All @@ -84,19 +88,19 @@ jobs:

- name: Tests with external liberfa
os: ubuntu-latest
python: 3.8
python: 3.9
toxenv: test
toxargs: -v
apt_packages: python3-venv python3-pip liberfa-dev python3-numpy

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install APT packages
Expand All @@ -120,16 +124,30 @@ jobs:
test_command: pytest --pyargs erfa
targets: |
# Linux wheels
- cp*-manylinux_i686
- cp*-manylinux_x86_64
- cp*-musllinux_x86_64
- cp*-manylinux_aarch64
- cp39-manylinux_x86_64
- cp310-manylinux_x86_64
- cp311-manylinux_x86_64
- cp39-musllinux_x86_64
- cp310-musllinux_x86_64
- cp311-musllinux_x86_64
- cp39-manylinux_aarch64
- cp310-manylinux_aarch64
- cp311-manylinux_aarch64
# MacOS X wheels - we deliberately do not build universal2 wheels.
# Note that the arm64 wheels are not actually tested so we
# rely on local manual testing of these to make sure they are ok.
- cp*-macosx_x86_64
- cp*-macosx_arm64
- cp39*macosx_x86_64
- cp310*macosx_x86_64
- cp311*macosx_x86_64
- cp39*macosx_arm64
- cp310*macosx_arm64
- cp311*macosx_arm64
# Windows wheels
- cp*-win*
- cp39*win32
- cp310*win32
- cp311*win32
- cp39*win_amd64
- cp310*win_amd64
- cp311*win_amd64
secrets:
pypi_token: ${{ secrets.pypi_token }}
13 changes: 12 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
version: 2

build:
image: latest
os: ubuntu-22.04
tools:
python: "3.11"
jobs:
post_checkout:
- git fetch --shallow-since=2023-01-01 || true

submodules:
include: all

sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: false

python:
system_packages: false
install:
- method: pip
path: .
Expand Down
75 changes: 0 additions & 75 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[build-system]
requires = ["setuptools", "setuptools_scm[toml]>=6.2", "wheel",
"packaging", "jinja2>=2.10.3", "oldest-supported-numpy"]
requires = ["setuptools", "setuptools_scm[toml]>=6.2",
"packaging", "jinja2>=2.10.3", "numpy>=1.25,<2"]
build-backend = 'setuptools.build_meta'
3 changes: 0 additions & 3 deletions requirements_dev.txt

This file was deleted.

4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ requires = numpy
zip_safe = False
tests_require = pytest-doctestplus
setup_requires = setuptools_scm
install_requires = numpy>=1.17
python_requires = >=3.7
install_requires = numpy>=1.19
python_requires = >=3.9

[options.packages.find]
exclude = erfa._dev
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ isolated_build = true
[testenv]

# Pass through the following environemnt variables which may be needed for the CI
passenv = HOME,WINDIR,LC_ALL,LC_CTYPE,CC,CI,TRAVIS
passenv = HOME,WINDIR,LC_ALL,LC_CTYPE,CC,CI

setenv =
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scipy-wheels-nightly/simple
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple

# Run the tests in a temporary directory to make sure that we don't import
# pyerfa from the source tree
Expand All @@ -37,7 +37,7 @@ description =

# The following provides some specific pinnings for key packages
deps =
oldestdeps: numpy==1.17.* # astropy LTS
oldestdeps: numpy==1.19.* # astropy LTS
olddeps: numpy==1.20.* # something potentially problematic (see gh-101)
devdeps: numpy>=0.0.dev0

Expand Down

0 comments on commit ec40951

Please sign in to comment.