Skip to content

Commit 06cb150

Browse files
Merge pull request #1 from Pyomo/main
update the fork
2 parents c5a50b7 + e0c573b commit 06cb150

File tree

309 files changed

+19966
-6392
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

309 files changed

+19966
-6392
lines changed

.coin-or/projDesc.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ Carl D. Laird, Chair, Pyomo Management Committee, claird at andrew dot cmu dot e
157157
<!-- GLPK -->
158158
<!-- </packageName> -->
159159
<!-- <packageURL> -->
160-
<!-- http://www.gnu.org/software/glpk/ -->
161160
<!-- </packageURL> -->
162161
<!-- <requiredOrOptional> -->
163162
<!-- Optional -->
@@ -227,8 +226,8 @@ Carl D. Laird, Chair, Pyomo Management Committee, claird at andrew dot cmu dot e
227226
Use explicit overrides to disable use of automated
228227
version reporting.
229228
-->
230-
<stableVersionNumber>6.9.1</stableVersionNumber>
231-
<releaseNumber>6.9.1</releaseNumber>
229+
<stableVersionNumber>6.9.4</stableVersionNumber>
230+
<releaseNumber>6.9.4</releaseNumber>
232231

233232
</developmentStatus>
234233

.github/workflows/release_wheel_creation.yml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,8 @@ jobs:
5959

6060
steps:
6161
- uses: actions/checkout@v4
62-
- name: Create pyproject.toml
63-
run: |
64-
# Per the cibuildwheel documentation, you can technically use
65-
# CIBW_BEFORE_BUILD to do these steps; however, as of the newest
66-
# version (2.21.3) this feature does not work. This is a hack
67-
# to make cibuildwheel recognize our pre-build requirements
68-
echo -e '[build-system]\n\nrequires = [ "setuptools", "wheel", "cython", "pybind11" ]' > $GITHUB_WORKSPACE/pyproject.toml
69-
cat $GITHUB_WORKSPACE/pyproject.toml
70-
ls -la $GITHUB_WORKSPACE
7162
- name: Build wheels
72-
uses: pypa/cibuildwheel@v2.21.3
63+
uses: pypa/cibuildwheel@main
7364
with:
7465
output-dir: dist
7566
env:
@@ -118,17 +109,8 @@ jobs:
118109
uses: docker/setup-qemu-action@v3
119110
with:
120111
platforms: all
121-
- name: Create pyproject.toml
122-
run: |
123-
# Per the cibuildwheel documentation, you can technically use
124-
# CIBW_BEFORE_BUILD to do these steps; however, as of the newest
125-
# version (2.21.3) this feature does not work. This is a hack
126-
# to make cibuildwheel recognize our pre-build requirements
127-
echo -e '[build-system]\n\nrequires = [ "setuptools", "wheel", "cython", "pybind11" ]' > $GITHUB_WORKSPACE/pyproject.toml
128-
cat $GITHUB_WORKSPACE/pyproject.toml
129-
ls -la $GITHUB_WORKSPACE
130112
- name: Build wheels
131-
uses: pypa/cibuildwheel@v2.21.3
113+
uses: pypa/cibuildwheel@main
132114
with:
133115
output-dir: dist
134116
env:
@@ -158,10 +140,11 @@ jobs:
158140
- name: Install dependencies
159141
run: |
160142
python -m pip install --upgrade pip
161-
pip install twine wheel setuptools pybind11
143+
pip install build twine wheel setuptools pybind11
162144
- name: Build pure python wheel
163145
run: |
164-
python setup.py --without-cython sdist --format=gztar bdist_wheel
146+
export PYOMO_SETUP_ARGS=--without-cython
147+
python -m build --wheel --outdir dist --config-setting="--build-option=--without-cython"
165148
- name: Upload artifact
166149
uses: actions/upload-artifact@v4
167150
with:
@@ -189,10 +172,11 @@ jobs:
189172
- name: Install dependencies
190173
run: |
191174
python -m pip install --upgrade pip
192-
pip install twine wheel setuptools pybind11
175+
pip install build twine wheel 'setuptools>=65' pybind11
193176
- name: Build generic tarball
194177
run: |
195-
python setup.py --without-cython sdist --format=gztar
178+
export PYOMO_SETUP_ARGS=--without-cython
179+
python -m build --sdist --outdir dist --config-setting="--build-option=--without-cython"
196180
- name: Upload artifact
197181
uses: actions/upload-artifact@v4
198182
with:

