Skip to content

Group by rule#490

Open
moritz-gross wants to merge 4 commits intodaisy:mainfrom
moritz-gross:group-by-rule
Open

Group by rule#490
moritz-gross wants to merge 4 commits intodaisy:mainfrom
moritz-gross:group-by-rule

Conversation

@moritz-gross
Copy link
Contributor

@moritz-gross moritz-gross commented Feb 16, 2026

feature request by Marthe: group by rule first, and then subgroup by issue type.

also added more unit testing, including for full rich output: audit_translations/tests/golden/rich/cli_calculus_verbose.golden



╭──────────────────────────────────────────────────────────────────────────────╮
│ MathCAT Translation Audit: ES                                                │
╰──────────────────────────────────────────────────────────────────────────────╯

  Comparing against English (en) reference files
  Files to check: 1

────────────────────────────────────────────────────────────────────────────────
⚠ SharedRules/calculus.yaml
  English: 4 rules  →  Translated: 3 rules
────────────────────────────────────────────────────────────────────────────────

  ≠ Rule Issues [13] (grouped by rule and issue type)
      • laplacian (laplacian)
          Missing in Translation [1]
              • (line 4 in English)
      • divergence (divergence)
          Untranslated Text [3]
              • (line 10 tr) "divergence"
              • (line 11 tr) "div"
              • (line 12 tr) "of"
          Match Pattern Differences [1]
              • (line 22 en, 6 tr)
                  Match pattern differs
                  en: count(*) = 1
                  tr: .
          Condition Differences [1]
              • (line 25 en, 9 tr)
                  Conditions differ
                  en: $Verbosity='Terse', not(IsNode(*[1], 'leaf'))
                  tr: $Verbosity='Verbose', not(IsNode(*[1], 'leaf'))
      • curl (curl)
          Untranslated Text [1]
              • (line 22 tr) "curl of"
          Match Pattern Differences [1]
              • (line 35 en, 20 tr)
                  Match pattern differs
                  en: count(*) = 1
                  tr: .
          Condition Differences [1]
              • (line 39 en, 24 tr)
                  Conditions differ
                  en: $Verbosity!='Terse', not(IsNode(*[1], 'leaf'))
                  tr: not(IsNode(*[1], 'leaf'))
          Structure Differences [1]
              • (line 38 en, 18 tr)
                  Rule structure differs (test/if/then/else blocks)
                  en: replace: test: if: then: test: if: then:
                  tr: replace: test: if: then:
      • gradient (gradient)
          Untranslated Text [2]
              • (line 34 tr) "gradient of"
              • (line 35 tr) "del"
          Match Pattern Differences [1]
              • (line 48 en, 30 tr)
                  Match pattern differs
                  en: count(*) = 1
                  tr: .
╭──────────────────────────────────────────────────────────────────────────────╮
│                 SUMMARY                                                      │
│   Files checked                     1                                        │
│   Files with issues                 1                                        │
│   Files OK                          0                                        │
│   Missing rules                     1                                        │
│   Untranslated text                 6                                        │
│   Rule differences                  6                                        │
│   Extra rules                       0                                        │
╰──────────────────────────────────────────────────────────────────────────────╯

- Render rich warnings as rule groups with per-issue-type subgroups

- Add auditor tests for subgroup ordering, mixed issue types, and verbose snippet behavior

- Add CLI rich end-to-end grouping checks plus calculus golden snapshot

- Improve docstrings and compact test argument setup
@moritz-gross
Copy link
Contributor Author

I also found out we could use pytest-xdist to have multiple workers with uv run pytest -n <#workers>, but as of so far the overhead makes it actually take longer.

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.

1 participant