Skip to content

Conversation

@jsiirola
Copy link
Member

Fixes # .

Supersedes #3578.

Summary/Motivation:

This removes all sorting from the tabular_writer, and prints out the data in the order in which the data iterator provides it. Control for sorting int pprint() is now exposed through the pprint() API. This makes the tabular_writer simpler / more generic and more usable in other contexts.

This is currently backwards compatible with the existing pprint() infrastructure and will produce the same output. A subsequent PR will rework the pprint() design so that components are output in "ordered" (and not "sorted") order, as well as other changes that might break the output.

Changes proposed in this PR:

  • remove sorting from tabular_writer
  • update the pprint() private API so that sorting can be controlled by an optional argument to pprint()

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.

@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

❌ Patch coverage is 99.07407% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 89.42%. Comparing base (a079b25) to head (57ef452).

Files with missing lines Patch % Lines
pyomo/core/base/indexed_component.py 94.11% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3804   +/-   ##
=======================================
  Coverage   89.41%   89.42%           
=======================================
  Files         909      909           
  Lines      105579   105619   +40     
=======================================
+ Hits        94407    94447   +40     
  Misses      11172    11172           
Flag Coverage Δ
builders 29.12% <43.51%> (+<0.01%) ⬆️
default 86.04% <99.07%> (?)
expensive 35.77% <44.44%> (?)
linux 86.74% <99.07%> (-2.44%) ⬇️
linux_other 86.74% <99.07%> (+0.01%) ⬆️
osx 82.90% <99.07%> (+0.01%) ⬆️
win 85.01% <99.07%> (+0.02%) ⬆️
win_other 85.01% <99.07%> (+0.02%) ⬆️

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant