Skip to content

Comments

Replace ply with lark in config.py#3836

Closed
michaelbynum wants to merge 4 commits intoPyomo:mainfrom
michaelbynum:ply_dep
Closed

Replace ply with lark in config.py#3836
michaelbynum wants to merge 4 commits intoPyomo:mainfrom
michaelbynum:ply_dep

Conversation

@michaelbynum
Copy link
Contributor

Summary/Motivation:

This is step 1 of 3 for #3823.

Changes proposed in this PR:

  • Replace ply with lark in config.py

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@michaelbynum michaelbynum requested a review from jsiirola February 6, 2026 15:47
@michaelbynum
Copy link
Contributor Author

michaelbynum commented Feb 6, 2026

@jsiirola - this kind of parsing is new to me, so please review closely. It took me a while to get ListOf(str) to work for all of these cases:

c.b = "'Hello, World'"  # ["Hello, World"]
c.b = "Hello, World"    # ["Hello", "World"]
c.b = "'Hello, World"   # error

@michaelbynum
Copy link
Contributor Author

If we like this, I can work on the other places where we use ply.

@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 93.61702% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.83%. Comparing base (f2d23a5) to head (6b96d5a).
⚠️ Report is 153 commits behind head on main.

Files with missing lines Patch % Lines
pyomo/common/config.py 93.61% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3836      +/-   ##
==========================================
- Coverage   89.48%   85.83%   -3.65%     
==========================================
  Files         904      903       -1     
  Lines      105385   105315      -70     
==========================================
- Hits        94299    90401    -3898     
- Misses      11086    14914    +3828     
Flag Coverage Δ
builders 29.04% <6.38%> (+<0.01%) ⬆️
default 83.57% <93.61%> (?)
expensive 35.52% <6.38%> (?)
linux 70.60% <93.61%> (-18.61%) ⬇️
linux_other 70.60% <93.61%> (-16.17%) ⬇️
oldsolvers 29.69% <6.38%> (+<0.01%) ⬆️
osx ?
win ?
win_other ?
xpress95 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@michaelbynum
Copy link
Contributor Author

We have a different plan.

@github-project-automation github-project-automation bot moved this from Todo to Done in Pyomo 6.10 Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant