From cf18360450ac8559caf1f73a1e0193d52c704123 Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Tue, 5 Dec 2023 21:20:45 +0100 Subject: [PATCH 1/7] Update CI and requirements Require Python 3.8+, add CI job for Python 3.11 and 3.12 --- .github/workflows/python-tests.yml | 24 +++++++++++------------- pyproject.toml | 5 ++--- setup.cfg | 2 +- tox.ini | 28 ++++++++-------------------- 4 files changed, 22 insertions(+), 37 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 4aed402..39e037d 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -16,15 +16,10 @@ jobs: fail-fast: false matrix: include: - - name: Python 3.7 with required dependencies - os: macos-latest - python-version: 3.7 - toxenv: py37-test - - name: Python 3.8 with required dependencies and measure coverage os: ubuntu-latest python-version: 3.8 - toxenv: py38-test + toxenv: py38-test-numpy122 coverage: true - name: Python 3.9 with required dependencies @@ -35,12 +30,18 @@ jobs: - name: Python 3.10 with required dependencies os: ubuntu-latest python-version: "3.10" - toxenv: py310-test + toxenv: py310-test-numpy124 + + - name: Python 3.11 with required dependencies + os: macos-latest + python-version: "3.11" + toxenv: py311-test-astropy53 - - name: Documentation build + - name: Python 3.12 with required dependencies os: ubuntu-latest - python-version: 3.8 - toxenv: build_docs + python-version: "3.12" + toxenv: py312-test + coverage: true - name: Code style checks os: ubuntu-latest @@ -57,9 +58,6 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: python -m pip install tox - - name: Install graphviz dependency - if: "endsWith(matrix.toxenv, 'build_docs')" - run: sudo apt-get -y install graphviz - name: Run tests if: "! matrix.coverage" run: tox -v -e ${{ matrix.toxenv }} diff --git a/pyproject.toml b/pyproject.toml index f04a0b9..ecce62a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,10 +2,9 @@ requires = ["setuptools", "setuptools_scm", - "wheel", "extension-helpers==1.*", - "oldest-supported-numpy", - "Cython>=0.29.21,<3.0"] + "numpy>=1.25,<2", + "Cython>=3.0,<3.1"] build-backend = 'setuptools.build_meta' diff --git a/setup.cfg b/setup.cfg index dc385d4..614abd4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,7 +14,7 @@ github_project = astropy/astroscrappy [options] zip_safe = False packages = find: -python_requires = >=3.7 +python_requires = >=3.8 setup_requires = setuptools_scm install_requires = astropy diff --git a/tox.ini b/tox.ini index 047b300..c44f3da 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,8 @@ [tox] envlist = - py{37,38,39,310}-test{,-alldeps,-devdeps}{,-cov} - py{37,38,39,310}-test-numpy{117,118,119,120} - py{37,38,39,310}-test-astropy{30,40,41,lts} + py{38,39,310,311,312}-test{,-alldeps,-devdeps}{,-cov} + py{38,39,310,311,312}-test-numpy{122,124,126} + py{38,39,310,311,312}-test-astropy{53,60} build_docs linkcheck codestyle @@ -36,27 +36,15 @@ description = devdeps: with the latest developer version of key dependencies oldestdeps: with the oldest supported version of key dependencies cov: and test coverage - numpy116: with numpy 1.16.* - numpy117: with numpy 1.17.* - numpy118: with numpy 1.18.* - numpy119: with numpy 1.19.* - astropy30: with astropy 3.0.* - astropy40: with astropy 4.0.* - astropy41: with astropy 4.1.* - astropylts: with the latest astropy LTS # The following provides some specific pinnings for key packages deps = - numpy116: numpy==1.16.* - numpy117: numpy==1.17.* - numpy118: numpy==1.18.* - numpy119: numpy==1.19.* - numpy120: numpy==1.20.* + numpy122: numpy==1.22.* + numpy124: numpy==1.24.* + numpy126: numpy==1.26.* - astropy30: astropy==3.0.* - astropy40: astropy==4.0.* - astropy41: astropy==4.1.* - astropylts: astropy==4.0.* + astropy53: astropy==5.3.* + astropy60: astropy==6.0.* devdeps: :NIGHTLY:numpy devdeps: git+https://github.com/astropy/astropy.git#egg=astropy From e3a00a740467f6d4239448ee541874ff15e7c8d4 Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Tue, 5 Dec 2023 21:24:58 +0100 Subject: [PATCH 2/7] Cleanup tox --- tox.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index c44f3da..23b8217 100644 --- a/tox.ini +++ b/tox.ini @@ -9,14 +9,13 @@ envlist = requires = setuptools >= 30.3.0 pip >= 19.3.1 -isolated_build = true indexserver = NIGHTLY = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple [testenv] # Pass through the following environment variables which may be needed for the CI -passenv = HOME,WINDIR,LC_ALL,LC_CTYPE,CC,CI,TRAVIS,TRAVIS_*,COVERAGE +passenv = HOME,WINDIR,LC_ALL,LC_CTYPE,CC,CI,COVERAGE # Run the tests in a temporary directory to make sure that we don't import # this package from the source tree From a5317ee8f2ce1d633652f006aa56c5813c318bd4 Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Wed, 6 Dec 2023 22:18:27 +0100 Subject: [PATCH 3/7] More updates, require python 3.9+ --- .github/workflows/python-tests.yml | 14 ++++---------- pyproject.toml | 2 +- setup.cfg | 2 +- tox.ini | 19 +++++++++---------- 4 files changed, 15 insertions(+), 22 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 39e037d..0a8f1bc 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -16,16 +16,10 @@ jobs: fail-fast: false matrix: include: - - name: Python 3.8 with required dependencies and measure coverage - os: ubuntu-latest - python-version: 3.8 - toxenv: py38-test-numpy122 - coverage: true - - name: Python 3.9 with required dependencies os: windows-latest python-version: 3.9 - toxenv: py39-test + toxenv: py39-test-numpy122 - name: Python 3.10 with required dependencies os: ubuntu-latest @@ -45,15 +39,15 @@ jobs: - name: Code style checks os: ubuntu-latest - python-version: 3.8 + python-version: "3.12" toxenv: codestyle steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/pyproject.toml b/pyproject.toml index ecce62a..3c2933d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,6 +10,6 @@ build-backend = 'setuptools.build_meta' [tool.cibuildwheel] # Skip pypy on mac due to numpy/accelerate issues -skip = "pp37* cp36* cp310-win* cp310-manylinux_x86_64 cp*-manylinux_i686 *musllinux*" +skip = "pp37* cp36* cp310-win* cp*-manylinux_i686 *musllinux*" test-requires = "pytest scipy" test-command = "pytest --pyargs astroscrappy" diff --git a/setup.cfg b/setup.cfg index 614abd4..fbf26a4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,7 +14,7 @@ github_project = astropy/astroscrappy [options] zip_safe = False packages = find: -python_requires = >=3.8 +python_requires = >=3.9 setup_requires = setuptools_scm install_requires = astropy diff --git a/tox.ini b/tox.ini index 23b8217..4a8c962 100644 --- a/tox.ini +++ b/tox.ini @@ -1,22 +1,21 @@ [tox] envlist = - py{38,39,310,311,312}-test{,-alldeps,-devdeps}{,-cov} - py{38,39,310,311,312}-test-numpy{122,124,126} - py{38,39,310,311,312}-test-astropy{53,60} + py{39,310,311,312}-test{,-alldeps,-devdeps}{,-cov} + py{39,310,311,312}-test-numpy{122,124,126} + py{39,310,311,312}-test-astropy{53,60} build_docs linkcheck codestyle -requires = - setuptools >= 30.3.0 - pip >= 19.3.1 -indexserver = - NIGHTLY = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple [testenv] # Pass through the following environment variables which may be needed for the CI passenv = HOME,WINDIR,LC_ALL,LC_CTYPE,CC,CI,COVERAGE +setenv = + MPLBACKEND=agg + devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple https://pypi.anaconda.org/astropy/simple + # Run the tests in a temporary directory to make sure that we don't import # this package from the source tree changedir = .tmp/{envname} @@ -45,8 +44,8 @@ deps = astropy53: astropy==5.3.* astropy60: astropy==6.0.* - devdeps: :NIGHTLY:numpy - devdeps: git+https://github.com/astropy/astropy.git#egg=astropy + devdeps: numpy>=0.0.dev0 + devdeps: astropy>=0.0.dev0 # The following indicates which extras_require from setup.cfg will be installed extras = From 6378baf7d7a900dfd36d4b7df1008bea5fca65de Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Wed, 6 Dec 2023 22:28:24 +0100 Subject: [PATCH 4/7] Update publish workflow --- .github/workflows/release.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b9e4ad..825cbac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,20 +10,20 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, windows-2019, macos-10.15] + os: [ubuntu-latest, windows-latest, macos-latest] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 name: Install Python with: - python-version: '3.8' + python-version: '3.12' - name: Build wheels - uses: pypa/cibuildwheel@v2.2.2 + uses: pypa/cibuildwheel@v2.16.2 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl @@ -31,19 +31,19 @@ jobs: name: Build source distribution runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 name: Install Python with: - python-version: '3.8' + python-version: '3.12' - name: Build sdist run: | python -m pip install build python -m build --sdist - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: path: dist/*.tar.gz @@ -53,12 +53,12 @@ jobs: # upload to PyPI on every tag if: startsWith(github.ref, 'refs/tags') steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: artifact path: dist - - uses: pypa/gh-action-pypi-publish@v1.4.2 + - uses: pypa/gh-action-pypi-publish@v1 with: user: __token__ password: ${{ secrets.pypi_token }} From 6716c6d43bd360d40b1ec2a3c09f3153b2f8d523 Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Wed, 6 Dec 2023 22:48:25 +0100 Subject: [PATCH 5/7] Debug wheels --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3c2933d..859c4e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,6 +10,8 @@ build-backend = 'setuptools.build_meta' [tool.cibuildwheel] # Skip pypy on mac due to numpy/accelerate issues -skip = "pp37* cp36* cp310-win* cp*-manylinux_i686 *musllinux*" +skip = "pp* cp*-manylinux_i686 *musllinux*" +test-skip = "cp9-win*" +environment = { PIP_PREFER_BINARY=1 } test-requires = "pytest scipy" test-command = "pytest --pyargs astroscrappy" From 293d6aa58dc0356ca9c5c87064b3a9a9be90b72b Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Wed, 6 Dec 2023 23:01:13 +0100 Subject: [PATCH 6/7] More debug --- .github/workflows/release.yml | 4 ++++ pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 825cbac..b7de813 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,6 +14,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-python@v4 name: Install Python @@ -32,6 +34,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - uses: actions/setup-python@v4 name: Install Python diff --git a/pyproject.toml b/pyproject.toml index 859c4e3..2f61734 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ build-backend = 'setuptools.build_meta' [tool.cibuildwheel] # Skip pypy on mac due to numpy/accelerate issues skip = "pp* cp*-manylinux_i686 *musllinux*" -test-skip = "cp9-win*" +test-skip = "cp9-win* cp10-win*" environment = { PIP_PREFER_BINARY=1 } test-requires = "pytest scipy" test-command = "pytest --pyargs astroscrappy" From 05b7641efbb5f54236921b02c92dc41b6b8fd565 Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Thu, 7 Dec 2023 08:59:25 +0100 Subject: [PATCH 7/7] Select archs for cibuildwheel --- pyproject.toml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2f61734..abaacdb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,8 +10,13 @@ build-backend = 'setuptools.build_meta' [tool.cibuildwheel] # Skip pypy on mac due to numpy/accelerate issues -skip = "pp* cp*-manylinux_i686 *musllinux*" -test-skip = "cp9-win* cp10-win*" +skip = ["pp*", "*musllinux*"] environment = { PIP_PREFER_BINARY=1 } test-requires = "pytest scipy" test-command = "pytest --pyargs astroscrappy" + +[tool.cibuildwheel.linux] +archs = ["x86_64"] + +[tool.cibuildwheel.windows] +archs = ["AMD64"]