Skip to content

Commit

Permalink
take out python 3.7, use numpy<2 (#783)
Browse files Browse the repository at this point in the history
  • Loading branch information
pchtsp authored Nov 1, 2024
1 parent efccbac commit 19c7b75
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ jobs:
strategy:
max-parallel: 21
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu-latest, macOS-latest, windows-latest]
exclude:
- os: macOS-latest
python-version: '3.7'
- os: macOS-latest
python-version: '3.8'

Expand All @@ -26,29 +24,28 @@ jobs:
run: |
python -m pip install --upgrade pip
- name: Code Quality
if: matrix.python-version != '3.7'
run: |
pip install black
python -m pip install black
black pulp/ --check
- name: Install dependencies
run: |
pip install .
python -m pip install .
- name: install glpk
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update -qq
sudo apt-get install -qq glpk-utils
- name: install xpress
if: matrix.os != 'macOS-latest' && matrix.python-version != '3.12'
run: pip install xpress
run: python -m pip install xpress
- name: Install gurobipy
run: |
python -m pip install gurobipy
- name: Install highspy
if: matrix.python-version != '3.12'
# alternatively if: contains(fromJSON("['3.7', '3.8', '3.9', '3.10', '3.11']"), matrix.python-version)
# alternatively if: contains(fromJSON("['3.8', '3.9', '3.10', '3.11']"), matrix.python-version)
run: |
pip install highspy numpy
python -m pip install highspy "numpy<2"
- name: Install highspy cmd
if: matrix.os == 'ubuntu-latest'
uses: supplypike/setup-bin@v4
Expand All @@ -59,12 +56,12 @@ jobs:
version: '1.7.1'
- name: Install coptpy
run: |
pip install coptpy
python -m pip install coptpy
- name: Install saspy
run: |
pip install saspy
python -m pip install saspy
- name: Install swat
run: |
pip install swat
python -m pip install swat
- name: Test with pulptest
run: pulptest
1 change: 1 addition & 0 deletions pulp/apis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def getSolverFromDict(data):
:raises PulpSolverError: if the dictionary does not have the "solver" key
:rtype: LpSolver
"""
data = dict(data)
solver = data.pop("solver", None)
if solver is None:
raise PulpSolverError("The json file has no solver attribute.")
Expand Down

0 comments on commit 19c7b75

Please sign in to comment.