Skip to content

Commit

Permalink
Merge branch 'main' into lp-dual
Browse files Browse the repository at this point in the history
  • Loading branch information
emma58 committed May 21, 2024
2 parents 8fccf37 + 9e102d8 commit 40925d0
Show file tree
Hide file tree
Showing 327 changed files with 15,023 additions and 4,706 deletions.
4 changes: 2 additions & 2 deletions .coin-or/projDesc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ Carl D. Laird, Chair, Pyomo Management Committee, claird at andrew dot cmu dot e
Use explicit overrides to disable use of automated
version reporting.
-->
<stableVersionNumber>6.7.1</stableVersionNumber>
<releaseNumber>6.7.1</releaseNumber>
<stableVersionNumber>6.7.2</stableVersionNumber>
<releaseNumber>6.7.2</releaseNumber>

</developmentStatus>

Expand Down
30 changes: 23 additions & 7 deletions .github/workflows/test_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,26 @@ jobs:
python-version: '3.10'
- name: Black Formatting Check
run: |
pip install black
# Note v24.4.1 fails due to a bug in the parser
pip install 'black!=24.4.1'
black . -S -C --check --diff --exclude examples/pyomobook/python-ch/BadIndent.py
- name: Spell Check
uses: crate-ci/typos@master
with:
config: ./.github/workflows/typos.toml
- name: URL Checker
uses: urlstechie/[email protected]
with:
# A comma-separated list of file types to cover in the URL checks
file_types: .md,.rst
# Choose whether to include file with no URLs in the prints.
print_all: false
# More verbose summary at the end of a run
verbose: true
# How many times to retry a failed request (defaults to 1)
retry_count: 3
# Exclude Jenkins because it's behind a firewall
exclude_urls: https://pyomo-jenkins.sandia.gov/


build:
Expand Down Expand Up @@ -92,7 +106,7 @@ jobs:
skip_doctest: 1
TARGET: linux
PYENV: conda
PACKAGES: mpi4py
PACKAGES: openmpi mpi4py

- os: ubuntu-latest
python: '3.10'
Expand Down Expand Up @@ -180,7 +194,7 @@ jobs:
# Notes:
# - install glpk
# - pyodbc needs: gcc pkg-config unixodbc freetds
for pkg in bash pkg-config unixodbc freetds glpk; do
for pkg in bash pkg-config unixodbc freetds glpk ginac; do
brew list $pkg || brew install $pkg
done
Expand All @@ -192,7 +206,8 @@ jobs:
# - install glpk
# - ipopt needs: libopenblas-dev gfortran liblapack-dev
sudo apt-get -o Dir::Cache=${GITHUB_WORKSPACE}/cache/os \
install libopenblas-dev gfortran liblapack-dev glpk-utils
install libopenblas-dev gfortran liblapack-dev glpk-utils \
libginac-dev
sudo chmod -R 777 ${GITHUB_WORKSPACE}/cache/os
- name: Update Windows
Expand Down Expand Up @@ -263,11 +278,12 @@ jobs:
if test -z "${{matrix.slim}}"; then
python -m pip install --cache-dir cache/pip cplex docplex \
|| echo "WARNING: CPLEX Community Edition is not available"
python -m pip install --cache-dir cache/pip \
-i https://pypi.gurobi.com gurobipy==10.0.3 \
python -m pip install --cache-dir cache/pip gurobipy==10.0.3 \
|| echo "WARNING: Gurobi is not available"
python -m pip install --cache-dir cache/pip xpress \
|| echo "WARNING: Xpress Community Edition is not available"
python -m pip install --cache-dir cache/pip maingopy \
|| echo "WARNING: MAiNGO is not available"
if [[ ${{matrix.python}} == pypy* ]]; then
echo "skipping wntr for pypy"
else
Expand Down Expand Up @@ -337,7 +353,7 @@ jobs:
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 -y $CONDA_DEPENDENCIES
conda install --update-deps -q -y $CONDA_DEPENDENCIES
if test -z "${{matrix.slim}}"; then
PYVER=$(echo "py${{matrix.python}}" | sed 's/\.//g')
echo "Installing for $PYVER"
Expand Down
41 changes: 33 additions & 8 deletions .github/workflows/test_pr_and_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
- ready_for_review
workflow_dispatch:
inputs:
git-ref:
Expand Down Expand Up @@ -34,6 +39,8 @@ jobs:
lint:
name: lint/style-and-typos
runs-on: ubuntu-latest
if: |
contains(github.event.pull_request.title, '[WIP]') != true && !github.event.pull_request.draft
steps:
- name: Checkout Pyomo source
uses: actions/checkout@v4
Expand All @@ -43,12 +50,26 @@ jobs:
python-version: '3.10'
- name: Black Formatting Check
run: |
pip install black
# Note v24.4.1 fails due to a bug in the parser
pip install 'black!=24.4.1'
black . -S -C --check --diff --exclude examples/pyomobook/python-ch/BadIndent.py
- name: Spell Check
uses: crate-ci/typos@master
with:
config: ./.github/workflows/typos.toml
- name: URL Checker
uses: urlstechie/[email protected]
with:
# A comma-separated list of file types to cover in the URL checks
file_types: .md,.rst
# Choose whether to include file with no URLs in the prints.
print_all: false
# More verbose summary at the end of a run
verbose: true
# How many times to retry a failed request (defaults to 1)
retry_count: 3
# Exclude Jenkins because it's behind a firewall
exclude_urls: https://pyomo-jenkins.sandia.gov/


