Skip to content

Commit

Permalink
MAINT: enabling Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
saullocastro committed Mar 21, 2024
1 parent 89f7ce7 commit 798d927
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 24 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/auto_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -27,7 +27,7 @@ jobs:
cd doc
make html
- name: Deplying documentation
uses: JamesIves/github-pages-deploy-action@v4
uses: JamesIves/github-pages-deploy-action@v4.3.3
with:
branch: gh-pages # The branch the action should deploy to.
folder: ./doc/build/html # The folder the action should deploy.
2 changes: 1 addition & 1 deletion .github/workflows/auto_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Release
uses: softprops/action-gh-release@v1
env:
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/pytest_and_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ jobs:
build:

strategy:
max-parallel: 4
matrix:
runs-on: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
runs-on: ${{ matrix.runs-on }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -30,9 +29,9 @@ jobs:
run: |
python -m pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 ./cubature --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
flake8 ./cubature --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest and coverage report
run: |
coverage run -m pytest tests
Expand Down
28 changes: 15 additions & 13 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
strategy:
matrix:
runs-on: [windows-latest, ubuntu-latest, macos-latest]
python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -25,7 +25,7 @@ jobs:
python3 -m pip install --upgrade setuptools wheel twine
python3 -m pip install -r requirements.txt
- name: Upload source code
if: matrix.runs-on == 'ubuntu-latest' && matrix.python-version == '3.11'
if: matrix.runs-on == 'ubuntu-latest' && matrix.python-version == '3.12'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
Expand All @@ -43,16 +43,18 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python3 -m twine upload dist/*.whl
- name: Build manylinux Python wheels
if: matrix.runs-on == 'ubuntu-latest' && matrix.python-version == '3.11'
uses: RalfG/[email protected]_x86_64
with:
python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311'
build-requirements: 'pip cython numpy setuptools wheel twine'
- name: Publish manylinux Python wheels
if: matrix.runs-on == 'ubuntu-latest' && matrix.python-version == '3.11'
- name: Build Linux Python wheels, install cibuildwheel
if: matrix.runs-on == 'ubuntu-latest' && matrix.python-version == '3.12'
run: |
python -m pip install cibuildwheel==2.16.5
- name: Build Linux Python wheels
if: matrix.runs-on == 'ubuntu-latest' && matrix.python-version == '3.12'
run: |
python -m cibuildwheel --output-dir dist
- name: Publish Linux Python wheels
if: matrix.runs-on == 'ubuntu-latest' && matrix.python-version == '3.12'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python3 -m twine upload dist/*-manylinux*.whl
python3 -m twine upload dist/*linux*.whl
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Operating System :: Microsoft :: Windows
Operating System :: Unix
Operating System :: POSIX :: BSD
Expand Down

0 comments on commit 798d927

Please sign in to comment.