Skip to content

Commit 0534849

Browse files
committed
merge main into initialization
2 parents 8f2a0da + 92951cb commit 0534849

81 files changed

Lines changed: 9969 additions & 2722 deletions

File tree

Some content is hidden

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

.github/ISSUE_TEMPLATE/task.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: "Developer Task"
3+
about: Track a new developer task to be completed.
4+
labels: "Task"
5+
---
6+
7+
<!-- ONLY FOR USE BY CORE DEVELOPERS. This template is only intended for use by core developers. If you are reporting a bug or requesting a new feature, please use the appropriate template. -->
8+
9+
## Summary
10+
<!-- Brief description of this task -->
11+
12+
## Goal / Purpose
13+
<!-- Why is this task needed? -->
14+
15+
## Additional Info Needed
16+
<!-- Are there any discussion items that still need to be addressed, maybe with other developer? -->
17+

.github/workflows/test_branches.yml

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,16 @@ 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: v260304.0
26+
CACHE_VER: v260512.3
2727
NEOS_EMAIL: tests@pyomo.org
2828
SRC_REF: ${{ github.head_ref || github.ref }}
2929
PYOMO_WORKFLOW: branch
3030

3131
jobs:
3232
lint:
3333
name: lint/style-and-typos
34-
if: |
35-
${{ ! ( contains(github.event.pull_request.title, '[WIP]') ||
36-
github.event.pull_request.draft ) }}
34+
# Note: 'env' is not available in GHA jobs.<job_id>.if context.
35+
if: ${{ ! contains(github.event.pull_request.title, '[WIP]') }}
3736
runs-on: ubuntu-latest
3837
steps:
3938
- name: Checkout Pyomo source
@@ -62,7 +61,7 @@ jobs:
6261
sudo resolvectl query github.com
6362
sudo resolvectl status
6463
- name: URL Checker
65-
if: env.PYOMO_WORKFLOW == 'branch'
64+
if: ${{ env.PYOMO_WORKFLOW == 'branch' }}
6665
uses: urlstechie/urlchecker-action@0.0.34
6766
with:
6867
# A comma-separated list of file types to cover in the URL checks
@@ -148,6 +147,13 @@ jobs:
148147
TARGET: win
149148
PYENV: pip
150149

150+
- os: ubuntu-latest
151+
python: '3.10'
152+
other: /slim
153+
slim: 1
154+
TARGET: linux
155+
PYENV: pip
156+
151157
steps:
152158
- name: Checkout Pyomo source
153159
uses: actions/checkout@v6
@@ -253,7 +259,7 @@ jobs:
253259