.github/workflows/test_branches.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ env:
2323
PYTHON_CORE_PKGS: wheel
2424
PYPI_ONLY: z3-solver linear-tree
2525
PYPY_EXCLUDE: scipy numdifftools seaborn statsmodels linear-tree
26-
CACHE_VER: v221013.1
26+
CACHE_VER: v250827.0
2727
NEOS_EMAIL: [email protected]
2828
SRC_REF: ${{ github.head_ref || github.ref }}
2929
PYOMO_WORKFLOW: branch
@@ -44,9 +44,10 @@ jobs:
4444
python-version: '3.10'
4545
- name: Black Formatting Check
4646
run: |
47-
# Note v24.4.1 fails due to a bug in the parser
47+
# Note v24.4.1 fails due to a bug in the parser. Project-level
48+
# configuration is inherited from pyproject.toml.
4849
pip install 'black!=24.4.1'
49-
black . -S -C --check --diff --exclude examples/pyomobook/python-ch/BadIndent.py
50+
black . --check --diff
5051
- name: Spell Check
5152
uses: crate-ci/typos@master
5253
with:
@@ -63,9 +64,13 @@ jobs:
6364
verbose: true
6465
# How many times to retry a failed request (defaults to 1)
6566
retry_count: 3
66-
# Exclude Jenkins because it's behind a firewall; ignore RTD because
67-
# a magically-generated string is triggering a failure
67+
# Exclude:
68+
# - Jenkins because it's behind a firewall
69+
# - RTD because a magically-generated string triggers failures
6870
exclude_urls: https://pyomo-jenkins.sandia.gov/,https://pyomo.readthedocs.io/en/%s/errors.html
71+
# Exclude:
72+
# - All gnu.org links because they consistently fail the checker
73+
exclude_patterns: https://www.gnu.org
6974

7075

7176
build:
@@ -142,7 +147,6 @@ jobs:
142147
else
143148
echo "GHA_JOBGROUP=other" >> $GITHUB_ENV
144149
fi
145-
# Note: pandas 1.0.3 causes gams 29.1.0 import to fail in python 3.8
146150
EXTRAS=tests
147151
if test -z "${{matrix.slim}}"; then
148152
EXTRAS="$EXTRAS,docs,optional"
@@ -174,7 +178,7 @@ jobs:
174178
id: download-cache
175179
with:
176180
path: cache/download
177-
key: download-${{env.CACHE_VER}}.0-${{runner.os}}
181+
key: download-${{env.CACHE_VER}}-${{runner.os}}
178182

179183
- name: Configure curl
180184
run: |
@@ -348,7 +352,7 @@ jobs:
348352
if test "${{matrix.TARGET}}" == linux; then
349353
EXCLUDE="casadi numdifftools $EXCLUDE"
350354
fi
351-
if [[ "${{matrix.TARGET}}" == win && "${{matrix.python}}" == "3.13" ]]; then
355+
if [[ "${{matrix.TARGET}}" == win && "${{matrix.python}}" == 3.13* ]]; then
352356
# As of Nov 7, 2024, qtconsole is not compatible with python 3.13 on win
353357
EXCLUDE="qtconsole $EXCLUDE"
354358
fi
@@ -373,7 +377,7 @@ jobs:
373377
fi
374378
# Note: this will fail the build if any installation fails (or
375379
# possibly if it outputs messages to stderr)
376-
conda install --update-deps -q -y $CONDA_DEPENDENCIES
380+
conda install --update-deps -q -y python="${{matrix.python}}" $CONDA_DEPENDENCIES
377381
if test -z "${{matrix.slim}}"; then
378382
# xpress.init() (xpress 9.5.1 from conda) hangs indefinitely
379383
# on GHA/Windows under Python 3.10 and 3.11. Exclude that
@@ -534,9 +538,8 @@ jobs:
534538
echo "DYLD_LIBRARY_PATH=${env:DYLD_LIBRARY_PATH}:$GAMS_DIR" `
535539
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
536540
$INSTALLER = "${env:DOWNLOAD_DIR}/gams_install.exe"
537-
# We are pinning to 29.1.0 because a license is required for
538-
# versions after this in order to run in demo mode.
539-
$URL = "https://d37drm4t2jghv5.cloudfront.net/distributions/29.1.0"
541+
# Demo licenses are included for 5mo from the newest release
542+
$URL = "https://d37drm4t2jghv5.cloudfront.net/distributions/latest"
540543
if ( "${{matrix.TARGET}}" -eq "win" ) {
541544
$URL = "$URL/windows/windows_x64_64.exe"
542545
} elseif ( "${{matrix.TARGET}}" -eq "osx" ) {
@@ -654,14 +657,15 @@ jobs:
654657
655658
- name: Install Pyomo
656659
run: |
660+
export PYOMO_SETUP_ARGS=${{ matrix.setup_options }}
657661
echo ""
658662
echo "Clone Pyomo-model-libraries..."
659663
URL=https://github.com/Pyomo/pyomo-model-libraries.git
660664
git clone -b ${SRC_REF##*/} $URL || git clone -b main $URL
661665
echo ""
662666
echo "Install Pyomo..."
663667
echo ""
664-
$PYTHON_EXE setup.py develop ${{matrix.setup_options}}
668+
$PYTHON_EXE -m pip install -e .
665669
echo ""
666670
echo "Set custom PYOMO_CONFIG_DIR"
667671
echo ""
@@ -790,7 +794,7 @@ jobs:
790794
echo ""
791795
echo "Install Pyomo..."
792796
echo ""
793-
python setup.py develop
797+
python -m pip install -e .
794798
echo ""
795799
echo "Set custom PYOMO_CONFIG_DIR"
796800
echo ""
@@ -868,13 +872,14 @@ jobs:
868872
869873
- name: Install Pyomo
870874
run: |
875+
export PYOMO_SETUP_ARGS=${{ matrix.setup_options }}
871876
echo ""
872877
echo "Clone Pyomo-model-libraries..."
873878
git clone https://github.com/Pyomo/pyomo-model-libraries.git
874879
echo ""
875880
echo "Install Pyomo..."
876881
echo ""
877-
$PYTHON_EXE setup.py develop ${{matrix.setup_options}}
882+
$PYTHON_EXE -m pip install -e .
878883
echo ""
879884
echo "Set custom PYOMO_CONFIG_DIR"
880885
echo ""

.github/workflows/test_pr_and_main.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ env:
3131
PYTHON_CORE_PKGS: wheel
3232
PYPI_ONLY: z3-solver linear-tree
3333
PYPY_EXCLUDE: scipy numdifftools seaborn statsmodels linear-tree
34-
CACHE_VER: v221013.1
34+
CACHE_VER: v250827.0
3535
NEOS_EMAIL: [email protected]
3636
SRC_REF: ${{ github.head_ref || github.ref }}
3737
PYOMO_WORKFLOW: |
@@ -55,9 +55,10 @@ jobs:
5555
python-version: '3.10'
5656
- name: Black Formatting Check
5757
run: |
58-
# Note v24.4.1 fails due to a bug in the parser
58+
# Note v24.4.1 fails due to a bug in the parser. Project-level
59+
# configuration is inherited from pyproject.toml.
5960
pip install 'black!=24.4.1'
60-
black . -S -C --check --diff --exclude examples/pyomobook/python-ch/BadIndent.py
61+
black . --check --diff
6162
- name: Spell Check
6263
uses: crate-ci/typos@master
6364
with:
@@ -74,9 +75,13 @@ jobs:
7475
verbose: true
7576
# How many times to retry a failed request (defaults to 1)
7677
retry_count: 3
77-
# Exclude Jenkins because it's behind a firewall; ignore RTD because
78-
# a magically-generated string is triggering a failure
78+
# Exclude:
79+
# - Jenkins because it's behind a firewall
80+
# - RTD because a magically-generated string triggers failures
7981
exclude_urls: https://pyomo-jenkins.sandia.gov/,https://pyomo.readthedocs.io/en/%s/errors.html
82+
# Exclude:
83+
# - All gnu.org links because they consistently fail the checker
84+
exclude_patterns: https://www.gnu.org
8085

8186

8287
build:
@@ -194,7 +199,6 @@ jobs:
194199
else
195200
echo "GHA_JOBGROUP=other" >> $GITHUB_ENV
196201
fi
197-
# Note: pandas 1.0.3 causes gams 29.1.0 import to fail in python 3.8
198202
EXTRAS=tests
199203
if test -z "${{matrix.slim}}"; then
200204
EXTRAS="$EXTRAS,docs,optional"
@@ -226,7 +230,7 @@ jobs:
226230
id: download-cache
227231
with:
228232
path: cache/download
229-
key: download-${{env.CACHE_VER}}.0-${{runner.os}}
233+
key: download-${{env.CACHE_VER}}-${{runner.os}}
230234

231235
- name: Configure curl
232236
run: |
@@ -400,7 +404,7 @@ jobs:
400404
if test "${{matrix.TARGET}}" == linux; then
401405
EXCLUDE="casadi numdifftools $EXCLUDE"
402406
fi
403-
if [[ "${{matrix.TARGET}}" == win && "${{matrix.python}}" == "3.13" ]]; then
407+
if [[ "${{matrix.TARGET}}" == win && "${{matrix.python}}" == 3.13* ]]; then
404408
# As of Nov 7, 2024, qtconsole is not compatible with python 3.13 on win
405409
EXCLUDE="qtconsole $EXCLUDE"
406410
fi
@@ -425,7 +429,7 @@ jobs:
425429
fi
426430
# Note: this will fail the build if any installation fails (or
427431
# possibly if it outputs messages to stderr)
428-
conda install --update-deps -q -y $CONDA_DEPENDENCIES
432+
conda install --update-deps -q -y python="${{matrix.python}}" $CONDA_DEPENDENCIES
429433
if test -z "${{matrix.slim}}"; then
430434
# xpress.init() (xpress 9.5.1 from conda) hangs indefinitely
431435
# on GHA/Windows under Python 3.10 and 3.11. Exclude that
@@ -586,9 +590,8 @@ jobs:
586590
echo "DYLD_LIBRARY_PATH=${env:DYLD_LIBRARY_PATH}:$GAMS_DIR" `
587591
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
588592
$INSTALLER = "${env:DOWNLOAD_DIR}/gams_install.exe"
589-
# We are pinning to 29.1.0 because a license is required for
590-
# versions after this in order to run in demo mode.
591-
$URL = "https://d37drm4t2jghv5.cloudfront.net/distributions/29.1.0"
593+
# Demo licenses are included for 5mo from the newest release
594+
$URL = "https://d37drm4t2jghv5.cloudfront.net/distributions/latest"
592595
if ( "${{matrix.TARGET}}" -eq "win" ) {
593596
$URL = "$URL/windows/windows_x64_64.exe"
594597
} elseif ( "${{matrix.TARGET}}" -eq "osx" ) {
@@ -706,14 +709,15 @@ jobs:
706709
707710
- name: Install Pyomo
708711
run: |
712+
export PYOMO_SETUP_ARGS=${{ matrix.setup_options }}
709713
echo ""
710714
echo "Clone Pyomo-model-libraries..."
711715
URL=https://github.com/Pyomo/pyomo-model-libraries.git
712716
git clone -b ${SRC_REF##*/} $URL || git clone -b main $URL
713717
echo ""
714718
echo "Install Pyomo..."
715719
echo ""
716-
$PYTHON_EXE setup.py develop ${{matrix.setup_options}}
720+
$PYTHON_EXE -m pip install -e .
717721
echo ""
718722
echo "Set custom PYOMO_CONFIG_DIR"
719723
echo ""
@@ -843,7 +847,7 @@ jobs:
843847
echo ""
844848
echo "Install Pyomo..."
845849
echo ""
846-
python setup.py develop
850+
python -m pip install -e .
847851
echo ""
848852
echo "Set custom PYOMO_CONFIG_DIR"
849853
echo ""
@@ -921,13 +925,14 @@ jobs:
921925
922926
- name: Install Pyomo
923927
run: |
928+
export PYOMO_SETUP_ARGS=${{ matrix.setup_options }}
924929
echo ""
925930
echo "Clone Pyomo-model-libraries..."
926931
git clone https://github.com/Pyomo/pyomo-model-libraries.git
927932
echo ""
928933
echo "Install Pyomo..."
929934
echo ""
930-
$PYTHON_EXE setup.py develop ${{matrix.setup_options}}
935+
$PYTHON_EXE -m pip install -e .
931936
echo ""
932937
echo "Set custom PYOMO_CONFIG_DIR"
933938
echo ""

.github/workflows/typos.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,6 @@ EOF = "EOF"
7171
lst = "lst"
7272
# Abbreviation of gamma (used in stochpdegas1_automatic.py)
7373
gam = "gam"
74+
# Regex search term from contrib/solver/solvers/ipopt
75+
ond = "ond"
7476
# AS NEEDED: Add More Words Below

.github/workflows/url_check.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@ jobs:
3030
# - Jenkins because it's behind a firewall
3131
# - RTD because a magically-generated string triggers failures
3232
exclude_urls: https://pyomo-jenkins.sandia.gov/,https://pyomo.readthedocs.io/en/%s/errors.html
33+
# Exclude:
34+
# - All gnu.org links because they consistently fail the checker
35+
exclude_patterns: https://www.gnu.org

.jenkins.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#
2929
# DISABLE_COVERAGE: if nonempty, then coverage analysis is disabled
3030
#
31-
# PYOMO_SETUP_ARGS: passed to the 'python setup.py develop' command
31+
# PYOMO_SETUP_ARGS: passed to the 'pip install' command
3232
# (e.g., to specify --with-cython)
3333
#
3434
# PYOMO_DOWNLOAD_ARGS: passed to the 'pyomo download-extensions' command
@@ -94,7 +94,7 @@ if test -z "$MODE" -o "$MODE" == setup; then
9494
echo "PyUtilib not found; skipping"
9595
fi
9696
pushd "$WORKSPACE/pyomo" || exit 1
97-
python setup.py develop $PYOMO_SETUP_ARGS || exit 1
97+
pip install -e . || exit 1
9898
popd
9999
#
100100
# DO NOT install pyomo-model-libraries

0 commit comments

Comments
 (0)