Skip to content

test(mv): expand and reorganize is_blade coverage (#537)#585

Merged
utensil merged 4 commits intopygae:masterfrom
utiberious:test/reorganize-is-blade-v2
Apr 3, 2026
Merged

test(mv): expand and reorganize is_blade coverage (#537)#585
utensil merged 4 commits intopygae:masterfrom
utiberious:test/reorganize-is-blade-v2

Conversation

@utiberious
Copy link
Copy Markdown
Contributor

@utiberious utiberious commented Apr 3, 2026

Summary

Replaces test_is_blade_null with focused methods inside TestMv, grouped by comment, covering every branch of is_blade() and the null-blade guards added in the same fix:

Test Branch
test_is_blade_zero_and_scalar is_zero() path and grade-0 scalar
test_is_blade_vectors null and non-null grade-1
test_is_blade_bivectors null and non-null grade-2
test_is_blade_trivector grade-3 via is_versor()
test_is_blade_grade3_known_limitation DFM counterexample (R^6, no coords, 0.35s); documents B^B=0 false positive for grade >= 3
test_is_blade_non_homogeneous i_grade is None path
test_is_blade_result_cached blade_flg cache path
test_reflect_in_null_blade_raises null-blade guard in reflect_in_blade()
test_project_in_null_blade_raises null-blade guard in project_in_blade()

Also registers slow pytest marker in setup.cfg.

@utiberious utiberious changed the title test(mv): expand and reorganize is_blade coverage (gh-537) test(mv): expand and reorganize is_blade coverage (#537) Apr 3, 2026
Replace test_is_blade_null with focused methods inside TestMv, grouped
by comment, covering every branch of is_blade() and the null-blade
guards added in the same fix:

- test_is_blade_zero_and_scalar  -- is_zero() path and grade-0 scalar
- test_is_blade_vectors          -- null and non-null grade-1 cases
- test_is_blade_bivectors        -- null and non-null grade-2 cases
- test_is_blade_trivector        -- grade-3 blade via is_versor()
- test_is_blade_grade3_known_limitation -- DFM counterexample (R^6,
  no symbolic coords, 0.35s); documents B^B=0 false positive for
  grade >= 3 (previously removed in error)
- test_is_blade_non_homogeneous  -- i_grade is None path
- test_is_blade_result_cached    -- blade_flg cache path
- test_reflect_in_null_blade_raises -- null-blade guard in reflect_in_blade()
- test_project_in_null_blade_raises -- null-blade guard in project_in_blade()

Also registers the slow pytest marker in setup.cfg.
@utiberious utiberious force-pushed the test/reorganize-is-blade-v2 branch from 91afce3 to 5ba9e24 Compare April 3, 2026 01:57
@utensil
Copy link
Copy Markdown
Member

utensil commented Apr 3, 2026

Thanks for the expansion. The slow marker is registered in setup.cfg but not applied to any test — it should be on test_is_blade_grade3_known_limitation (the R⁶ case).

Also missing a test for (self ^ self).is_zero() returning False — a non-blade correctly rejected. Something like e1^e2 + e3^e4 in R⁴ would cover that branch.

Ulysses Tiberious and others added 3 commits April 3, 2026 12:15
- Mark test_is_blade_grade3_known_limitation with @pytest.mark.slow so
  it is skipped by default (run with --run-slow); add conftest.py with
  the --run-slow option
- Add test_is_blade_non_simple_bivector: e1^e2 + e3^e4 in R^4 has
  B^B != 0, so is_blade() correctly returns False; this covers the
  remaining branch in the outer-product squaring test
…ng False

Addresses feedback: cover the branch where a non-simple bivector satisfies
(B ^ B).is_zero() == False, correctly rejected by is_blade().
The monitoring loop agent added test_is_blade_self_wedge_nonzero, which
is identical in content to the existing test_is_blade_non_simple_bivector.
Remove the duplicate.
@utensil
Copy link
Copy Markdown
Member

utensil commented Apr 3, 2026

Thanks, merging.

@utensil utensil merged commit 65c3de3 into pygae:master Apr 3, 2026
5 checks passed
@utensil utensil mentioned this pull request Apr 3, 2026
2 tasks
utiberious added a commit to utiberious/galgebra that referenced this pull request Apr 4, 2026
…#585

- pygae#570: add ZeroDivisionError fix in Mv._latex, validate_nb_refresh.py,
  bumping-sympy.md guide, sympy pin bump, and issue pygae#566 reference
- pygae#572: remove bumping-sympy.md (belongs to pygae#570, not pygae#572)
- pygae#585: add missing entry for is_blade test expansion
utiberious added a commit to utiberious/galgebra that referenced this pull request Apr 4, 2026
- pygae#590: :support: → 🐛 (restores broken CI, not just a workaround)
- pygae#585: move to correct descending-number position (between pygae#587 and pygae#580)
- pygae#570: split ZeroDivisionError fix into separate 🐛`570` entry so it
  leads clearly; :support:`570` retains notebook refresh / tooling content
utensil pushed a commit that referenced this pull request Apr 4, 2026
…se date

* docs(changelog): add 0.6.1 entries for #587, #589, #590; update release date

Adds changelog entries for three PRs merged after the initial 0.6.1
changelog write (#583):

- #590 / #576: SymPy 1.13 TR3 performance workaround in curvi_linear_latex
- #589 / #588: Step 0 added to release-process runbook
- #587 / #586: pyproject.toml migration (PEP 517/621)

Also updates the 0.6.1 release date from 2026.04.02 to 2026.04.04
(actual merge date of the last included PR).

Addresses the changelog TODOs listed in release issue #588.

* docs(changelog): expand 0.6.1 entries for #570, #572, #585

- #570: add ZeroDivisionError fix in Mv._latex, validate_nb_refresh.py,
  bumping-sympy.md guide, sympy pin bump, and issue #566 reference
- #572: remove bumping-sympy.md (belongs to #570, not #572)
- #585: add missing entry for is_blade test expansion

* docs(changelog): address review — fix tag, ordering, and 570 ZDE split

- #590: :support: → 🐛 (restores broken CI, not just a workaround)
- #585: move to correct descending-number position (between #587 and #580)
- #570: split ZeroDivisionError fix into separate 🐛`570` entry so it
  leads clearly; :support:`570` retains notebook refresh / tooling content
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