Skip to content

Commit 50d24d8

Browse files
authored
Merge branch 'main' into fme-del-fix
2 parents d6eb18e + 3d1bb30 commit 50d24d8

File tree

436 files changed

+19016
-8500
lines changed

Some content is hidden

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

436 files changed

+19016
-8500
lines changed

.codecov.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
codecov:
22
notify:
33
# GHA: 5, Jenkins: 11
4-
# Accurate as of July 3, 2024
5-
# Potential to change when Python versions change
6-
after_n_builds: 16
7-
wait_for_ci: true
4+
# Accurate as of April 1, 2025
5+
# Potential to change when Python versions change. We will allow
6+
# codecov to start reporting when 80% of the reports are in. This
7+
# will hopefully help avoid an issue where codecov is not tracking
8+
# PR branches (see https://github.com/codecov/feedback/issues/692).
9+
after_n_builds: 13
10+
wait_for_ci: false
811
require_ci_to_pass: false
12+
comment:
13+
after_n_builds: 13
914
coverage:
10-
range:
11-
- 50.0
12-
- 100.0
15+
range: 70..98
1316
status:
1417
patch:
1518
default:

.coin-or/projDesc.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ Carl D. Laird, Chair, Pyomo Management Committee, claird at andrew dot cmu dot e
227227
Use explicit overrides to disable use of automated
228228
version reporting.
229229
-->
230-
<stableVersionNumber>6.9.1</stableVersionNumber>
231-
<releaseNumber>6.9.1</releaseNumber>
230+
<stableVersionNumber>6.9.2</stableVersionNumber>
231+
<releaseNumber>6.9.2</releaseNumber>
232232

233233
</developmentStatus>
234234

.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: 26 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@ env:
2626
CACHE_VER: v221013.1
2727
NEOS_EMAIL: tests@pyomo.org
2828
SRC_REF: ${{ github.head_ref || github.ref }}
29+
PYOMO_WORKFLOW: branch
2930