build:
Expand Down Expand Up @@ -93,7 +114,7 @@ jobs:
skip_doctest: 1
TARGET: linux
PYENV: conda
PACKAGES: mpi4py
PACKAGES: openmpi mpi4py

- os: ubuntu-latest
python: '3.11'
Expand Down Expand Up @@ -210,7 +231,7 @@ jobs:
# Notes:
# - install glpk
# - pyodbc needs: gcc pkg-config unixodbc freetds
for pkg in bash pkg-config unixodbc freetds glpk; do
for pkg in bash pkg-config unixodbc freetds glpk ginac; do
brew list $pkg || brew install $pkg
done
Expand All @@ -222,7 +243,8 @@ jobs:
# - install glpk
# - ipopt needs: libopenblas-dev gfortran liblapack-dev
sudo apt-get -o Dir::Cache=${GITHUB_WORKSPACE}/cache/os \
install libopenblas-dev gfortran liblapack-dev glpk-utils
install libopenblas-dev gfortran liblapack-dev glpk-utils \
libginac-dev
sudo chmod -R 777 ${GITHUB_WORKSPACE}/cache/os
- name: Update Windows
Expand Down Expand Up @@ -293,11 +315,12 @@ jobs:
if test -z "${{matrix.slim}}"; then
python -m pip install --cache-dir cache/pip cplex docplex \
|| echo "WARNING: CPLEX Community Edition is not available"
python -m pip install --cache-dir cache/pip \
-i https://pypi.gurobi.com gurobipy==10.0.3 \
python -m pip install --cache-dir cache/pip gurobipy==10.0.3 \
|| echo "WARNING: Gurobi is not available"
python -m pip install --cache-dir cache/pip xpress \
|| echo "WARNING: Xpress Community Edition is not available"
python -m pip install --cache-dir cache/pip maingopy \
|| echo "WARNING: MAiNGO is not available"
if [[ ${{matrix.python}} == pypy* ]]; then
echo "skipping wntr for pypy"
else
Expand Down Expand Up @@ -363,6 +386,7 @@ jobs:
CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES $PKG"
fi
done
echo ""
echo "*** Install Pyomo dependencies ***"
# Note: this will fail the build if any installation fails (or
# possibly if it outputs messages to stderr)
Expand Down Expand Up @@ -605,7 +629,8 @@ jobs:
if: ${{ ! matrix.slim }}
shell: bash
run: |
$PYTHON_EXE -m pip install --cache-dir cache/pip highspy \
echo "NOTE: temporarily pinning to highspy pre-release for testing"
$PYTHON_EXE -m pip install --cache-dir cache/pip "highspy>=1.7.1.dev1" \
|| echo "WARNING: highspy is not available"
- name: Set up coverage tracking
Expand Down Expand Up @@ -733,7 +758,7 @@ jobs:
cover:
name: process-coverage-${{ matrix.TARGET }}
needs: build
if: always() # run even if a build job fails
if: success() || failure() # run even if a build job fails, but not if cancelled
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,31 @@ WRONLY = "WRONLY"
Hax = "Hax"
# Big Sur
Sur = "Sur"
# contrib package named mis and the acronym whence the name comes
mis = "mis"
MIS = "MIS"
# Ignore the shorthand ans for answer
ans = "ans"
# Ignore the keyword arange
arange = "arange"
# Ignore IIS
IIS = "IIS"
iis = "iis"
# Ignore PN
PN = "PN"
# Ignore hd
hd = "hd"
# Ignore opf
opf = "opf"
# Ignore FRE
FRE = "FRE"
# Ignore MCH
MCH = "MCH"
# Ignore RO
ro = "ro"
RO = "RO"
# Ignore EOF - end of file
EOF = "EOF"
# Ignore lst as shorthand for list
lst = "lst"
# AS NEEDED: Add More Words Below
18 changes: 14 additions & 4 deletions .jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ fi
if test -z "$SLIM"; then
export VENV_SYSTEM_PACKAGES='--system-site-packages'
fi
if test ! -z "$CATEGORY"; then
export PY_CAT="-m $CATEGORY"
fi

