Skip to content

Add sparse matrix and scaling tests#486

Open
ewu63 wants to merge 10 commits into
mdolab:mainfrom
ewu63:improve-tests
Open

Add sparse matrix and scaling tests#486
ewu63 wants to merge 10 commits into
mdolab:mainfrom
ewu63:improve-tests

Conversation

@ewu63

@ewu63 ewu63 commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Purpose

Add a few tests, partially addresses #256.

Expected time until merged

A few days

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Testing

Checklist

  • I have run ruff check and ruff format to make sure the Python code adheres to PEP-8 and is consistently formatted
  • I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

@ewu63 ewu63 requested a review from marcomangano as a code owner June 16, 2026 04:49
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 78 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.22%. Comparing base (20cfa02) to head (c294b87).

Files with missing lines Patch % Lines
tests/test_optProb.py 0.00% 78 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #486       +/-   ##
===========================================
- Coverage   82.99%   54.22%   -28.78%     
===========================================
  Files           1        1               
  Lines         147      225       +78     
===========================================
  Hits          122      122               
- Misses         25      103       +78     

☔ View full report in Codecov by Harness.
📢 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.

@marcomangano marcomangano left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for doing this! Just a few very minor points below

Comment thread tests/test_gradient.py
Comment thread tests/test_gradient.py
Comment thread tests/test_gradient.py
Comment thread tests/test_optProb.py
Comment thread tests/test_utils.py

@marcomangano marcomangano left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comments, LGTM

@marcomangano marcomangano requested a review from A-CGray July 2, 2026 16:51
Comment thread tests/test_optProb.py
def test_infinite_bounds_not_scaled(self):
"""INFINITY bounds must remain unbounded; scale/offset must not turn
them into finite numbers in the assembled bounds.
"""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add docstrings like this, that explain what the test is checking, to all these new tests? I usually find LLMs are pretty good at writing them, especially if you tell them to use the Given-When-Then style.

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.

3 participants