3031
jobs:
3132
lint:
3233
name: lint/style-and-typos
34+
if: |
35+
${{ ! ( contains(github.event.pull_request.title, '[WIP]') ||
36+
github.event.pull_request.draft ) }}
3337
runs-on: ubuntu-latest
3438
steps:
3539
- name: Checkout Pyomo source
@@ -48,6 +52,7 @@ jobs:
4852
with:
4953
config: ./.github/workflows/typos.toml
5054
- name: URL Checker
55+
if: env.PYOMO_WORKFLOW == 'branch'
5156
uses: urlstechie/urlchecker-action@0.0.34
5257
with:
5358
# A comma-separated list of file types to cover in the URL checks
@@ -479,33 +484,38 @@ jobs:
479484
IPOPT_DIR=$TPL_DIR/ipopt
480485
echo "$IPOPT_DIR" >> $GITHUB_PATH
481486
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$IPOPT_DIR" >> $GITHUB_ENV
487+
echo "DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$IPOPT_DIR" >> $GITHUB_ENV
482488
NEW_PYOMO_PATH="$IPOPT_DIR:$PYOMO_PATH"
483489
echo "PYOMO_PATH=$NEW_PYOMO_PATH" >> $GITHUB_ENV
484490
mkdir -p $IPOPT_DIR
485491
IPOPT_TAR=${DOWNLOAD_DIR}/ipopt.tar.gz
486492
if test ! -e $IPOPT_TAR; then
487493
echo "...downloading Ipopt"
488-
if test "${{matrix.TARGET}}" == osx; then
489-
echo "IDAES Ipopt not available on OSX"
490-
exit 0
491-
fi
492494
URL=https://github.com/IDAES/idaes-ext
493495
RELEASE=$(curl --max-time 150 --retry 8 \
494496
-L -s -H 'Accept: application/json' ${URL}/releases/latest)
495497
VER=$(echo $RELEASE | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/')
496498
URL=${URL}/releases/download/$VER
497499
if test "${{matrix.TARGET}}" == linux; then
498500
curl --max-time 150 --retry 8 \
499-
-L $URL/idaes-solvers-ubuntu2004-x86_64.tar.gz \
500-
> $IPOPT_TAR
501+
-L $URL/idaes-solvers-ubuntu2204-x86_64.tar.gz \
502+
-o $IPOPT_TAR
503+
elif test "${{matrix.TARGET}}" == osx; then
504+
curl --max-time 150 --retry 8 \
505+
-L $URL/idaes-solvers-darwin-aarch64.tar.gz \
506+
-o $IPOPT_TAR
501507
else
502508
curl --max-time 150 --retry 8 \
503509
-L $URL/idaes-solvers-windows-x86_64.tar.gz \
504510
$URL/idaes-lib-windows-x86_64.tar.gz > $IPOPT_TAR
505511
fi
506512
fi
507513
cd $IPOPT_DIR
508-
tar -xzi < $IPOPT_TAR
514+
if test "${{matrix.TARGET}}" == win; then
515+
tar -xzi < $IPOPT_TAR
516+
else
517+
tar -xzf $IPOPT_TAR
518+
fi
509519
echo ""
510520
echo "$IPOPT_DIR"
511521
ls -l $IPOPT_DIR
@@ -644,14 +654,15 @@ jobs:
644654
645655
- name: Install Pyomo
646656
run: |
657+
export PYOMO_SETUP_ARGS=${{ matrix.setup_options }}
647658
echo ""
648659
echo "Clone Pyomo-model-libraries..."
649660
URL=https://github.com/Pyomo/pyomo-model-libraries.git
650661
git clone -b ${SRC_REF##*/} $URL || git clone -b main $URL
651662
echo ""
652663
echo "Install Pyomo..."
653664
echo ""
654-
$PYTHON_EXE setup.py develop ${{matrix.setup_options}}
665+
$PYTHON_EXE -m pip install -e .
655666
echo ""
656667
echo "Set custom PYOMO_CONFIG_DIR"
657668
echo ""
@@ -780,7 +791,7 @@ jobs:
780791
echo ""
781792
echo "Install Pyomo..."
782793
echo ""
783-
python setup.py develop
794+
python -m pip install -e .
784795
echo ""
785796
echo "Set custom PYOMO_CONFIG_DIR"
786797
echo ""
@@ -805,7 +816,8 @@ jobs:
805816
cover:
806817
name: process-coverage-${{ matrix.TARGET }}
807818
needs: build
808-
if: ${{ false }} # turn off for branches
819+
# run even if a build job fails, but not if canceled (except for branches)
820+
if: ${{ false }}
809821
runs-on: ${{ matrix.os }}
810822
timeout-minutes: 10
811823
strategy:
@@ -857,13 +869,14 @@ jobs:
857869
858870
- name: Install Pyomo
859871
run: |
872+
export PYOMO_SETUP_ARGS=${{ matrix.setup_options }}
860873
echo ""
861874
echo "Clone Pyomo-model-libraries..."
862875
git clone https://github.com/Pyomo/pyomo-model-libraries.git
863876
echo ""
864877
echo "Install Pyomo..."
865878
echo ""
866-
$PYTHON_EXE setup.py develop ${{matrix.setup_options}}
879+
$PYTHON_EXE -m pip install -e .
867880
echo ""
868881
echo "Set custom PYOMO_CONFIG_DIR"
869882
echo ""
@@ -876,26 +889,6 @@ jobs:
876889
$PYTHON_EXE -c "from pyomo.dataportal.parse_datacmds import \
877890
parse_data_commands; parse_data_commands(data='')"
878891
879-
- name: Update codecov uploader
880-
run: |
881-
set +e
882-
CODECOV="${GITHUB_WORKSPACE}/codecov.sh"
883-
echo "CODECOV=$CODECOV" >> $GITHUB_ENV
884-
for i in `seq 3`; do
885-
echo "Downloading current codecov script (attempt ${i})"
886-
curl -L https://codecov.io/bash -o $CODECOV
887-
if test $? == 0; then
888-
break
889-
fi
890-
DELAY=$(( RANDOM % 30 + 30))
891-
echo "Pausing $DELAY seconds before re-attempting download"
892-
sleep $DELAY
893-
done
894-
if test ! -e $CODECOV; then
895-
echo "Failed to download codecov.sh"
896-
exit 1
897-
fi
898-
899892
- name: Combine coverage reports
900893
if: github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main'
901894
run: |
@@ -934,7 +927,7 @@ jobs:
934927
935928
- name: Upload codecov reports
936929
if: github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main'
937-
uses: codecov/codecov-action@v4
930+
uses: codecov/codecov-action@v5
938931
with:
939932
files: coverage.xml
940933
token: ${{ secrets.PYOMO_CODECOV_TOKEN }}
@@ -946,7 +939,7 @@ jobs:
946939
if: |
947940
hashFiles('coverage-other.xml') != '' &&
948941
(github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main')
949-
uses: codecov/codecov-action@v4
942+
uses: codecov/codecov-action@v5
950943
with:
951944
files: coverage-other.xml
952945
token: ${{ secrets.PYOMO_CODECOV_TOKEN }}

0 commit comments

Comments
 (0)