Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4669f89
Add stricter pin on platformdirs in GHA win jobs
blnicho Dec 12, 2025
3bc1db9
Exclude specific platformdirs versions instead of setting upper bound
blnicho Dec 12, 2025
c712909
Relax tolerances due to upstream changes
jsiirola Dec 22, 2025
c244119
Removing Python 3.14 pin and excluding pip version in win conda build
blnicho Jan 6, 2026
fa41090
Merge branch 'piecewise-tolerances' into pin-platformdirs
blnicho Jan 6, 2026
0a1d206
New typos version complains about 'bimap'
blnicho Jan 6, 2026
ea598d8
Debugging: checking pip version
blnicho Jan 6, 2026
e025fbd
Debugging: checking pip and platformdirs
blnicho Jan 6, 2026
151d65e
Debugging: set upper bound on pip
blnicho Jan 6, 2026
f282048
Adding addional debugging
jsiirola Jan 6, 2026
461d326
More debugging
jsiirola Jan 6, 2026
9207610
More debugging
jsiirola Jan 6, 2026
1a5fb2f
Fix debugging
jsiirola Jan 6, 2026
0479e8f
Debug: fix path query
jsiirola Jan 6, 2026
0a9003c
Debug: force reinstall python and libffi
jsiirola Jan 6, 2026
327e0b8
Debug: pin libffi
jsiirola Jan 6, 2026
ec20151
Debug: add dir listings
jsiirola Jan 6, 2026
db32bf0
Debug: change ls
jsiirola Jan 6, 2026
1be6355
Debug: print the path
jsiirola Jan 7, 2026
bf01cb1
Debug: probe filesystem
jsiirola Jan 7, 2026
f64f882
Debug: update dir probes
jsiirola Jan 7, 2026
222f4ee
Debug: more dir listing
jsiirola Jan 7, 2026
18cfa1d
Debug: check initial conda env
jsiirola Jan 7, 2026
44e3196
Debug: remove debugging
jsiirola Jan 7, 2026
9369bd4
Debug: check ctypes earlier
jsiirola Jan 7, 2026
14d7595
Debug: locate where ctypes starts failing
jsiirola Jan 7, 2026
f3a2391
Debug: remove --update-deps
jsiirola Jan 7, 2026
525b099
Debug: remove libffi spec
jsiirola Jan 7, 2026
bba121a
Debug: pin installed packages
jsiirola Jan 7, 2026
2ec98d5
Debug: update conda install cmd
jsiirola Jan 7, 2026
eadd875
Debug: explicitly pin libffi
jsiirola Jan 7, 2026
5db4433
Debug: explicitly update environment
jsiirola Jan 7, 2026
93462cb
Debug: force reinstall pip
jsiirola Jan 7, 2026
c222d19
Debug: remove debugging
jsiirola Jan 7, 2026
9514228
Debug: force reinstall of additional packages
jsiirola Jan 8, 2026
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
8 changes: 6 additions & 2 deletions .github/workflows/test_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,11 @@ jobs:
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
# on win 3.13/3.14 as of 2025-10-23 and platformdirs 4.5.1 on win/3.13
# as of 2025-12-12, pip 25.3 now packages the problematic platformdirs
# version so excluding that also.
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 platformdirs!=4.5.0,!=4.5.1 pip<25.0"
fi
# Note: this will fail the build if any installation fails (or
# possibly if it outputs messages to stderr)
Expand Down Expand Up @@ -453,6 +455,8 @@ jobs:
echo ""
echo "Installing packages only available on PyPI"
if test -n "$PYPI_DEPENDENCIES"; then
python -c "import pip; print(pip.__version__, pip.__file__)"
python -c "import platformdirs; print(platformdirs.__version__, platformdirs.__file__)"
python -m pip install --cache-dir cache/pip $PYPI_DEPENDENCIES
fi
# remember this python interpreter
Expand Down
17 changes: 12 additions & 5 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 @@ -369,6 +368,7 @@ jobs:
if: matrix.PYENV == 'conda'
run: |
# Set up environment
python -c "import ctypes; print('CTYPES', ctypes.__file__)"
conda config --set always_yes yes
conda config --set auto_update_conda false
conda config --set channel_priority strict
Expand Down Expand Up @@ -429,13 +429,18 @@ jobs:
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
# on win 3.13/3.14 as of 2025-10-23 and platformdirs 4.5.1 on win/3.13
# as of 2025-12-12. pip 25.3 now packages the problematic platformdirs
# version so excluding that also.
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 platformdirs!=4.5.0,!=4.5.1"
fi
# Note: this will fail the build if any installation fails (or
# possibly if it outputs messages to stderr)
conda install --update-deps -q -y python="${{matrix.python}}" $CONDA_DEPENDENCIES
# Note: remove '--update-deps' to prevent update that breaks ctypes
# Note: removed 'python="${{matrix.python}}"'... is it not necessary?
conda install -q -y --no-update-deps $CONDA_DEPENDENCIES
python -c "import ctypes; print('CTYPES', ctypes.__file__)"
if test -z "${{matrix.slim}}"; then
# xpress.init() (xpress 9.5.1 from conda) hangs indefinitely
# on GHA/Windows under Python 3.10 and 3.11. Exclude that
Expand Down Expand Up @@ -505,6 +510,8 @@ jobs:
# Re-try Pyomo (optional) dependencies with pip
echo ""
echo "Installing packages only available on PyPI"
conda install -q -y --force-reinstall pip libffi python python_abi \
`conda list | grep -E 'zlib|^vc|^vs' | cut -d\ -f1`
if test -n "$PYPI_DEPENDENCIES"; then
python -m pip install --cache-dir cache/pip $PYPI_DEPENDENCIES
fi
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ MCH = "MCH"
# Ignore RO
ro = "ro"
RO = "RO"
# Ignore bimap
bimap = "bimap"
# Ignore EOF - end of file
EOF = "EOF"
# Ignore lst as shorthand for list
Expand Down
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