Skip to content

tests: exclude the symmetry tests from the general test job - #146

Merged
stevevanhooser merged 2 commits into
mainfrom
claude/clever-bardeen-hf5jgx
Oct 21, 2026
Merged

stevevanhooser merged 2 commits into
mainfrom
claude/clever-bardeen-hf5jgx

Conversation

@stevevanhooser

@stevevanhooser stevevanhooser commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

The general test job (run_tests.yml → tools/tasks/testToolbox.m → matbox.tasks.testToolbox) collects every test under tools/tests, so it also ran the cross-language symmetry tests. Those already run in the symmetry workflows: NDR-matlab's test-symmetry.yml and NDR-python's cross-language one. There they get the artifacts they read and run in order.

In the general job they only repeated that work. Python never runs here, so since #145 every pythonArtifacts read case shows up as skipped: a standing set of 7 skips on every run.

Changes

  • All 14 symmetry test classes (7 make, 7 read) are now tagged: classdef (TestTags = {'Symmetry'}) ….
  • tools/tasks/testToolbox.m passes ExcludeTags="Symmetry". MatBox's testToolbox has no folder exclusion, but it does support ExcludeTags. The action calls this repo-local wrapper when it exists, so run_tests.yml needs no change.
  • New tools/tests/+ndr/+unittest/TestSymmetryTestsAreTagged.m: fails if any test under ndr.symmetry lacks the tag. The exclusion is only as good as the tags, so a new symmetry test can't quietly slip back into the general job.
  • Both symmetry INSTRUCTIONS.md files: a rule to tag new classes, and the readArtifacts example now shows the tag.
  • New codecov.yml: the project check allows a coverage drop of up to 3% against the base, instead of Codecov's default of failing on any drop. The patch check is unchanged (target: auto). See Coverage below.

The symmetry workflows collect tests with TestSuite.fromPackage and don't filter by tag, so they're unaffected.

Result

  • General job: 395 tests ran, 0 failed (before: 415). It removed exactly the 21 symmetry test cases (7 make + 7 read × 2 sources) and added the tag guard, which passed. Skips went from 10 to 3.
  • Coverage: 54.94% → 52.21% (−2.73%, 262 lines). Those 262 lines of +ndr reader/format code are reached only by the symmetry tests, and no unit test covers them. With no codecov.yml, codecov/project failed on that drop. The maintainer chose to allow drops of up to 3% (option 2 in the discussion below), so this drop passes and a larger one still fails. Unit tests for those lines would be the lasting fix.

Verification

I wrote this without access to MATLAB, so CI is its first run. The test syntax (TestTags class attribute, Test.Tags) and the ExcludeTags option are taken from MatBox's own testToolbox.m source. I couldn't reach Codecov's validator from my environment, so this PR's codecov/project check is what confirms codecov.yml.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QjkvVXsdCVw6NNe5SnGNyX

The general test job (run_tests.yml -> tools/tasks/testToolbox.m) collects
every test under tools/tests, so it also ran the cross-language symmetry
tests. Those run properly in the symmetry workflows, which make the
artifacts they read and run them in order. In this job they only repeated
that work, and since Python never runs here, every pythonArtifacts read
case came back skipped: a standing set of 7 skips on every run.

