Skip to content

Commit

Permalink
Merge branch 'main' into add_grey_box
Browse files Browse the repository at this point in the history
  • Loading branch information
emma58 authored Nov 14, 2023
2 parents 2b45756 + 71787b7 commit 96efbd4
Show file tree
Hide file tree
Showing 100 changed files with 6,956 additions and 1,971 deletions.
2 changes: 1 addition & 1 deletion .coin-or/projDesc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ Carl D. Laird, Chair, Pyomo Management Committee, claird at andrew dot cmu dot e

<platform>
<operatingSystem>Any</operatingSystem>
<compiler>Python 3.7, 3.8, 3.9, 3.10, 3.11</compiler>
<compiler>Python 3.8, 3.9, 3.10, 3.11</compiler>
</platform>

</testedPlatforms>
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release_wheel_creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
wheel-version: ['cp37-cp37m', 'cp38-cp38', 'cp39-cp39', 'cp310-cp310', 'cp311-cp311']
wheel-version: ['cp38-cp38', 'cp39-cp39', 'cp310-cp310', 'cp311-cp311']
os: [ubuntu-latest]
include:
- os: ubuntu-latest
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
include:
- os: macos-latest
TARGET: osx
python-version: [ 3.7, 3.8, 3.9, '3.10', '3.11' ]
python-version: [ 3.8, 3.9, '3.10', '3.11' ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
include:
- os: windows-latest
TARGET: win
python-version: [ 3.7, 3.8, 3.9, '3.10', '3.11' ]
python-version: [ 3.8, 3.9, '3.10', '3.11' ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
46 changes: 32 additions & 14 deletions .github/workflows/test_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
skip_doctest: 1
TARGET: linux
PYENV: conda
PACKAGES: mpi4py openmpi
PACKAGES: mpi4py

- os: ubuntu-latest
python: '3.10'
Expand Down Expand Up @@ -318,21 +318,38 @@ jobs:
fi
done
echo "*** Install Pyomo dependencies ***"
# Note: this will fail the build if any installation fails (or
# possibly if it outputs messages to stderr)
conda install --update-deps -q -y $CONDA_DEPENDENCIES
if test -z "${{matrix.slim}}"; then
echo "*** Install CPLEX ***"
conda install -q -y 'cplex>=12.10' docplex \
|| echo "WARNING: CPLEX Community Edition is not available"
echo "*** Install Gurobi ***"
conda install -q -y gurobi \
|| echo "WARNING: Gurobi is not available"
echo "*** Install Xpress ***"
conda install -q -y xpress \
|| echo "WARNING: Xpress Community Edition is not available"
for PKG in cyipopt pymumps scip; do
PYVER=$(echo "py${{matrix.python}}" | sed 's/\.//g')
echo "Installing for $PYVER"
for PKG in 'cplex>=12.10' docplex gurobi xpress cyipopt pymumps scip; do
echo ""
echo "*** Install $PKG ***"
conda install -q -y $PKG \
|| echo "WARNING: $PKG is not available"
# conda can literally take an hour to determine that a
# package is not available. Perform a quick search to see
# if the package is available for this interpreter before
# attempting an install.
# NOTE: conda search will attempt approximate matches.
_PKGLIST=$(conda search -f "$PKG") || echo "Package $PKG not found"
echo "$_PKGLIST"
_BASE=$(echo "$PKG" | sed 's/[=<>].*//')
_BUILDS=$(echo "$_PKGLIST" | grep "^$_BASE " \
| sed -r 's/\s+/ /g' | cut -d\ -f3) || echo ""
if test -n "$_BUILDS"; then
_ISPY=$(echo "$_BUILDS" | grep "^py") \
|| echo "No python build detected"
_PYOK=$(echo "$_BUILDS" | grep "^$PYVER") \
|| echo "No python build matching $PYVER detected"
if test -z "$_ISPY" -o -n "$_PYOK"; then
echo "... INSTALLING $PKG"
conda install -y "$PKG" || _BUILDS=""
fi
fi
if test -z "$_BUILDS"; then
echo "WARNING: $PKG is not available"
fi
done
# TODO: This is a hack to stop test_qt.py from running until we
# can better troubleshoot why it fails on GHA
Expand Down Expand Up @@ -608,7 +625,8 @@ jobs:
# is fully generated by a single process before invoking MPI
$PYTHON_EXE -c "from pyomo.dataportal.parse_datacmds import \
parse_data_commands; parse_data_commands(data='')"
mpirun -np ${{matrix.mpi}} --oversubscribe pytest -v \
# Note: if we are testing with openmpi, add '--oversubscribe'
mpirun -np ${{matrix.mpi}} pytest -v \
--junit-xml=TEST-pyomo-mpi.xml \
-m "mpi" -W ignore::Warning \
pyomo `pwd`/pyomo-model-libraries
Expand Down
58 changes: 40 additions & 18 deletions .github/workflows/test_pr_and_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ jobs:
steps:
- name: Checkout Pyomo source
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Black Formatting Check
run: |
pip install black
Expand All @@ -56,7 +60,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: [3.7, 3.8, 3.9, '3.10', '3.11']
python: [ 3.8, 3.9, '3.10', '3.11' ]
other: [""]
category: [""]

Expand All @@ -83,13 +87,13 @@ jobs:
PACKAGES:

- os: ubuntu-latest
python: 3.8
python: 3.9
other: /mpi
mpi: 3
skip_doctest: 1
TARGET: linux
PYENV: conda
PACKAGES: mpi4py openmpi
PACKAGES: mpi4py

- os: ubuntu-latest
python: 3.11
Expand All @@ -116,15 +120,15 @@ jobs:
PYENV: pip

- os: ubuntu-latest
python: 3.7
python: 3.8
other: /slim
slim: 1
skip_doctest: 1
TARGET: linux
PYENV: pip

- os: ubuntu-latest
python: 3.8
python: 3.9
other: /pyutilib
TARGET: linux
PYENV: pip
Expand Down Expand Up @@ -344,21 +348,38 @@ jobs:
fi
done
echo "*** Install Pyomo dependencies ***"
# Note: this will fail the build if any installation fails (or
# possibly if it outputs messages to stderr)
conda install --update-deps -q -y $CONDA_DEPENDENCIES
if test -z "${{matrix.slim}}"; then
echo "*** Install CPLEX ***"
conda install -q -y 'cplex>=12.10' docplex \
|| echo "WARNING: CPLEX Community Edition is not available"
echo "*** Install Gurobi ***"
conda install -q -y gurobi \
|| echo "WARNING: Gurobi is not available"
echo "*** Install Xpress ***"
conda install -q -y xpress \
|| echo "WARNING: Xpress Community Edition is not available"
for PKG in cyipopt pymumps scip; do
PYVER=$(echo "py${{matrix.python}}" | sed 's/\.//g')
echo "Installing for $PYVER"
for PKG in 'cplex>=12.10' docplex gurobi xpress cyipopt pymumps scip; do
echo ""
echo "*** Install $PKG ***"
conda install -q -y $PKG \
|| echo "WARNING: $PKG is not available"
# conda can literally take an hour to determine that a
# package is not available. Perform a quick search to see
# if the package is available for this interpreter before
# attempting an install.
# NOTE: conda search will attempt approximate matches.
_PKGLIST=$(conda search -f "$PKG") || echo "Package $PKG not found"
echo "$_PKGLIST"
_BASE=$(echo "$PKG" | sed 's/[=<>].*//')
_BUILDS=$(echo "$_PKGLIST" | grep "^$_BASE " \
| sed -r 's/\s+/ /g' | cut -d\ -f3) || echo ""
if test -n "$_BUILDS"; then
_ISPY=$(echo "$_BUILDS" | grep "^py") \
|| echo "No python build detected"
_PYOK=$(echo "$_BUILDS" | grep "^$PYVER") \
|| echo "No python build matching $PYVER detected"
if test -z "$_ISPY" -o -n "$_PYOK"; then
echo "... INSTALLING $PKG"
conda install -y "$PKG" || _BUILDS=""
fi
fi
if test -z "$_BUILDS"; then
echo "WARNING: $PKG is not available"
fi
done
# TODO: This is a hack to stop test_qt.py from running until we
# can better troubleshoot why it fails on GHA
Expand Down Expand Up @@ -634,7 +655,8 @@ jobs:
# is fully generated by a single process before invoking MPI
$PYTHON_EXE -c "from pyomo.dataportal.parse_datacmds import \
parse_data_commands; parse_data_commands(data='')"
mpirun -np ${{matrix.mpi}} --oversubscribe pytest -v \
# Note: if we are testing with openmpi, add '--oversubscribe'
mpirun -np ${{matrix.mpi}} pytest -v \
--junit-xml=TEST-pyomo-mpi.xml \
-m "mpi" -W ignore::Warning \
pyomo `pwd`/pyomo-model-libraries
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ subproblems using Python parallel communication libraries.
* [About Pyomo](http://www.pyomo.org/about)
* [Download](http://www.pyomo.org/installation/)
* [Documentation](http://www.pyomo.org/documentation/)
* [Performance Plots](https://software.sandia.gov/downloads/pub/pyomo/performance/index.html)
* [Performance Plots](https://pyomo.github.io/performance/)

Pyomo was formerly released as the Coopr software library.

Expand All @@ -51,8 +51,8 @@ Pyomo is available under the BSD License - see the

Pyomo is currently tested with the following Python implementations:

* CPython: 3.7, 3.8, 3.9, 3.10, 3.11
* PyPy: 3.7, 3.8, 3.9
* CPython: 3.8, 3.9, 3.10, 3.11
* PyPy: 3.9

_Testing and support policy_:

Expand Down
Loading

0 comments on commit 96efbd4

Please sign in to comment.