Skip to content

CI: cover four untested suites and collapse the torch matrix (10 jobs to 2) - #178

Merged
hyphaltip merged 2 commits into
mainfrom
ci-cover-untested-suites
Nov 28, 2026
Merged

hyphaltip merged 2 commits into
mainfrom
ci-cover-untested-suites

Conversation

@hyphaltip

@hyphaltip hyphaltip commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Two changes to .github/workflows/build_and_test.yml, both driven by measurement rather than guesswork.

1. Four test folders were in no CI job at all

Suite Tests Time Deps
crossclade_domain_search 30 0.06 s stdlib only
curation 61 0.08 s stdlib only
aga1_class — — needs pandas
input_tests 0 — collects nothing

The first two were being run by hand after each merge — coverage that depends on somebody remembering. They now run in the existing no-torch job, which takes 1,365 tests in 10.5 s.

2. The torch matrix cost 881 of 916 runner-seconds; its tests take ~37 s

Measured on a real run of main:

Job Time Actual test time
step1_compare 259 s genuinely needs torch
the other 9 52–84 s each, 622 s total 0.03–13.5 s each
no-torch unit job 27 s —
lint 8 s —

Only step1_compare imports torch, esm or sklearn. secretome_discovery needs scipy and biopython (Bio.Phylo); the other eight need nothing beyond pytest/pyyaml/numpy. (fungi_scan greps for scipy but passes without it.)

So: step1_compare keeps its own job, and the other nine share one light job. Verified locally — all nine pass in that environment, 739 tests in 9 s.

Expected: ~916 → ~350 runner-seconds per run, about 60% off.

The check that mattered before splitting

A speedup that silently converts running tests into skipped ones is worse than no speedup. Every skip in these suites is for a missing binary (hmmer, mafft) or an absent data file — never a missing Python package. Dropping torch turns no running test into a skipped one.

What this does not do

  • Wall-clock is unchanged. step1_compare (259 s) already ran in parallel and still dominates. This buys cost, not latency. The next lever there is caching the torch wheel.
  • Both analysis jobs keep continue-on-error: true, so this changes cost, not what can block a merge. Worth noting those jobs consume runners but cannot fail the build — whether that is right is a separate decision.
  • Each suite still gets its own pytest process, since each conftest.py puts its own analysis/ directory on sys.path and names like figures_ext exist in more than one. The loop runs all nine even when one fails, groups each in the log, and fails the step if any did.

Found, deliberately not fixed here

  • aga1_class needs pandas, which the no-torch job does not install.
  • input_tests collects zero tests — dead weight, or something that silently stopped collecting.

🤖 Generated with Claude Code

hyphaltip and others added 2 commits November 27, 2026 14:33
Four test folders were in no CI job at all: crossclade_domain_search,
curation, aga1_class and input_tests. The first two were being run by hand
after each merge, which is coverage that depends on somebody remembering.

Both need nothing but the standard library and run in 0.14 s between them
(30 and 61 tests), so they go in the existing no-torch job rather than the
torch matrix. The job's full command now passes 1,365 tests in 10.5 s.

Two things found and deliberately NOT changed here, because they are
judgement calls rather than omissions:

  aga1_class needs pandas, which the no-torch job does not install.
  input_tests collects zero tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Measured on a real run of main: the analysis-tests matrix cost 881 of the
run's 916 runner-seconds, while the tests themselves take about 37 s in
total. The rest was ten copies of the same `pip install torch`.

Only step1_compare imports torch, esm or sklearn. It keeps its own job.
The other nine share one light job on pytest/pyyaml/numpy plus scipy and
biopython (secretome_discovery uses Bio.Phylo). Verified locally: all nine
pass in that environment, 739 tests in 9 s.

Checked before splitting, because a speedup that silently stops running
tests is worse than no speedup: the tests these suites skip are skipped for
missing BINARIES (hmmer, mafft) and absent data files, never for a missing
Python package. Dropping torch turns no running test into a skipped one.

The suites still get one pytest process each, since each conftest.py puts
its own analysis/ directory on sys.path and module names such as figures_ext
exist in more than one. The loop runs all nine even when one fails, groups
each in the log, and fails the step if any failed.

Expected cost per run: about 916 -> 350 runner-seconds. Wall-clock is
unchanged, because step1_compare (259 s) already ran in parallel and still
dominates. Both analysis jobs keep continue-on-error, so this changes cost,
not what can block a merge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@hyphaltip hyphaltip changed the title CI: cover the crossclade_domain_search and curation suites CI: cover four untested suites and collapse the torch matrix (10 jobs to 2) Nov 28, 2026
@hyphaltip
hyphaltip merged commit 5b86b36 into main Nov 28, 2026
4 checks passed
@hyphaltip
hyphaltip deleted the ci-cover-untested-suites branch November 28, 2026 01:19
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