Skip to content

tests: retire correctness/regression tests covered by C++ gtests#1461

Open
ramakrishnap-nv wants to merge 3 commits into
mainfrom
ci/retire-correctness-regression-tests
Open

tests: retire correctness/regression tests covered by C++ gtests#1461
ramakrishnap-nv wants to merge 3 commits into
mainfrom
ci/retire-correctness-regression-tests

Conversation

@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator

Remove 5 Python tests that assert specific solver output values. The Python test suite should cover API behavior; correctness and regression coverage for these cases already exists in the C++ gtest suite.

Removed tests:

  • test_qp.py::test_solver — asserted QP objective −32 and variable values x1=4, x2=2. QP correctness covered by cpp/tests/linear_programming/qp_test.cu; QP API covered by test_python_API.py::test_quadratic_objective_* tests.
  • test_solver.py::test_solomon — asserted VRPTW objective ~1087.15 and vehicle count ≤12. Routing API covered by test_vehicle_properties.py.
  • test_solver.py::test_pdptw — asserted PDP objective 13.0. Pickup-delivery pairs API covered by test_vehicle_properties.py::test_heterogenous_breaks.
  • test_distance_engine.py::test_compute_cost_matrix — numerical matrix match against reference CSVs. compute_cost_matrix API covered by the kept test_compute_waypoint_sequence_* tests.
  • test_distance_engine.py::test_compute_shortest_path_costs — exact matrix match against hardcoded expected values. Error-path coverage for compute_shortest_path_costs retained in test_target_locations_validity.

Also removes helper functions and imports that were only used by the deleted tests.

Remove 5 Python tests whose only role was asserting specific solver
output values. Correctness for these code paths is already covered by
C++ gtests; the Python suite should focus on API behavior.

- Delete test_qp.py::test_solver — QP objective/variable values covered
  by cpp/tests/linear_programming/qp_test.cu; QP API covered by
  test_python_API.py quadratic_objective/matrix tests
- Remove test_solver.py::test_solomon — VRPTW objective/vehicle count;
  routing API covered by test_vehicle_properties.py
- Remove test_solver.py::test_pdptw — PDP objective value; pickup-
  delivery pairs API covered by test_vehicle_properties.py::test_heterogenous_breaks
- Remove test_distance_engine.py::test_compute_cost_matrix — numerical
  matrix match against reference CSV; compute_cost_matrix API covered
  by test_compute_waypoint_sequence_* tests
- Remove test_distance_engine.py::test_compute_shortest_path_costs —
  exact matrix match; error-path coverage kept in test_target_locations_validity

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ramakrishnap-nv ramakrishnap-nv requested a review from a team as a code owner June 24, 2026 19:45
@ramakrishnap-nv ramakrishnap-nv requested a review from tmckayus June 24, 2026 19:45
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c7e405ea-c9e4-488a-9009-53c3406eac23

📥 Commits

Reviewing files that changed from the base of the PR and between caa7835 and 1d66a5f.

📒 Files selected for processing (2)
  • python/cuopt/cuopt/tests/linear_programming/test_incumbent_callbacks.py
  • python/cuopt/cuopt/tests/socp/test_socp.py
💤 Files with no reviewable changes (2)
  • python/cuopt/cuopt/tests/linear_programming/test_incumbent_callbacks.py
  • python/cuopt/cuopt/tests/socp/test_socp.py

📝 Walkthrough

Walkthrough

The PR removes one quadratic-programming test module and prunes several routing, callback, and SOCP test cases. It also simplifies imports in the affected routing test files.

Changes

Routing test pruning

Layer / File(s) Summary
Distance-engine shortest-path tests
python/cuopt/cuopt/tests/routing/test_distance_engine.py
The import block drops pandas and cuopt.routing.utils, and the shortest-path helper plus test_compute_shortest_path_costs() are removed.
Routing solver cases
python/cuopt/cuopt/tests/routing/test_solver.py
The import block drops os, math, and cuopt.routing.utils, and test_solomon plus test_pdptw are removed before test_prize_collection.

Incumbent callback inputs

Layer / File(s) Summary
Callback parameter lists
python/cuopt/cuopt/tests/linear_programming/test_incumbent_callbacks.py
Both incumbent-callback tests remove /mip/swath1.mps from their parametrized input lists.

SOCP regression pruning

Layer / File(s) Summary
SOCP 1 barrier test
python/cuopt/cuopt/tests/socp/test_socp.py
The module deletes the socp_1 expected constants, the build_socp_1() helper, and test_socp_1_barrier_solution().
Unsymmetric quadratic test
python/cuopt/cuopt/tests/socp/test_socp.py
The module removes test_general_quadratic_unsymmetric().

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: mlubin, Iroy30

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: removing Python regression tests in favor of C++ gtest coverage.
Description check ✅ Passed The description matches the changeset by describing removal of Python tests and their replacement coverage in C++ gtests.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/retire-correctness-regression-tests

Comment @coderabbitai help to get the list of available commands.

@ramakrishnap-nv ramakrishnap-nv self-assigned this Jun 24, 2026
@ramakrishnap-nv ramakrishnap-nv added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Jun 24, 2026
@ramakrishnap-nv ramakrishnap-nv requested review from Iroy30 and removed request for tmckayus June 24, 2026 19:54
ramakrishnap-nv and others added 2 commits June 24, 2026 14:54
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

🔔 Hi @anandhkb @ramakrishnap-nv, this pull request has had no activity for 7 days. Please update or let us know if it can be closed. Thank you!

If this is an "epic" issue, then please add the "epic" label to this issue.
If it is a PR and not ready for review, then please convert this to draft.
If you just want to switch off this notification, then use the "skip inactivity reminder" label.

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

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants