Skip to content

Commit e4c411c

Browse files
committed
Merge branch 'main' into set-init
2 parents fcc1b7b + 98d3076 commit e4c411c

5 files changed

Lines changed: 33 additions & 7 deletions

File tree

.github/workflows/test_branches.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ jobs:
4444
python-version: '3.10'
4545
- name: Black Formatting Check
4646
run: |
47-
# Note v24.4.1 fails due to a bug in the parser
47+
# Note v24.4.1 fails due to a bug in the parser. Project-level
48+
# configuration is inherited from pyproject.toml.
4849
pip install 'black!=24.4.1'
49-
black . -S -C --check --diff --exclude examples/pyomobook/python-ch/BadIndent.py
50+
black . --check --diff
5051
- name: Spell Check
5152
uses: crate-ci/typos@master
5253
with:

.github/workflows/test_pr_and_main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ jobs:
5555
python-version: '3.10'
5656
- name: Black Formatting Check
5757
run: |
58-
# Note v24.4.1 fails due to a bug in the parser
58+
# Note v24.4.1 fails due to a bug in the parser. Project-level
59+
# configuration is inherited from pyproject.toml.
5960
pip install 'black!=24.4.1'
60-
black . -S -C --check --diff --exclude examples/pyomobook/python-ch/BadIndent.py
61+
black . --check --diff
6162
- name: Spell Check
6263
uses: crate-ci/typos@master
6364
with:

doc/OnlineDocs/contribution_guide.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,17 @@ run:
3737

3838
# Auto-apply correct formatting
3939
pip install black
40-
black -S -C <path> --exclude examples/pyomobook/python-ch/BadIndent.py
40+
black <path>
4141
# Find typos in files
4242
conda install typos
4343
typos --config .github/workflows/typos.toml <path>
4444
45-
If the spell-checker returns a failure for a word that is spelled correctly,
46-
please add the word to the ``.github/workflows/typos.toml`` file.
45+
If the spell-checker returns a failure for a word that is spelled
46+
correctly, please add the word to the ``.github/workflows/typos.toml``
47+
file. Note also that ``black`` reads from ``pyproject.toml`` to
48+
determine correct configuration, so if you are running ``black``
49+
indirectly (for example, using an IDE integration), please ensure you
50+
are not overriding the project-level configuration set in that file.
4751

4852
Online Pyomo documentation is generated using `Sphinx <https://www.sphinx-doc.org/en/master/>`_
4953
with the ``napoleon`` extension enabled. For API documentation we use of one of these

pyomo/solvers/tests/testcases.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,20 @@
280280
lambda v: v[:3] == (22, 1, 19),
281281
'BARON 22.1.19 reports model as optimal',
282282
)
283+
for prob in (
284+
'LP_block',
285+
'LP_duals_maximize',
286+
'LP_duals_minimize',
287+
'LP_inactive_index',
288+
'LP_simple',
289+
'LP_trivial_constraints',
290+
'QCP_simple',
291+
'QP_simple',
292+
):
293+
ExpectedFailures['baron', 'bar', prob] = (
294+
lambda v: v == (25, 7, 16, 0),
295+
"BARON 25.7.16 returns 0 for duals/rc for models solved in preprocessing",
296+
)
283297

284298

285299
#

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,9 @@ markers = [
8686
"bar: marks bar tests",
8787
"builders: tests that should be run when testing custom (extension) builders",
8888
]
89+
90+
[tool.black]
91+
line-length = 88
92+
skip-string-normalization = true
93+
skip-magic-trailing-comma = true
94+
extend-exclude = 'examples/pyomobook/python-ch/BadIndent.py'

0 commit comments

Comments
 (0)