Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Python 3.12, drop Python <3.9 #227

Merged
merged 4 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/conda-env/build-env.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build-env
dependencies:
- boa
- numpy !=1.23.0
- numpy
1 change: 0 additions & 1 deletion .github/conda-env/test-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ dependencies:
- pytest-cov
- pytest-timeout
- coverage
- coveralls >= 3.3
8 changes: 6 additions & 2 deletions .github/scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ echo "::endgroup::"

echo "::group::python-control unit tests"
pushd ${python_control_srcdir:=./python-control}
# test_root_locus_zoom, test_sisotool: problems with the toolbar for MPL backends, not relevant to Slycot
# problems with the toolbar for MPL backends, not relevant to Slycot
donttest="test_root_locus_zoom or test_sisotool"
# don't care about deprecation warnings here
donttest="$donttest or test_default_deprecation"
pytest control/tests \
--cov=$slycot_libdir \
--cov-config=${slycot_srcdir}/.coveragerc \
-k "not (test_root_locus_zoom or test_sisotool)"
-k "not ($donttest)"
mv .coverage ${slycot_srcdir}/.coverage.control
popd
echo "::endgroup::"
Expand All @@ -31,4 +34,5 @@ cd ${slycot_srcdir}
echo " ${slycot_libdir}" >> .coveragerc
coverage combine
coverage report
coverage xml
echo "::endgroup::"
45 changes: 20 additions & 25 deletions .github/workflows/slycot-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,24 @@ jobs:
- 'ubuntu'
- 'macos'
python:
- '3.8'
- '3.11'
- '3.10'
- '3.12'
bla_vendor: [ 'unset' ]
include:
- os: 'ubuntu'
python: '3.11'
python: '3.12'
bla_vendor: 'Generic'
- os: 'ubuntu'
python: '3.11'
python: '3.12'
bla_vendor: 'OpenBLAS'
- os: 'macos'
python: '3.11'
python: '3.12'
bla_vendor: 'Apple'
- os: 'macos'
python: '3.11'
python: '3.12'
bla_vendor: 'Generic'
- os: 'macos'
python: '3.11'
python: '3.12'
bla_vendor: 'OpenBLAS'

steps:
Expand Down Expand Up @@ -279,21 +279,19 @@ jobs:
- name: Install Wheel
run: |
python -m pip install --upgrade pip
pip install matplotlib scipy pytest pytest-cov pytest-timeout coverage coveralls
pip install matplotlib scipy pytest pytest-cov pytest-timeout coverage
pip install slycot-wheels/${{ matrix.packagekey }}/slycot*.whl
pip show slycot
- name: Slycot and python-control tests
run: JOBNAME="$JOBNAME" bash slycot-src/.github/scripts/run-tests.sh
env:
JOBNAME: wheel ${{ matrix.packagekey }} ${{ matrix.blas_lib }}
- name: report coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: wheel-${{ matrix.packagekey }}-${{matrix.blas_lib}}
COVERALLS_PARALLEL: true
working-directory: slycot-src
# https://github.com/TheKevJames/coveralls-python/issues/252
run: coveralls --service=github
uses: coverallsapp/github-action@v2
with:
flag-name: wheel-${{ matrix.packagekey }}-${{matrix.blas_lib}}
parallel: true
file: slycot-src/coverage.xml

test-conda:
name: Test conda ${{ matrix.packagekey }}, ${{matrix.blas_lib}} BLAS lib ${{ matrix.failok }}
Expand Down Expand Up @@ -363,14 +361,12 @@ jobs:
run: JOBNAME="$JOBNAME" bash slycot-src/.github/scripts/run-tests.sh
env:
JOBNAME: conda ${{ matrix.packagekey }} ${{ matrix.blas_lib }}
- name: Report coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: conda-${{ matrix.packagekey }}-${{matrix.blas_lib}}
COVERALLS_PARALLEL: true
working-directory: slycot-src
# https://github.com/TheKevJames/coveralls-python/issues/252
run: coveralls --service=github
- name: report coverage
uses: coverallsapp/github-action@v2
with:
flag-name: wheel-${{ matrix.packagekey }}-${{matrix.blas_lib}}
parallel: true
file: slycot-src/coverage.xml

coveralls-final:
name: Finalize parallel coveralls
Expand All @@ -381,7 +377,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
9 changes: 3 additions & 6 deletions conda-recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# https://github.com/conda-forge/blas-feedstock/issues/106#issuecomment-1771747983
# https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/conda_build_config.yaml

# https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/migrations/python312.yaml

# zip_keys Python/Numpy matrix to build for
python:
- 3.10.* *_cpython
- 3.11.* *_cpython
# 3.12 is already building in conda-forge/slycot-feedstock, but they did not publish everything yet
# - 3.12.* *_cpython
- 3.12.* *_cpython
numpy:
- 1.22
- 1.23
# - 1.23
- 1.26

zip_keys:
-
Expand Down
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ requires = [
"wheel",
"scikit-build>=0.15",
"cmake>=3.14",
"numpy!=1.23.0"]
"numpy >= 1.23.1"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -25,20 +25,19 @@ classifiers = [
"Programming Language :: C",
"Programming Language :: Fortran",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
]
requires-python = ">=3.8"
requires-python = ">=3.10"
dependencies = [
"numpy",
"numpy >= 1.23.1",
]
dynamic = ["version"]

Expand Down
Loading