Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 5 additions & 24 deletions .github/workflows/test_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
PYENV: pip

- os: windows-latest
python: 3.12
python: 3.14
test_docs: 1
TARGET: win
PYENV: conda
Expand Down Expand Up @@ -236,8 +236,11 @@ jobs:
if: matrix.PYENV == 'conda'
uses: conda-incubator/setup-miniconda@v3
with:
conda-remove-defaults: true
auto-update-conda: false
python-version: ${{ matrix.python }}
channels: conda-forge, gurobi, ibmdecisionoptimization, fico-xpress
use-mamba: true

# This is necessary for qt (UI) tests; the package utilized here does not
# have support for OSX.
Expand Down Expand Up @@ -317,27 +320,7 @@ jobs:
run: |
# Set up environment
conda config --set always_yes yes
conda config --set auto_update_conda false
conda config --set channel_priority strict
conda config --remove channels defaults
conda config --append channels nodefaults
conda config --append channels conda-forge
# Try to install mamba
CONDA_VER=$(conda --version | cut -d\ -f2)
if test 23.10 = "`echo -e "23.10\n$CONDA_VER" | sort -V | tail -1`"; then
# Note: removed '--update-deps' on 2025-02-28 to work around
# broken libffi(?)
conda install -q -y -n base conda-libmamba-solver \
|| MAMBA_FAILED=1
if test -z "$MAMBA_FAILED"; then
echo "*** Activating the mamba environment solver ***"
conda config --set solver libmamba
fi
fi
# Add the rest of the channels
conda config --append channels gurobi
conda config --append channels ibmdecisionoptimization
conda config --append channels fico-xpress
# Print environment info
echo "*** CONDA environment: ***"
conda info
Expand Down Expand Up @@ -375,10 +358,8 @@ jobs:
echo ""
echo "*** Install Pyomo dependencies ***"
# For windows, cannot use newer setuptools because of APPSI compilation issues
# There seems to be some specific problem with platformdirs 4.5.0
# on win 3.13/3.14 as of 2025-10-23
if test "${{matrix.TARGET}}" == 'win'; then
CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0"
CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0"
fi
# Note: this will fail the build if any installation fails (or
# possibly if it outputs messages to stderr)
Expand Down
30 changes: 5 additions & 25 deletions .github/workflows/test_pr_and_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# FIXME: pinning to 3.14.0 until 3.14.1 is removed from runner tool cache
python: [ '3.10', 3.11, 3.12, 3.13, 3.14.0 ]
python: [ '3.10', 3.11, 3.12, 3.13, 3.14 ]
other: [""]
category: [""]

Expand Down Expand Up @@ -289,8 +288,11 @@ jobs:
if: matrix.PYENV == 'conda'
uses: conda-incubator/setup-miniconda@v3
with:
conda-remove-defaults: true
auto-update-conda: false
python-version: ${{ matrix.python }}
channels: conda-forge, gurobi, ibmdecisionoptimization, fico-xpress
use-mamba: true

# This is necessary for qt (UI) tests; the package utilized here does not
# have support for OSX.
Expand Down Expand Up @@ -370,27 +372,7 @@ jobs:
run: |
# Set up environment
conda config --set always_yes yes
conda config --set auto_update_conda false
conda config --set channel_priority strict
conda config --remove channels defaults
conda config --append channels nodefaults
conda config --append channels conda-forge
# Try to install mamba
CONDA_VER=$(conda --version | cut -d\ -f2)
if test 23.10 = "`echo -e "23.10\n$CONDA_VER" | sort -V | tail -1`"; then
# Note: removed '--update-deps' on 2025-02-28 to work around
# broken libffi(?)
conda install -q -y -n base conda-libmamba-solver \
|| MAMBA_FAILED=1
if test -z "$MAMBA_FAILED"; then
echo "*** Activating the mamba environment solver ***"
conda config --set solver libmamba
fi
fi
# Add the rest of the channels
conda config --append channels gurobi
conda config --append channels ibmdecisionoptimization
conda config --append channels fico-xpress
# Print environment info
echo "*** CONDA environment: ***"
conda info
Expand Down Expand Up @@ -428,10 +410,8 @@ jobs:
echo ""
echo "*** Install Pyomo dependencies ***"
# For windows, cannot use newer setuptools because of APPSI compilation issues
# There seems to be some specific problem with platformdirs 4.5.0
# on win 3.13/3.14 as of 2025-10-23
if test "${{matrix.TARGET}}" == 'win'; then
CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0"
CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0"
fi
# Note: this will fail the build if any installation fails (or
# possibly if it outputs messages to stderr)
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,10 @@ gam = "gam"
ond = "ond"
# GAMS_writer
PATHC = "PATHC"
# Bimap - tries to correct to Bitmap
Bimap = "Bimap"
# cmo - tries to correct to com
cmo = "cmo"
# Substituters
Substituters = "Substituters"
# AS NEEDED: Add More Words Below
7 changes: 4 additions & 3 deletions pyomo/contrib/piecewise/tests/test_nonlinear_to_pwl.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ def test_linear_model_tree_uniform(self):
# pretty close to m.x, but we're a bit off because we don't have 0
# as a breakpoint.
0.9833360108369479 * m.x + 0.16663989163052034,
places=7,
places=6,
)

def test_linear_model_tree_random(self):
Expand Down Expand Up @@ -657,7 +657,7 @@ def test_linear_model_tree_random_auto_depth_tree(self):
pwlf._simplices,
[(0, 1), (1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 7), (7, 8)],
)
self.assertEqual(
self.assertStructuredAlmostEqual(
pwlf._points,
[
(-10,),
Expand All @@ -670,6 +670,7 @@ def test_linear_model_tree_random_auto_depth_tree(self):
(2.15597,),
(10,),
],
places=4,
)
self.assertEqual(len(pwlf._linear_functions), 8)
for i in range(3):
Expand All @@ -680,7 +681,7 @@ def test_linear_model_tree_random_auto_depth_tree(self):
# pretty close to - m.x, but we're a bit off because we don't have 0
# as a breakpoint.
-0.9851979299618323 * m.x + 0.12006477080409184,
places=7,
places=6,
)
for i in range(4, 8):
assertExpressionsEqual(self, pwlf._linear_functions[i](m.x), m.x)
Expand Down
Loading