if test "$WORKSPACE" != "`pwd`"; then
echo "ERROR: pwd is not WORKSPACE"
Expand Down Expand Up @@ -122,10 +119,23 @@ if test -z "$MODE" -o "$MODE" == setup; then
echo "PYOMO_CONFIG_DIR=$PYOMO_CONFIG_DIR"
echo ""

# Call Pyomo build scripts to build TPLs that would normally be
# skipped by the pyomo download-extensions / build-extensions
# actions below
if [[ " $CATEGORY " == *" builders "* ]]; then
echo ""
echo "Running local build scripts..."
echo ""
set -x
python pyomo/contrib/simplification/build.py --build-deps || exit 1
set +x
fi

# Use Pyomo to download & compile binary extensions
i=0
while /bin/true; do
i=$[$i+1]
echo ""
echo "Downloading pyomo extensions (attempt $i)"
pyomo download-extensions $PYOMO_DOWNLOAD_ARGS
if test $? == 0; then
Expand Down Expand Up @@ -178,7 +188,7 @@ if test -z "$MODE" -o "$MODE" == test; then
python -m pytest -v \
-W ignore::Warning \
--junitxml="TEST-pyomo.xml" \
$PY_CAT $TEST_SUITES $PYTEST_EXTRA_ARGS
-m "$CATEGORY" $TEST_SUITES $PYTEST_EXTRA_ARGS

# Combine the coverage results and upload
if test -z "$DISABLE_COVERAGE"; then
Expand Down
75 changes: 75 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,81 @@ Pyomo CHANGELOG
===============


-------------------------------------------------------------------------------
Pyomo 6.7.2 (9 May 2024)
-------------------------------------------------------------------------------