- Tag all 14 symmetry test classes TestTags = {'Symmetry'}.
- testToolbox.m passes ExcludeTags="Symmetry" to matbox.tasks.testToolbox
  (MatBox's supported way to deselect; it has no folder exclusion).
- +unittest/TestSymmetryTestsAreTagged fails if any test under
  ndr.symmetry lacks the tag, so a new symmetry test cannot slip back in.
- Both symmetry INSTRUCTIONS.md files say to tag new classes.

The symmetry workflows collect tests with TestSuite.fromPackage and do not
filter by tag, so they are unaffected.

Written without access to MATLAB; CI runs it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjkvVXsdCVw6NNe5SnGNyX
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

395 tests   - 20   392 ✅  - 13   36s ⏱️ +10s
 41 suites  - 13     3 💤  -  7 
  1 files   ± 0     0 ❌ ± 0 

Results for commit af078b9. ± Comparison against base commit e2e96be.

This pull request removes 21 and adds 1 tests. Note that renamed tests count towards both.
ndr.symmetry.makeArtifacts.format.readOmeZarr ‑ testReadOmeZarrArtifacts
ndr.symmetry.makeArtifacts.format.readSpikeGadgets ‑ testReadSpikeGadgetsArtifacts
ndr.symmetry.makeArtifacts.reader.readData ‑ testReadDataArtifacts
ndr.symmetry.makeArtifacts.reader.readPrairieview ‑ testReadPrairieviewArtifacts
ndr.symmetry.makeArtifacts.reader.readTiffstack ‑ testReadTiffstackArtifacts
ndr.symmetry.makeArtifacts.reader.readVideo ‑ testReadVideoArtifacts
ndr.symmetry.makeArtifacts.reader.readVld ‑ testReadVldArtifacts
ndr.symmetry.readArtifacts.format.readOmeZarr ‑ testReadOmeZarrArtifacts(SourceType=matlabArtifacts)
ndr.symmetry.readArtifacts.format.readOmeZarr ‑ testReadOmeZarrArtifacts(SourceType=pythonArtifacts)
ndr.symmetry.readArtifacts.format.readSpikeGadgets ‑ testReadSpikeGadgetsArtifacts(SourceType=matlabArtifacts)
…
ndr.unittest.TestSymmetryTestsAreTagged ‑ testEverySymmetryTestIsTagged

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.21%. Comparing base (e2e96be) to head (af078b9).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #146      +/-   ##
==========================================
- Coverage   54.94%   52.21%   -2.73%     
==========================================
  Files         164      164              
  Lines        9598     9598              
==========================================
- Hits         5274     5012     -262     
- Misses       4324     4586     +262     

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

Copy link
Copy Markdown
Contributor Author

codecov/project is red. The tests are fine. The red reflects coverage this job no longer measures, so it needs a maintainer decision.

  • Tests: 395 ran, 0 failed. Before this PR: 415. The difference is 21 symmetry test cases removed (7 make + 7 read × 2 sources) and the new tag guard added. Skips went from 10 to 3, so the 7 pythonArtifacts skips are gone, as intended.
  • Coverage: 54.94% → 52.21% (−2.73%, 262 lines). Those 262 lines of +ndr reader/format code are exercised only by the symmetry tests, and no unit test covers them. Codecov's default (there's no codecov.yml) fails on any drop.

Options:

  1. Accept the drop: merge with codecov/project red. Coverage then reports only what the unit tests reach.
  2. Add a codecov.yml with a project threshold (for example coverage.status.project.default.threshold: 3%). Simple, but it also hides future real drops of up to that size.
  3. Upload coverage from the symmetry workflow too: run its suites with CodeCoveragePlugin and upload with a Codecov flag, so the combined coverage counts again. This keeps the measurement but is more CI work, and the status can flap while uploads land.
  4. Write unit tests for those 262 lines: the durable fix, but a separate piece of work.

I haven't changed the threshold, since that would quietly weaken a check. Tell me which option you want and I'll do it.


Generated by Claude Code

Excluding the symmetry tests from the general test job (previous commit)
drops measured coverage by 2.73% (262 lines of +ndr code that only the
symmetry tests reach), and with no codecov.yml Codecov's default fails
codecov/project on any drop at all. Add a codecov.yml with a 3% project
threshold against the base; a larger drop still fails. Patch status is
unchanged (target auto).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QjkvVXsdCVw6NNe5SnGNyX

Copy link
Copy Markdown
Contributor Author

Went with option 2: af078b9 adds a codecov.yml allowing a project coverage drop of up to 3% (this one is 2.73%). Larger drops still fail, and the patch check is unchanged.


Generated by Claude Code

@stevevanhooser
stevevanhooser merged commit d8f86e3 into main Oct 21, 2026
8 checks passed
@stevevanhooser
stevevanhooser deleted the claude/clever-bardeen-hf5jgx branch October 21, 2026 15:45
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