Skip to content

refactor(coloring): tidy coloring tests and move validators#103

Merged
adrhill merged 2 commits into
mainfrom
ah/better-coloring
Apr 16, 2026
Merged

refactor(coloring): tidy coloring tests and move validators#103
adrhill merged 2 commits into
mainfrom
ah/better-coloring

Conversation

@adrhill
Copy link
Copy Markdown
Owner

@adrhill adrhill commented Apr 16, 2026

  • Move _is_valid_row_coloring, _is_valid_col_coloring, and _is_valid_star_coloring from tests/test_coloring.py to src/asdex/coloring.py so the validators live next to the algorithms they verify.
  • Inline the trivial _make_pattern and _from_dense helpers in tests/test_coloring.py.

adrhill and others added 2 commits April 16, 2026 16:01
Replace the thin helpers with direct calls to
`SparsityPattern.from_coo(...)` and
`SparsityPattern.from_dense(np.array(...))`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Relocate `_is_valid_row_coloring`, `_is_valid_col_coloring`, and
`_is_valid_star_coloring` from `tests/test_coloring.py` to
`src/asdex/coloring.py` so they live next to the algorithms they verify.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@adrhill adrhill merged commit a22653e into main Apr 16, 2026
4 checks passed
@adrhill adrhill deleted the ah/better-coloring branch April 16, 2026 14:22
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.47368% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.42%. Comparing base (14d3a05) to head (6d6005b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/asdex/coloring.py 89.47% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #103      +/-   ##
==========================================
- Coverage   98.56%   98.42%   -0.15%     
==========================================
  Files          41       41              
  Lines        2304     2342      +38     
==========================================
+ Hits         2271     2305      +34     
- Misses         33       37       +4     

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

2 participants