254260
- name: Set up Miniconda Python ${{ matrix.python }}
255261
if: matrix.PYENV == 'conda'
256-
uses: conda-incubator/setup-miniconda@v3
262+
uses: conda-incubator/setup-miniconda@v4
257263
with:
258264
conda-remove-defaults: true
259265
auto-update-conda: false
@@ -363,6 +369,8 @@ jobs:
363369
python --version
364370
# We need setuptools so we can run Pyomo's setup.py
365371
conda install setuptools
372+
# Make sure pip is installed for dependencies not available through conda
373+
conda install pip
366374
# Note: some pypi packages are not available through conda
367375
PYOMO_DEPENDENCIES=`python setup.py dependencies \
368376
--extras "$EXTRAS" | tail -1`
@@ -573,7 +581,7 @@ jobs:
573581
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
574582
$INSTALLER = "${env:DOWNLOAD_DIR}/gams_install.exe"
575583
# Demo licenses are included for 5mo from the newest release
576-
$URL = "https://d37drm4t2jghv5.cloudfront.net/distributions/52.5.0"
584+
$URL = "https://d37drm4t2jghv5.cloudfront.net/distributions/latest"
577585
if ( "${{matrix.TARGET}}" -eq "win" ) {
578586
$URL = "$URL/windows/windows_x64_64.exe"
579587
} elseif ( "${{matrix.TARGET}}" -eq "osx" ) {
@@ -687,9 +695,9 @@ jobs:
687695
cd gjh_asl_json-master/Thirdparty
688696
# Patch get.ASL to use curl
689697
URL="http://www.ampl.com/netlib/ampl/solvers.tgz"
690-
sed -i "s|wget |curl -o solvers.tgz |" get.ASL
691-
cat get.ASL
692-
./get.ASL
698+
sed "s|wget |curl -o solvers.tgz |" get.ASL > get.ASL.patched
699+
cat get.ASL.patched
700+
bash ./get.ASL.patched
693701
cd ..
694702
make
695703
mv bin "$INSTALL_DIR/bin"
@@ -872,8 +880,8 @@ jobs:
872880
cover:
873881
name: process-coverage-${{ matrix.TARGET }}
874882
needs: build
875-
# run even if a build job fails, but not if canceled (except for branches)
876-
if: ${{ false }}
883+
# run even if a build job fails, but not if canceled
884+
if: ${{ success() || failure() }}
877885
runs-on: ${{ matrix.os }}
878886
timeout-minutes: 10
879887
strategy:
@@ -982,7 +990,9 @@ jobs:
982990
fi
983991
984992
- name: Upload codecov reports
985-
if: github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main'
993+
if: |
994+
env.PYOMO_WORKFLOW != 'branch' &&
995+
(github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main')
986996
uses: codecov/codecov-action@v6
987997
with:
988998
files: coverage.xml
@@ -993,6 +1003,7 @@ jobs:
9931003

9941004
- name: Upload other coverage reports
9951005
if: |
1006+
env.PYOMO_WORKFLOW != 'branch' &&
9961007
hashFiles('coverage-other.xml') != '' &&
9971008
(github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main')
9981009
uses: codecov/codecov-action@v6

.github/workflows/test_pr_and_main.yml

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@ 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: v260304.0
34+
CACHE_VER: v260512.3
3535
NEOS_EMAIL: tests@pyomo.org
3636
SRC_REF: ${{ github.head_ref || github.ref }}
3737
PYOMO_WORKFLOW: |
38-
${{ ( contains(github.event.pull_request.title, '[WIP]') ||
39-
github.event.pull_request.draft ) && 'draft_pr'
40-
|| github.event.pull_request.number && 'pr' || 'main' }}
38+
${{ contains(github.event.pull_request.title, '[WIP]') && 'wip'
39+
|| github.event.pull_request.draft && 'draft_pr'
40+
|| github.event.pull_request.number && 'pr'
41+
|| 'main' }}
4142
4243
jobs:
4344
lint:
4445
name: lint/style-and-typos
45-
if: |
46-
${{ ! ( contains(github.event.pull_request.title, '[WIP]') ||
47-
github.event.pull_request.draft ) }}
46+
# Note: 'env' is not available in GHA jobs.<job_id>.if context.
47+
if: ${{ ! contains(github.event.pull_request.title, '[WIP]') }}
4848
runs-on: ubuntu-latest
4949
steps:
5050
- name: Checkout Pyomo source
@@ -73,7 +73,7 @@ jobs:
7373
sudo resolvectl query github.com
7474
sudo resolvectl status
7575
- name: URL Checker
76-
if: env.PYOMO_WORKFLOW == 'branch'
76+
if: ${{ env.PYOMO_WORKFLOW == 'branch' }}
7777
uses: urlstechie/urlchecker-action@0.0.34
7878
with:
7979
# A comma-separated list of file types to cover in the URL checks
@@ -151,10 +151,18 @@ jobs:
151151
PYENV: pip
152152
PACKAGES: cython
153153

154-
- os: windows-latest
154+
# [13 May 26] Disabled until we can sort out the seg fault issue
155+
#- os: windows-latest
156+
# python: '3.10'
157+
# other: /pip
158+
# TARGET: win
159+
# PYENV: pip
160+
161+
- os: ubuntu-latest
155162
python: '3.10'
156-
other: /pip
157-
TARGET: win
163+
other: /slim
164+
slim: 1
165+
TARGET: linux
158166
PYENV: pip
159167

160168
- os: ubuntu-latest
@@ -164,13 +172,6 @@ jobs:
164172
TARGET: linux
165173
PYENV: pip
166174

167-
- os: ubuntu-latest
168-
python: '3.10'
169-
other: /slim
170-
slim: 1
171-
TARGET: linux
172-
PYENV: pip
173-
174175
- os: ubuntu-latest
175176
python: 3.12
176177
other: /numpy2
@@ -305,7 +306,7 @@ jobs:
305306

306307
- name: Set up Miniconda Python ${{ matrix.python }}
307308
if: matrix.PYENV == 'conda'
308-
uses: conda-incubator/setup-miniconda@v3
309+
uses: conda-incubator/setup-miniconda@v4
309310
with:
310311
conda-remove-defaults: true
311312
auto-update-conda: false
@@ -415,6 +416,8 @@ jobs:
415416
python --version
416417
# We need setuptools so we can run Pyomo's setup.py
417418
conda install setuptools
419+
# Make sure pip is installed for dependencies not available through conda
420+
conda install pip
418421
# Note: some pypi packages are not available through conda
419422
PYOMO_DEPENDENCIES=`python setup.py dependencies \
420423
--extras "$EXTRAS" | tail -1`
@@ -625,7 +628,7 @@ jobs:
625628
Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
626629
$INSTALLER = "${env:DOWNLOAD_DIR}/gams_install.exe"
627630
# Demo licenses are included for 5mo from the newest release
628-
$URL = "https://d37drm4t2jghv5.cloudfront.net/distributions/52.5.0"
631+
$URL = "https://d37drm4t2jghv5.cloudfront.net/distributions/latest"
629632
if ( "${{matrix.TARGET}}" -eq "win" ) {
630633
$URL = "$URL/windows/windows_x64_64.exe"
631634
} elseif ( "${{matrix.TARGET}}" -eq "osx" ) {
@@ -739,9 +742,9 @@ jobs:
739742
cd gjh_asl_json-master/Thirdparty
740743
# Patch get.ASL to use curl
741744
URL="http://www.ampl.com/netlib/ampl/solvers.tgz"
742-
sed -i "s|wget |curl -o solvers.tgz |" get.ASL
743-
cat get.ASL
744-
./get.ASL
745+
sed "s|wget |curl -o solvers.tgz |" get.ASL > get.ASL.patched
746+
cat get.ASL.patched
747+
bash ./get.ASL.patched
745748
cd ..
746749
make
747750
mv bin "$INSTALL_DIR/bin"
@@ -925,8 +928,8 @@ jobs:
925928
cover:
926929
name: process-coverage-${{ matrix.TARGET }}
927930
needs: build
928-
# run even if a build job fails, but not if canceled (except for branches)
929-
if: success() || failure()
931+
# run even if a build job fails, but not if canceled
932+
if: ${{ success() || failure() }}
930933
runs-on: ${{ matrix.os }}
931934
timeout-minutes: 10
932935
strategy:
@@ -1035,7 +1038,9 @@ jobs:
10351038
fi
10361039
10371040
- name: Upload codecov reports
1038-
if: github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main'
1041+
if: |
1042+
env.PYOMO_WORKFLOW != 'branch' &&
1043+
(github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main')
10391044
uses: codecov/codecov-action@v6
10401045
with:
10411046
files: coverage.xml
@@ -1046,6 +1051,7 @@ jobs:
10461051

10471052
- name: Upload other coverage reports
10481053
if: |
1054+
env.PYOMO_WORKFLOW != 'branch' &&
10491055
hashFiles('coverage-other.xml') != '' &&
10501056
(github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main')
10511057
uses: codecov/codecov-action@v6
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. _doe_abstract_exp:
2+
3+
Experiment Abstraction
4+
======================
5+
6+
.. note::
7+
8+
Detailed descriptions and example code for experiment abstraction in Pyomo.DoE will be added in a future update.

0 commit comments

Comments
 (0)