- General
- Support config domains with either method or attribute domain_name (#3159)
- Automate TPL callback registrations (#3167)
- Fix type registrations for ExternalFunction arguments (#3168)
- Only modify module path and spec for deferred import modules (#3176)
- Add "mixed" standard form representation (#3201)
- Support "default" dispatchers in `ExitNodeDispatcher` (#3194)
- Redefine objective sense as a proper `IntEnum` (#3224)
- Fix division-by-0 bug in linear walker (#3246)
- Core
- Allow `Var` objects in `LinearExpression.args` (#3189)
- Add type hints to components (#3173)
- Simplify expressions generated by `TemplateSumExpression` (#3196)
- Make component data public classes (#3221, #3253)
- Exploit repeated named expressions in `identify_variables` (#3190)
- Documentation
- NFC: Add link to the HOMOWP companion notebooks (#3195)
- Update installation documentation to include Cython instructions (#3208)
- Add links to the Pyomo Book Springer page (#3211)
- Solver Interfaces
- Fix division by zero error in linear presolve (#3161)
- Subprocess timeout update (#3183)
- Solver Refactor - Bug fixes for various components (#3181, #3214, #3228)
- NLv2: handle presolved independent linear subsystems (#3193)
- Update `LegacySolverWrapper` compatibility with the `pyomo` script (#3202)
- Fix mosek_direct to use putqconk instead of putqcon (#3199)
- Check _skip_trivial_constraints before the constraint body (#3226)
- Fix AMPL solver duplicate funcadd (#3206)
- Disable the use of universal newlines in the ipopt_v2 NL file (#3231)
- NLv2: fix reporting numbers of nonlinear discrete variables (#3238)
- Fix: Get SCIP solving time considering float number with some text (#3234)
- Solver Refactor - Add `gurobi_direct` implementation (#3225)
- Testing
- Update TPL package list due to `contrib.solver` (#3164)
- Set maxDiff=None on the base TestCase class (#3171)
- Testing infrastructure updates (#3175)
- Typos update for March 2024 (#3219)
- Add openmpi to testing environment to resolve issue in mpi4py (#3236, #3239)
- Skip black 24.4.1 due to a bug in the parser (#3247)
- Skip tests on draft and WIP pull requests (#3223)
- Update GHA to grab gurobipy from PyPI (#3254)
- GDP
- Use private_data for all original / transformed component mappings (#3166)
- Fix a bug in gdp.bigm transformation for nested GDPs (#3213)
- Contributed Packages
- APPSI: cmodel: handle non-mutable params in var / constraint bounds (#3182)
- APPSI: Allow APPSI FBBT to handle nested named Expressions (#3185)
- APPSI: Add MAiNGO solver interface (#3165)
- CP: Add SequenceVar and other logical expressions for scheduling (#3227)
- DoE: Bug fixes (#3245)
- iis: Add minimal intractable system infeasibility diagnostics (#3172)
- incidence_analysis: Improve `solve_strongly_connected_components`
performance for models with named expressions (#3186)
- incidence_analysis: Add function to plot incidence graph in
Dulmage-Mendelsohn order (#3207)
- incidence_analysis: Require variables and constraints to be specified
separately in `IncidenceGraphInterface.remove_nodes` (#3212)
- latex_printer: bugfix for set operations / multidimensional sets (#3177)
- MindtPy: Add HiGHS support (#2971)
- MindtPy: Add call_before_subproblem_solve callback (#3251)
- Parmest: New UI using experiment lists (#3160)
- piecewise: Add piecewise linear transformations (#3036)
- preprocessing: bugfix: intersect domains in variable aggregator (#3241)
- PyNumero: Allow CyIpopt to solve problems without objectives (#3163)
- PyNumero: Work around bug in CyIpopt 1.4.0 (#3222)
- PyNumero: Include "inventory" in readme (#3248)
- PyROS: Simplify custom domain validators (#3169)
- PyROS: Fix iteration logging for edge case involving discrete sets (#3170)
- PyROS: Update solver timing system (#3198)
- simplification: expression simplification using GiNaC or SymPy (#3088)

-------------------------------------------------------------------------------
Pyomo 6.7.1 (21 Feb 2024)
-------------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ version, we will remove testing for that Python version.

### Tutorials and Examples

* [Pyomo — Optimization Modeling in Python](https://link.springer.com/book/10.1007/978-3-030-68928-5)
* [Pyomo Workshop Slides](https://github.com/Pyomo/pyomo-tutorials/blob/main/Pyomo-Workshop-December-2023.pdf)
* [Prof. Jeffrey Kantor's Pyomo Cookbook](https://jckantor.github.io/ND-Pyomo-Cookbook/)
* The [companion notebooks](https://mobook.github.io/MO-book/intro.html)
for *Hands-On Mathematical Optimization with Python*
* [Pyomo Gallery](https://github.com/Pyomo/PyomoGallery)

### Getting Help
Expand Down
Loading

0 comments on commit 40925d0

Please sign in to comment.