Skip to content

✅ test(unxts-linalg): cover QuantityMatrix short_name "QM" - #796

Merged
nstarman merged 1 commit into
GalacticDynamics:mainfrom
nstarman:claude/quantitymatrix-short-name-test
Jul 24, 2026
Merged

✅ test(unxts-linalg): cover QuantityMatrix short_name "QM"#796
nstarman merged 1 commit into
GalacticDynamics:mainfrom
nstarman:claude/quantitymatrix-short-name-test

Conversation

@nstarman

Copy link
Copy Markdown
Contributor

Summary

Adds a printing test module for QuantityMatrix, mirroring the existing Quantity / ParametricQuantity short-name tests. It asserts:

  • QuantityMatrix.short_name == "QM" (and via the QM alias)
  • the full class name is used by default
  • use_short_name=True renders QM(...)

Stacking

Stacked on #795 (which adds short_name = "QM"). Until #795 merges, the diff here also shows that one-line change; it collapses to just the new test once #795 lands in main.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings July 24, 2026 15:25
@github-actions github-actions Bot added 🧩 unxts-linalg Issues/PRs affecting the unxts.linalg namespace package ✅ Add / update / pass tests Add, update, or pass tests. ✨ Introduce new features Introduce new features. labels Jul 24, 2026

Copilot AI 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.

Pull request overview

Adds coverage in the unxts.linalg package to ensure QuantityMatrix’s wadler-lindig pretty-printing honors the "QM" short name (and the QM alias), aligning it with existing Quantity / ParametricQuantity short-name behavior.

Changes:

  • Add packages/unxts.linalg/tests/test_printing.py to assert default/full-name printing vs use_short_name=True printing for QuantityMatrix.
  • Define QuantityMatrix.short_name: ClassVar[str] = "QM" so the printing path can render QM(...) when requested.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/unxts.linalg/tests/test_printing.py New tests covering QuantityMatrix / QM short-name behavior in wadler-lindig output.
packages/unxts.linalg/src/unxts/linalg/_src/_quantity_matrix.py Adds short_name = "QM" as a ClassVar for correct short-name pretty-printing.

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.07%. Comparing base (be47e8a) to head (1471fb3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #796      +/-   ##
==========================================
+ Coverage   91.98%   95.07%   +3.09%     
==========================================
  Files          83       53      -30     
  Lines        3766     3086     -680     
  Branches      313      231      -82     
==========================================
- Hits         3464     2934     -530     
+ Misses        227       98     -129     
+ Partials       75       54      -21     

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

@nstarman nstarman added this to the v2.0.0 milestone Jul 24, 2026
Mirror the Quantity/ParametricQuantity printing tests: assert
`QuantityMatrix.short_name == "QM"`, that it renders its full class
name by default, and that `use_short_name=True` renders `QM(...)`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@nstarman
nstarman force-pushed the claude/quantitymatrix-short-name-test branch from 1478253 to 1471fb3 Compare July 24, 2026 15:54
@nstarman
nstarman merged commit 26f8c18 into GalacticDynamics:main Jul 24, 2026
40 checks passed
@nstarman
nstarman deleted the claude/quantitymatrix-short-name-test branch July 24, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✅ Add / update / pass tests Add, update, or pass tests. ✨ Introduce new features Introduce new features. 🧩 unxts-linalg Issues/PRs affecting the unxts.linalg namespace package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants