Skip to content

Improve docstring for select_sif_problems: clarify max_con=0 vs contype="unc" and bounds #457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 29, 2025

Conversation

arnavk23
Copy link
Contributor

This PR improves the docstring of select_sif_problems to make it clearer and more user-friendly, by explaining subtle points that commonly cause confusion:

Clarifies what max_con=0 actually does:

  • Keeps problems with no linear or nonlinear constraints,
  • But still allows bound constraints (variable lower/upper bounds).

Explains what contype="unc" means:

  • Keeps only truly unconstrained problems:
    • No linear constraints,
    • No nonlinear constraints,
    • And no variable bounds.

Adds an explicit note about variable bounds not being counted in max_con.

Provides a clear idiom to get truly unconstrained problems:

filter(is_truly_unconstrained, select_sif_problems())

Adds better structured explanation of:

  • only_* flags
  • objtype and contype filters
  • custom_filter

Includes realistic examples covering typical use cases.

@amontoison amontoison self-requested a review June 29, 2025 11:35
Copy link

codecov bot commented Jun 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.23%. Comparing base (f2ad6a4) to head (0bae590).
Report is 153 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #457       +/-   ##
===========================================
- Coverage   89.11%   74.23%   -14.88%     
===========================================
  Files           5        7        +2     
  Lines         790     1669      +879     
===========================================
+ Hits          704     1239      +535     
- Misses         86      430      +344     

☔ 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.

@amontoison amontoison merged commit 20922d1 into JuliaSmoothOptimizers:main Jun 29, 2025
19 of 20 checks passed
@amontoison
Copy link
Member

Very useful PR 👍👍
Thank you @arnavk23 !

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.

2 participants