Skip to content

Commit cf087eb

Browse files
authored
Merge branch 'main' into knitro-persistent
2 parents 5256cc4 + 168e961 commit cf087eb

File tree

4 files changed

+20
-52
lines changed

4 files changed

+20
-52
lines changed

.github/workflows/test_branches.yml

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
PYENV: pip
100100

101101
- os: windows-latest
102-
python: 3.12
102+
python: 3.14
103103
test_docs: 1
104104
TARGET: win
105105
PYENV: conda
@@ -236,8 +236,11 @@ jobs:
236236
if: matrix.PYENV == 'conda'
237237
uses: conda-incubator/setup-miniconda@v3
238238
with:
239+
conda-remove-defaults: true
239240
auto-update-conda: false
240241
python-version: ${{ matrix.python }}
242+
channels: conda-forge, gurobi, ibmdecisionoptimization, fico-xpress
243+
use-mamba: true
241244

242245
# This is necessary for qt (UI) tests; the package utilized here does not
243246
# have support for OSX.
@@ -317,27 +320,7 @@ jobs:
317320
run: |
318321
# Set up environment
319322
conda config --set always_yes yes
320-
conda config --set auto_update_conda false
321323
conda config --set channel_priority strict
322-
conda config --remove channels defaults
323-
conda config --append channels nodefaults
324-
conda config --append channels conda-forge
325-
# Try to install mamba
326-
CONDA_VER=$(conda --version | cut -d\ -f2)
327-
if test 23.10 = "`echo -e "23.10\n$CONDA_VER" | sort -V | tail -1`"; then
328-
# Note: removed '--update-deps' on 2025-02-28 to work around
329-
# broken libffi(?)
330-
conda install -q -y -n base conda-libmamba-solver \
331-
|| MAMBA_FAILED=1
332-
if test -z "$MAMBA_FAILED"; then
333-
echo "*** Activating the mamba environment solver ***"
334-
conda config --set solver libmamba
335-
fi
336-
fi
337-
# Add the rest of the channels
338-
conda config --append channels gurobi
339-
conda config --append channels ibmdecisionoptimization
340-
conda config --append channels fico-xpress
341324
# Print environment info
342325
echo "*** CONDA environment: ***"
343326
conda info
@@ -375,10 +358,8 @@ jobs:
375358
echo ""
376359
echo "*** Install Pyomo dependencies ***"
377360
# For windows, cannot use newer setuptools because of APPSI compilation issues
378-
# There seems to be some specific problem with platformdirs 4.5.0
379-
# on win 3.13/3.14 as of 2025-10-23
380361
if test "${{matrix.TARGET}}" == 'win'; then
381-
CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0"
362+
CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0"
382363
fi
383364
# Note: this will fail the build if any installation fails (or
384365
# possibly if it outputs messages to stderr)

.github/workflows/test_pr_and_main.yml

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ jobs:
9393
fail-fast: false
9494
matrix:
9595
os: [ubuntu-latest, macos-latest, windows-latest]
96-
# FIXME: pinning to 3.14.0 until 3.14.1 is removed from runner tool cache
97-
python: [ '3.10', 3.11, 3.12, 3.13, 3.14.0 ]
96+
python: [ '3.10', 3.11, 3.12, 3.13, 3.14 ]
9897
other: [""]
9998
category: [""]
10099

@@ -289,8 +288,11 @@ jobs:
289288
if: matrix.PYENV == 'conda'
290289
uses: conda-incubator/setup-miniconda@v3
291290
with:
291+
conda-remove-defaults: true
292292
auto-update-conda: false
293293
python-version: ${{ matrix.python }}
294+
channels: conda-forge, gurobi, ibmdecisionoptimization, fico-xpress
295+
use-mamba: true
294296

295297
# This is necessary for qt (UI) tests; the package utilized here does not
296298
# have support for OSX.
@@ -370,27 +372,7 @@ jobs:
370372
run: |
371373
# Set up environment
372374
conda config --set always_yes yes
373-
conda config --set auto_update_conda false
374375
conda config --set channel_priority strict
375-
conda config --remove channels defaults
376-
conda config --append channels nodefaults
377-
conda config --append channels conda-forge
378-
# Try to install mamba
379-
CONDA_VER=$(conda --version | cut -d\ -f2)
380-
if test 23.10 = "`echo -e "23.10\n$CONDA_VER" | sort -V | tail -1`"; then
381-
# Note: removed '--update-deps' on 2025-02-28 to work around
382-
# broken libffi(?)
383-
conda install -q -y -n base conda-libmamba-solver \
384-
|| MAMBA_FAILED=1
385-
if test -z "$MAMBA_FAILED"; then
386-
echo "*** Activating the mamba environment solver ***"
387-
conda config --set solver libmamba
388-
fi
389-
fi
390-
# Add the rest of the channels
391-
conda config --append channels gurobi
392-
conda config --append channels ibmdecisionoptimization
393-
conda config --append channels fico-xpress
394376
# Print environment info
395377
echo "*** CONDA environment: ***"
396378
conda info
@@ -428,10 +410,8 @@ jobs:
428410
echo ""
429411
echo "*** Install Pyomo dependencies ***"
430412
# For windows, cannot use newer setuptools because of APPSI compilation issues
431-
# There seems to be some specific problem with platformdirs 4.5.0
432-
# on win 3.13/3.14 as of 2025-10-23
433413
if test "${{matrix.TARGET}}" == 'win'; then
434-
CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0 platformdirs!=4.5.0"
414+
CONDA_DEPENDENCIES="$CONDA_DEPENDENCIES setuptools<74.0.0"
435415
fi
436416
# Note: this will fail the build if any installation fails (or
437417
# possibly if it outputs messages to stderr)

.github/workflows/typos.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,10 @@ gam = "gam"
7575
ond = "ond"
7676
# GAMS_writer
7777
PATHC = "PATHC"
78+
# Bimap - tries to correct to Bitmap
79+
Bimap = "Bimap"
80+
# cmo - tries to correct to com
81+
cmo = "cmo"
82+
# Substituters
83+
Substituters = "Substituters"
7884
# AS NEEDED: Add More Words Below

pyomo/contrib/piecewise/tests/test_nonlinear_to_pwl.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ def test_linear_model_tree_uniform(self):
602602
# pretty close to m.x, but we're a bit off because we don't have 0
603603
# as a breakpoint.
604604
0.9833360108369479 * m.x + 0.16663989163052034,
605-
places=7,
605+
places=6,
606606
)
607607

608608
def test_linear_model_tree_random(self):
@@ -657,7 +657,7 @@ def test_linear_model_tree_random_auto_depth_tree(self):
657657
pwlf._simplices,
658658
[(0, 1), (1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 7), (7, 8)],
659659
)
660-
self.assertEqual(
660+
self.assertStructuredAlmostEqual(
661661
pwlf._points,
662662
[
663663
(-10,),
@@ -670,6 +670,7 @@ def test_linear_model_tree_random_auto_depth_tree(self):
670670
(2.15597,),
671671
(10,),
672672
],
673+
places=4,
673674
)
674675
self.assertEqual(len(pwlf._linear_functions), 8)
675676
for i in range(3):
@@ -680,7 +681,7 @@ def test_linear_model_tree_random_auto_depth_tree(self):
680681
# pretty close to - m.x, but we're a bit off because we don't have 0
681682
# as a breakpoint.
682683
-0.9851979299618323 * m.x + 0.12006477080409184,
683-
places=7,
684+
places=6,
684685
)
685686
for i in range(4, 8):
686687
assertExpressionsEqual(self, pwlf._linear_functions[i](m.x), m.x)

0 commit comments

Comments
 (0)