Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Pyomo/pyomo into logarithmi…
Browse files Browse the repository at this point in the history
…c_via_gdp
  • Loading branch information
sadavis1 committed Jul 18, 2024
2 parents 3a61a48 + 25d5910 commit 3994f20
Show file tree
Hide file tree
Showing 197 changed files with 14,272 additions and 2,022 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.3</stableVersionNumber>
<releaseNumber>6.7.3</releaseNumber>

</developmentStatus>

Expand Down
26 changes: 21 additions & 5 deletions .github/workflows/test_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@ jobs:
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,.py
# 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; ignore RTD because
# a magically-generated string is triggering a failure
exclude_urls: https://pyomo-jenkins.sandia.gov/,https://pyomo.readthedocs.io/en/%s/errors.html


build:
Expand Down Expand Up @@ -181,7 +195,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 @@ -193,7 +207,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 @@ -264,11 +279,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 @@ -338,7 +354,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
34 changes: 29 additions & 5 deletions .github/workflows/test_pr_and_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,21 @@ jobs:
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,.py
# 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
# - RTD because a magically-generated string triggers failures
exclude_urls: https://pyomo-jenkins.sandia.gov/,https://pyomo.readthedocs.io/en/%s/errors.html


build:
Expand All @@ -72,6 +87,11 @@ jobs:
other: [""]
category: [""]

# win/3.8 conda builds no longer work due to environment not being able
# to resolve. We are skipping it now.
exclude:
- os: windows-latest
python: 3.8
include:
- os: ubuntu-latest
TARGET: linux
Expand Down Expand Up @@ -218,7 +238,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 @@ -230,7 +250,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 @@ -301,11 +322,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 @@ -371,6 +393,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 @@ -613,7 +636,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
7 changes: 7 additions & 0 deletions .github/workflows/typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ caf = "caf"
WRONLY = "WRONLY"
# Ignore the name Hax
Hax = "Hax"
# Ignore dout (short for dual output in SAS solvers)
dout = "dout"
# 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
Expand All @@ -64,4 +69,6 @@ RO = "RO"
EOF = "EOF"
# Ignore lst as shorthand for list
lst = "lst"
# Abbreviation of gamma (used in stochpdegas1_automatic.py)
gam = "gam"
# AS NEEDED: Add More Words Below
68 changes: 51 additions & 17 deletions .jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@
#
# CODECOV_TOKEN: the token to use when uploading results to codecov.io
#
# CODECOV_ARGS: additional arguments to pass to the codecov uploader
# (e.g., to support SSL certificates)
# CODECOV_SOURCE_BRANCH: passed to the 'codecov-cli' command; branch of Pyomo
# (e.g., to enable correct codecov uploads)
#
# CODECOV_REPO_OWNER: passed to the 'codecov-cli' command; owner of repo
# (e.g., to enable correct codecov uploads)
#
# DISABLE_COVERAGE: if nonempty, then coverage analysis is disabled
#
Expand All @@ -43,9 +46,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 +122,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 +191,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 All @@ -192,22 +205,43 @@ if test -z "$MODE" -o "$MODE" == test; then
# Note, that the PWD should still be $WORKSPACE/pyomo
#
coverage combine || exit 1
coverage report -i
coverage report -i || exit 1
coverage xml -i || exit 1
export OS=`uname`
if test -z "$CODECOV_TOKEN"; then
coverage xml
else
CODECOV_JOB_NAME=`echo ${JOB_NAME} | sed -r 's/^(.*autotest_)?Pyomo_([^\/]+).*/\2/'`.$BUILD_NUMBER.$python
if test -z "$PYOMO_SOURCE_SHA"; then
PYOMO_SOURCE_SHA=$GIT_COMMIT
fi
if test -n "$CODECOV_TOKEN" -a -n "$PYOMO_SOURCE_SHA"; then
CODECOV_JOB_NAME=$(echo ${JOB_NAME} \
| sed -r 's/^(.*autotest_)?Pyomo_([^\/]+).*/\2/').$BUILD_NUMBER.$python
if test -z "$CODECOV_REPO_OWNER"; then
if test -n "$PYOMO_SOURCE_REPO"; then
CODECOV_REPO_OWNER=$(echo "$PYOMO_SOURCE_REPO" | cut -d '/' -f 4)
elif test -n "$GIT_URL"; then
CODECOV_REPO_OWNER=$(echo "$GIT_URL" | cut -d '/' -f 4)
else
CODECOV_REPO_OWNER=""
fi
fi
if test -z "$CODECOV_SOURCE_BRANCH"; then
CODECOV_SOURCE_BRANCH=$(git branch -av --contains "$PYOMO_SOURCE_SHA" \
| grep "${PYOMO_SOURCE_SHA:0:7}" | grep "/origin/" \
| cut -d '/' -f 3 | cut -d' ' -f 1)
if test -z "$CODECOV_SOURCE_BRANCH"; then
CODECOV_SOURCE_BRANCH=main
fi
fi
i=0
while /bin/true; do
i=$[$i+1]
echo "Uploading coverage to codecov (attempt $i)"
codecov -X gcovcodecov -X gcov -X s3 --no-color \
-t $CODECOV_TOKEN --root `pwd` -e OS,python \
--name $CODECOV_JOB_NAME $CODECOV_ARGS \
| tee .cover.upload
if test $? == 0 -a `grep -i error .cover.upload \
| grep -v branch= | wc -l` -eq 0; then
codecovcli -v upload-process --sha $PYOMO_SOURCE_SHA \
--fail-on-error --git-service github --token $CODECOV_TOKEN \
--slug pyomo/pyomo --file coverage.xml --disable-search \
--name $CODECOV_JOB_NAME \
--branch $CODECOV_REPO_OWNER:$CODECOV_SOURCE_BRANCH \
--env OS,python --network-root-folder `pwd` --plugin noop
if test $? == 0; then
break
elif test $i -ge 4; then
exit 1
Expand Down
91 changes: 91 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,97 @@ Pyomo CHANGELOG
===============


-------------------------------------------------------------------------------
Pyomo 6.7.3 (29 May 2024)
-------------------------------------------------------------------------------

- Core
- Deprecate `pyomo.core.plugins.transform.model.to_standard_form()` (#3265)
- Reorder definitions to avoid `NameError` in some situations (#3264)
- Solver Interfaces
- NLv2: Fix linear presolver with constant defined vars/external fcns (#3276)
- Testing
- Add URL checking to GHA linting job (#3259, #3261)
- Skip Windows Python 3.8 conda GHA job (#3269)
- Contributed Packages
- DoE: Bug fixes for workshop (#3267)
- viewer: Update guard for pint import (#3277)

-------------------------------------------------------------------------------
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
Loading

0 comments on commit 3994f20

Please sign in to comment.