diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index c308f769..1068faed 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -33,7 +33,6 @@ jobs: run: pre-commit run --all-files - test: runs-on: ${{ matrix.os }} @@ -41,7 +40,7 @@ jobs: fail-fast: false matrix: # temporarily downgraded to 3.7.9 and 3.8.10 due to a bug https://github.com/actions/setup-python/issues/402 - python-version: ["3.7.9", "3.8.10", "3.9.13", "3.10.9", "pypy3.9-v7.3.9"] + python-version: ["3.7.9", "3.8.10", "3.9.13", "3.10.9", "3.11.1", "pypy3.9-v7.3.9"] os: [macos-11, macos-12, ubuntu-20.04, ubuntu-22.04, windows-2019, windows-2022] exclude: # temporarily exclude pypy3 on mac-os as there failing tests caused by bug on cbc side @@ -82,13 +81,14 @@ jobs: path: ${{ steps.pip-cache.outputs.dir }} key: ${{ runner.os }}-${{ matrix.python-version }}-pythonpip - - name: Install additional requirements (CPython) - if: ${{ matrix.python-version != 'pypy3.9-v7.3.9' }} - run: python -m pip install "matplotlib==3.5.2" "gurobipy==9.5.1" - - - name: Install mip + - name: Install mip for testing (PyPy) + if: ${{ matrix.python-version == 'pypy3.9-v7.3.9' }} run: python -m pip install .[test,numpy] + - name: Install mip for testing (CPython) + if: ${{ matrix.python-version != 'pypy3.9-v7.3.9' }} + run: python -m pip install .[test,numpy,gurobi] + - name: list installed packages run: python -m pip list diff --git a/examples/plant_location.py b/examples/plant_location.py index ee589256..df346975 100644 --- a/examples/plant_location.py +++ b/examples/plant_location.py @@ -11,13 +11,6 @@ import sys -# If running as a unit test, then skip if under pypy -if hasattr(sys, '_called_from_test') and sys._called_from_test is True: - import platform - if 'pypy' in platform.python_implementation().lower(): - import pytest - pytest.skip("Matplotlib installation not working under pypy") - # Workaround for issues with python not being installed as a framework on mac # by using a different backend. if sys.platform == "darwin": # OS X diff --git a/pyproject.toml b/pyproject.toml index b37eb9ff..b618017d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" name = "mip" description = "Python tools for Modeling and Solving Mixed-Integer Linear Programs (MIPs)" readme = "README.md" -requires-python = ">=3.7,<3.11" +requires-python = ">=3.7,<3.12" license = {file = "LICENSE"} authors = [ {name="T.A.M. Toffolo", email="haroldo.santos@gmail.com"}, @@ -32,12 +32,12 @@ classifiers = [ ] dynamic = ["version"] -dependencies = ["cffi==1.15.0"] +dependencies = ["cffi==1.15.*"] [project.optional-dependencies] -numpy = ["numpy==1.24.1; python_version >= '3.8'", "numpy==1.21.6; python_version == '3.7'"] +numpy = ["numpy==1.24.*; python_version >= '3.8'", "numpy==1.21.6; python_version == '3.7'"] gurobi = ["gurobipy>=8"] -test = ["pytest==7.2.0", "networkx==2.6.3"] +test = ["pytest==7.2.0", "networkx==2.8.8; python_version >= '3.8'", "networkx==2.6.3; python_version == '3.7'", "matplotlib==3.6.2; python_version >= '3.8'", "matplotlib==3.5.3; python_version == '3.7'"] [project.urls] "Homepage" = "https://www.python-mip.com"