Skip to content

test routing null matrix validation - #1220

Merged
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
aycsi:test/routing-null-matrix-validation
Jul 27, 2026
Merged

test routing null matrix validation#1220
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
aycsi:test/routing-null-matrix-validation

Conversation

@aycsi

@aycsi aycsi commented May 14, 2026

Copy link
Copy Markdown
Contributor

Description

DataModel.add_cost_matrix routes through validate_matrix, which is expected to reject matrices containing NULL values before solve-time logic. This change adds a focused negative test to lock down that contract and prevent silent regressions during future validation.

Summary

  • Add test_dist_mat_null to routing validation coverage.
  • Cover the NULL input path for cost matrices in DataModel.add_cost_matrix.

Signed-off-by: Aycsi <207523432+aycsi@users.noreply.github.com>
@aycsi
aycsi requested a review from a team as a code owner May 14, 2026 16:35
@aycsi
aycsi requested a review from tmckayus May 14, 2026 16:35
@copy-pr-bot

copy-pr-bot Bot commented May 14, 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.

@ramakrishnap-nv
ramakrishnap-nv changed the base branch from main to release/26.06 May 20, 2026 17:31
@github-actions

Copy link
Copy Markdown

🔔 Hi @anandhkb, 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.

7 similar comments
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

🔔 Hi @anandhkb, 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.

@github-actions

Copy link
Copy Markdown

🔔 Hi @anandhkb, 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.

@github-actions

Copy link
Copy Markdown

🔔 Hi @anandhkb, 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.

@github-actions

Copy link
Copy Markdown

🔔 Hi @anandhkb, 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.

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

🔔 Hi @anandhkb, 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.

@github-actions

Copy link
Copy Markdown

🔔 Hi @anandhkb, 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.

@github-actions

Copy link
Copy Markdown

🔔 Hi @anandhkb, 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.

@ramakrishnap-nv
ramakrishnap-nv changed the base branch from release/26.06 to main July 21, 2026 15:37
@ramakrishnap-nv ramakrishnap-nv added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Jul 21, 2026
@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator

/ok to test 6d5b75a

@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator

/ok to test 575b1cc

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

CI Test Summary

✅ All 22 test job(s) passed. (1 skipped)

@tmckayus

Copy link
Copy Markdown
Contributor

/okay to test 89f131a

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Routing input validation

Layer / File(s) Summary
NULL cost matrix exception test
python/cuopt/cuopt/tests/routing/test_warnings_exceptions.py
Adds coverage confirming that a cost matrix containing NULL raises the expected exception message from add_cost_matrix.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: tmckayus

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: adding routing validation for NULL cost matrices.
Description check ✅ Passed The description matches the change by describing the new negative test for NULL cost matrix validation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@python/cuopt/cuopt/tests/routing/test_warnings_exceptions.py`:
- Around line 87-90: Update the test to instantiate DataModel before the
pytest.raises block, then wrap only dm.add_cost_matrix(cost_matrix) and assert
pytest.raises(ValueError, match="^cost matrix cannot have NULL values$"). Remove
the broad Exception capture and redundant string assertion while preserving the
existing validation scenario.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 43a07905-24a7-41d6-a3e3-73bc757f306b

📥 Commits

Reviewing files that changed from the base of the PR and between 91134a2 and 89f131a.

📒 Files selected for processing (1)
  • python/cuopt/cuopt/tests/routing/test_warnings_exceptions.py

Comment thread python/cuopt/cuopt/tests/routing/test_warnings_exceptions.py

@tmckayus tmckayus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm assuming tests pass

@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator

/merge

@rapids-bot
rapids-bot Bot merged commit da429c6 into NVIDIA:main Jul 27, 2026
83 checks passed
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.

3 participants