Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
230 commits
Select commit Hold shift + click to select a range
9f7d562
Sample per-genotype latents at library size under autoguides
harmsm Sep 23, 2026
8db2c76
Add SVI guide selection (--guide_type) with numpyro autoguides
harmsm Sep 23, 2026
d118c5c
Keep test-suite output files out of the working directory
harmsm Sep 23, 2026
3561e08
Merge branch 'claude/gallant-lederberg-468b50'
harmsm Sep 23, 2026
7893bdf
updated docs and reports
harmsm Sep 23, 2026
15ddddb
added "future" directory
harmsm Sep 23, 2026
641f691
Add tfs-summarize-calibration; fix summarize-fit globs
harmsm Sep 23, 2026
cf3726e
Split a co-transformed cell's abundance among its plasmids
harmsm Sep 23, 2026
abec95f
Build co-transformed cells' growth from cell-level physics
harmsm Sep 23, 2026
fc0f2b9
Carry congression purity as GrowthData.bulk_fraction; record 3.0 study
harmsm Sep 23, 2026
18f5ed8
Rename future/ to planning/; add planning/studies
harmsm Sep 23, 2026
7b59d75
cleanup commit. files should have gone in with:
harmsm Sep 23, 2026
d46af88
Fix batch-order bug in mut activity and _simple theta; add order check
harmsm Sep 23, 2026
4315be2
Stop committing test reports and badges
claude Sep 23, 2026
cfa549b
Merge pull request #1 from harmsm/claude/charming-ritchie-gebxj3
harmsm Sep 23, 2026
6338ee4
Let dk_geno and activity components return library-ordered values
harmsm Sep 23, 2026
943d903
Merge branch 'main' of github.com:harmsm/tfscreen
harmsm Sep 23, 2026
69105a2
Keep categorical_geno theta library-ordered (step 3.3a)
harmsm Sep 23, 2026
5b442fa
Draw fixed co-resident sets for the congression mixture (step 3.3b)
harmsm Sep 23, 2026
fbba986
Keep library-sized latents whole in chunked posterior forward passes
harmsm Sep 24, 2026
2b50492
Mix clean and congressed cells at the observable level (step 3.3c)
harmsm Sep 24, 2026
c3354b8
Match congression weights to the simulator; retire Stage 1.5 (step 3.4)
harmsm Sep 24, 2026
6e4735e
Fix growth prediction for library-file models; set up 3.5 grid
harmsm Sep 24, 2026
87d9125
Merge branch 'main' of github.com:harmslab/tfscreen
harmsm Sep 24, 2026
1870553
Record the binary-transformant bench result (step 4 input)
harmsm Sep 24, 2026
ebcf5b1
Record the 3.5 grid results and detection-floor diagnosis
harmsm Sep 24, 2026
d2523b2
File per-sample offset and count-likelihood ideas
harmsm Sep 24, 2026
9665b99
Resolve nested file paths in tfs-setup-sim-grid
harmsm Sep 25, 2026
f2de521
Merge pull request #2 from harmsm/claude/stoic-moser-869046
harmsm Sep 25, 2026
14f1bc4
Record masked results; set up binding-weight grid (step 3.5)
harmsm Sep 25, 2026
3098fa2
Make tfs-setup-sim-grid output directories movable
harmsm Sep 25, 2026
5b7789d
Make tfs-setup-grid output directories movable
harmsm Sep 25, 2026
c7b228d
Diagnose the unanchored k/dk_geno slide; set up anchored grid (3.5)
harmsm Sep 25, 2026
2d86049
Set up lambda-0 controls for the mixture anomaly (step 3.5)
harmsm Sep 25, 2026
c6b75d4
cleaned up some spuriously added files
harmsm Sep 25, 2026
c5061de
Review step 3.5 fits: SVI unconverged; file convergence study
harmsm Sep 25, 2026
847edb0
Merge branch 'claude/congression-calibration-debug-ad50bb'
harmsm Sep 25, 2026
05870c9
Integrate the convergence review; set up resume runs (step 3.5)
harmsm Sep 25, 2026
bff2c51
Count only designed codons as library sites
harmsm Sep 25, 2026
e998f7a
Merge branch 'claude/great-leavitt-c8287b'
harmsm Sep 25, 2026
5bf5b78
Stop SVI/MAP on noise-referenced convergence, cut step size on stalls
harmsm Sep 25, 2026
c7cde80
Merge branch 'claude/gallant-goldwasser-2329c8'
harmsm Sep 25, 2026
56045e6
Record converged 3.5 fits: transient confirmed, lambda pulled up
harmsm Sep 25, 2026
a2d3441
Set up baseline and lambda-profile grids (step 3.5)
harmsm Sep 25, 2026
9666951
Stop clipping Adam gradients; gate convergence on loss skew
harmsm Sep 26, 2026
985783d
Record baseline and profile grids on the new convergence code (3.5)
harmsm Sep 26, 2026
501bc00
Merge branch 'claude/priceless-gauss-369bc1'
harmsm Sep 26, 2026
ec47f11
Add a simulated Hill-coefficient limit; realistic study binding noise
harmsm Sep 26, 2026
f76254d
Record converged 3.5 re-run: mixture beats single under congression
harmsm Sep 26, 2026
811018c
Set up the 3.5 confirming round; record open items (step 3.5)
harmsm Sep 26, 2026
cdfd5db
Build a congressed cell's theta by partition function (step 4)
harmsm Sep 26, 2026
6696510
Record the 3.5 confirming round and close step 3.5
harmsm Sep 26, 2026
510639b
Set up the step 4 cross-rule validation grid
harmsm Sep 26, 2026
3f628bf
Add planning idea for wt-relative growth-only fitting
harmsm Sep 26, 2026
9caf070
Merge branch 'claude/growth-only-data-fitting-2882bf'
harmsm Sep 26, 2026
3d60dfd
Record the cross-rule grid: theta rule not identifiable (step 4)
harmsm Sep 26, 2026
8254642
Add soft-min congression dk rules and a sensitivity grid (step 5)
harmsm Sep 26, 2026
b949095
Add an analysis roadmap; document the sampling protocol
harmsm Sep 26, 2026
dc61879
Record the dk-rule grid: rule irrelevant at realistic dk spread (5)
harmsm Sep 26, 2026
55eb562
Add a post-count-likelihood re-validation step to the congression plan
harmsm Sep 26, 2026
25638d3
Add step 0 study scripts; provisional first results
harmsm Sep 26, 2026
3f7fe49
Merge branch 'main' into claude/physics-improvements-roadmap-03a273
harmsm Sep 26, 2026
98fb6db
Allow growth-only models with no binding data (roadmap step 1)
harmsm Sep 26, 2026
590687d
Add sampling noise and OD600 to the simulator (roadmap step 4)
harmsm Sep 27, 2026
775f8b7
Fit read counts directly (roadmap step 7)
harmsm Sep 27, 2026
5820c19
Add a growth-only fit on a wt-relative scale (roadmap step 5)
harmsm Sep 27, 2026
c65390a
Fix the pre-fit Hessian point and count-likelihood underflow
harmsm Sep 27, 2026
740ebc1
Pool stalled windows before cutting; overflow-safe horseshoe
harmsm Sep 27, 2026
1ef283d
Record count-likelihood validation results (roadmap step 7)
harmsm Sep 27, 2026
2620a5b
Default tfs-configure-model to the count likelihood
harmsm Sep 27, 2026
7fe75ed
Add tfs-calibrate-od600 (roadmap step 3)
harmsm Sep 27, 2026
c57d9ee
Start SVI at the pre-MAP point with narrow guide scales
harmsm Sep 27, 2026
e29c739
Add low-rank and MAP+Laplace arms to the relative-fit grid
harmsm Sep 28, 2026
8e244cf
Fix NUTS start; record step 5 and the SVI-overconfidence pilot
harmsm Sep 28, 2026
32a7ec1
Non-centered ln_cfu0 tube offset, runaway-loss stop, SVI study results
harmsm Sep 28, 2026
722393c
Refuse factored ln_cfu0 across libraries; rerun grids with hierarchical
harmsm Sep 28, 2026
5103d40
Record reruns with ln_cfu0 hierarchical (count-likelihood, relative-f…
harmsm Sep 28, 2026
beaab7b
Add a two-stage fit that carries k/m uncertainty to genotypes
harmsm Sep 29, 2026
f21e9cc
adding gitignore to make sure pilot data does not end up in repo
harmsm Sep 29, 2026
9db2828
Unfreeze SVI hyper scales; floor Laplace at prior curvature
harmsm Sep 29, 2026
6e2903d
Stop clipping simulated binding observations to [0, 1]
harmsm Sep 29, 2026
079680b
Fix ln_cfu0 extraction; sampling flags for full-library fits
harmsm Sep 30, 2026
d451faa
Add sigma_fixed to level tube offsets
harmsm Sep 30, 2026
faa5b11
Add tfs-fit-model --init_from to start at an earlier MAP point
harmsm Sep 30, 2026
e4320c7
Allow per-condition m prior scales in linear growth
harmsm Oct 1, 2026
beacad0
Add a fixed log(hill_n) population SD to the Hill theta components
harmsm Oct 1, 2026
0e220e7
Flag the relative-fit guide verdict; set up a post-fix rerun
harmsm Oct 2, 2026
f762b13
Rerun the relative-fit guide comparison after the scale and Laplace f…
harmsm Oct 2, 2026
cd208d1
Add a per-genotype Laplace for full-library uncertainty
harmsm Oct 2, 2026
a874ac3
Add shared-parameter uncertainty to the block Laplace; hold Hill SDs
harmsm Oct 2, 2026
41eaddd
Close pre-merge gaps: study commits, Laplace script, stale docs
harmsm Oct 3, 2026
6502972
Add contributing guide, PR template and CI coverage check
harmsm Oct 4, 2026
c5de9f2
Track the real-data fit scripts; plan the experiment pipeline
harmsm Oct 4, 2026
8c7e780
Merge branch 'claude/physics-improvements-roadmap-03a273'
harmsm Oct 4, 2026
be2f90f
Keep test_nan_explosion working under numpyro 0.22
harmsm Oct 4, 2026
caeefdc
Clean up the CLI interface and docs for 0.5.0
harmsm Oct 4, 2026
bb4f17b
small fixes:
harmsm Oct 4, 2026
8a7abbb
Stage the level-offset MAP inside tfs-fit-model
harmsm Oct 4, 2026
6671763
Judge MAP convergence windows by the exact full-batch loss
harmsm Oct 4, 2026
27109e2
Record the offset-mode finding; re-plan the pipeline's last steps
harmsm Oct 5, 2026
9ebaa4a
Write the simulated experiment in the raw formats real data come in
harmsm Oct 5, 2026
bd837ba
Set up the full-size simulation of the dev-data design
harmsm Oct 5, 2026
47b02e6
Flag offset-mode fits in tfs-summarize-fit; write the real-data recipe
harmsm Oct 5, 2026
8399fb6
Keep the simulated wt on its reference curve under hill_geno
harmsm Oct 7, 2026
bf4a182
Record the recipe and full-size simulation runs; close step 7
harmsm Oct 8, 2026
554ef44
Calibrate the simulator's read depth to the real screen
harmsm Oct 8, 2026
2287207
Fix --set_priors under pandas 3; run CI tests in parallel
harmsm Oct 8, 2026
b79ffdc
plateau counter
harmsm Oct 8, 2026
c3c5482
Cover every line the PR changes; drop a duplicate __main__ block
harmsm Oct 9, 2026
222d147
Calibrate the simulator's read depth to the real screen
harmsm Oct 9, 2026
85c354e
Plan honest intervals for the deep genotypes; set up the k/m anchor arms
harmsm Oct 9, 2026
34b8143
Record the k/m anchor results; set up the m-bias factorial
harmsm Oct 9, 2026
2bdce17
Start the PnnC structure MLPs from a random W1 so they can learn
harmsm Oct 10, 2026
845b0c9
Carry learned model-side params into posteriors, predictions and hand…
harmsm Oct 10, 2026
46f13b6
Write the thermodynamic models' full simulation truth and score it
harmsm Oct 10, 2026
11de71f
Simulate binding data for the thermodynamic theta models
harmsm Oct 10, 2026
b4e5994
Project ddG_H onto K_U in the U1 PddG and PnnC models
harmsm Oct 10, 2026
434ea81
Merge branch 'claude/pnnc-nn-init' into claude/thermo-sim-truth
harmsm Oct 10, 2026
1a0c300
Record the m-bias factorial's first round; set up fit-side subsets
harmsm Oct 10, 2026
9f25202
Read titrant concentrations in mM for every thermodynamic theta model
harmsm Oct 10, 2026
845821e
Check units, columns and numbering of the thermo structural inputs
harmsm Oct 10, 2026
d94bc8a
Keep the fitted mutation index when predicting on genotype subsets
harmsm Oct 10, 2026
cf99296
Extract and score the per-structure ddG of the PddG and PnnC models
harmsm Oct 10, 2026
7fcef80
Record the m-bias subsets: the doubles steepen m; set up a real arm
harmsm Oct 10, 2026
fed6391
Record the real no-doubles fit; set up the held-k/m library fit
harmsm Oct 10, 2026
09e4f7e
Use the standard MWC dimer in both thermodynamic theta families
harmsm Oct 10, 2026
4c14099
Widen the M3 effector selectivity and reject unknown priors rows
harmsm Oct 10, 2026
75611b0
Record m-bias round 3 (held k/m fixes X); set up kanR-only holds
harmsm Oct 10, 2026
1bbae40
Add ddG_truth_sd to set the SD of the simulated per-structure ddG
harmsm Oct 10, 2026
58b83b2
Pin linear growth's k and m per condition; record m-bias round 4
harmsm Oct 11, 2026
629ed2a
Record m-bias round 5: pheS's free k reopens the k/dk_geno slide
harmsm Oct 11, 2026
7984d7e
Let tfs-simulate subsample the library it simulates
harmsm Oct 11, 2026
c714103
Drop undetectable-OD600 tubes from the direct growth table too
harmsm Oct 11, 2026
410ac6a
Merge branch 'claude/sim-subsample' into claude/thermo-sim-truth
harmsm Oct 11, 2026
c4f03d4
Make the per-structure ddG scale a centered hierarchical prior
harmsm Oct 11, 2026
fca6106
Merge branch 'claude/sigma-s-centered' into claude/thermo-sim-truth
harmsm Oct 11, 2026
acc6973
Compute Laplace prior SDs at the MAP and fail loudly without them
harmsm Oct 11, 2026
f8fa461
Put the structural ddG prior on the constants
harmsm Oct 11, 2026
f53d24d
Merge branch 'claude/ddg-constant-prior' into claude/thermo-sim-truth
harmsm Oct 11, 2026
89845dd
Compute MWC theta in log space so extreme constants stay finite
harmsm Oct 11, 2026
f39a471
Merge branch 'claude/laplace-numerics' into claude/thermo-sim-truth
harmsm Oct 11, 2026
f4669f8
Regenerate the CLI reference
harmsm Oct 11, 2026
b8be0d2
Record m-bias rounds 5-6: pin all four; real X stretches 1.47
harmsm Oct 11, 2026
128044e
Set up step 2 (k/m draws) and a second simulation seed
harmsm Oct 11, 2026
e6035ba
Add a held per-structure ddG scale to the PddG and PnnC models
harmsm Oct 11, 2026
b3864eb
Merge branch 'claude/ddg-sigma-fixed' into claude/thermo-sim-truth
harmsm Oct 11, 2026
187e4f9
Record the stage-1 m bias across seeds; set up a no-congression test
harmsm Oct 11, 2026
e712f77
Find congression behind stage 1's pheS bias; set up a spikes-only sta…
harmsm Oct 11, 2026
2e382c0
Record the spikes-only stage 1; set up a tight-control real rerun
harmsm Oct 11, 2026
f2e8918
Record the spikes-only stage 1: it works on the simulation, not real …
harmsm Oct 11, 2026
aee1e6d
Record option 2: deep singles bring congression's pheS bias back
harmsm Oct 12, 2026
5a77214
Separate the doubles' pull from congression; set up a mixture stage 1
harmsm Oct 12, 2026
332e99a
Model congression in stage 1: pheS bias gone; set up stage 2 tests
harmsm Oct 12, 2026
72bb96d
Record the first stage 2 after a mixture stage 1; finish mixture fits
harmsm Oct 12, 2026
95d4a57
Settle the two-stage recipe; set up the real mixture stage 1
harmsm Oct 12, 2026
d38d549
Record the real mixture stage 1: pheS gap is not congression
harmsm Oct 12, 2026
a11ffde
Record the real data's stage 2 under the full two-stage recipe
harmsm Oct 12, 2026
d574e13
Plan the intervals and pipeline; set up the kanR-only check and jackk…
harmsm Oct 13, 2026
639012a
kanR-only check, seed-1 jacknife
harmsm Oct 13, 2026
881cb78
Add a control-growth check for a library-specific dk_geno
harmsm Oct 13, 2026
1e79e4b
Carry stage 1's k uncertainty into X: deep coverage near nominal
harmsm Oct 13, 2026
a8abff6
Plan the two-stage fit; add its functions and the shared X shift
harmsm Oct 13, 2026
4923375
Add tfs-fit-two-stage: the two-stage relative fit as one command
harmsm Oct 13, 2026
3ce04cc
Add tfs-fit-two-stage: the two-stage relative fit as one command
harmsm Oct 13, 2026
4f52e68
Add a k-shift control refit to the two-stage validation
harmsm Oct 14, 2026
9477a57
Add a one-library stage 2 run to the two-stage validation
harmsm Oct 15, 2026
7d01721
Record the two-stage validation results: the k shift fails
harmsm Oct 15, 2026
31e3362
Let hill_relative hold wt's curve; queue a pheS-only fit with it held
harmsm Oct 15, 2026
b665567
Record the wt-held pheS fit: the pheS compression is real
harmsm Oct 15, 2026
f28eb10
Add a titrant-dependent k to linear growth; test it in stage 1
harmsm Oct 15, 2026
dc9862d
Make the titrant-dependent k jit-safe; add the stage 1 comparison
harmsm Oct 15, 2026
aea7f6f
Record the titrant-dependent k test: log-linear only, partial
harmsm Oct 15, 2026
d806051
Drop the free titrant k; check stage 1 against the within-tube data
harmsm Oct 15, 2026
aff855d
Propose taking m from relative information only
harmsm Oct 15, 2026
ad25c6b
Set up relative stage 1; read k and m from a MAP when pinned
harmsm Oct 15, 2026
e5501ab
Record relative stage 1: totals are not the cause; pheS is dropped
harmsm Oct 15, 2026
6aa9ae4
Add the per-marker midpoint test: the markers differ in steepness
harmsm Oct 16, 2026
3d5fbc4
Trace the 0-IPTG pheS anomaly to one row of tubes; add tube QC
harmsm Oct 16, 2026
d540edf
Add a per-condition warp of theta to linear growth; set up the test
harmsm Oct 16, 2026
76ce30d
Add tfs-check-tubes: flag tubes whose composition disagrees with label
harmsm Oct 16, 2026
8be1bd1
Merge branch 'main' into claude/thermo-sim-truth
harmsm Oct 16, 2026
e9eb8ee
Merge branch 'claude/amazing-mcnulty-a57ada'
harmsm Oct 16, 2026
f15f5b4
Add tfs-correct-tubes: documented corrections to a tube table
harmsm Oct 16, 2026
feb092b
Merge branch 'claude/agitated-mcnulty-2fbe65'
harmsm Oct 16, 2026
a167070
Record the warp runs: kanR's warp helps, pheS's gap remains
harmsm Oct 16, 2026
ba1752b
Add the likelihood attribution for stage 1 fits
harmsm Oct 16, 2026
9a0a2f8
Record the likelihood attribution: wt's own rows resist the within-tu…
harmsm Oct 16, 2026
b86c0ec
Record wt's trajectory against the library: the scale of X is the issue
harmsm Oct 16, 2026
643145d
Remove a stray conflict marker from a configuration_io test
harmsm Oct 16, 2026
7a76d8b
Merge claude/thermo-sim-truth: thermodynamic simulation truth and fixes
harmsm Oct 16, 2026
8eac5fe
Plan the return to a joint fit of growth and binding
harmsm Oct 17, 2026
d614b11
Add tfs-process-binding: lab binding table to a binding_df
harmsm Oct 17, 2026
45ffb7f
Default binding_weight to 1: each binding observation counts once
harmsm Oct 17, 2026
be172c2
Add a binding-to-growth titrant scale s to hill_geno
harmsm Oct 17, 2026
a408a63
Add genotype_offset binding noise: one offset per binding genotype
harmsm Oct 17, 2026
47f3f9c
Test the joint fit's model pieces together; extract the warp
harmsm Oct 17, 2026
5224a2a
Simulate the joint fit's pieces; set up the joint stage 1 study
harmsm Oct 17, 2026
ba949f3
Record joint-fit simulation run 1: pieces work; null finds a wrong mode
harmsm Oct 17, 2026
9cf28ae
Joint-fit simulation run 2: the null fit was trapped; start from plain
harmsm Oct 17, 2026
1981197
Joint-fit simulation run 3: start from the plain fit recovers both arms
harmsm Oct 17, 2026
3505230
Joint-fit simulation: set up the pinned-truth run; jobs on gpu, 6 h
harmsm Oct 17, 2026
776838c
Joint-fit simulation run 4: the steep m sits in pheS's slow growers
harmsm Oct 17, 2026
cb71c73
Joint-fit simulation run 5: half the m bias is MAP shrinkage of theta
harmsm Oct 18, 2026
c0d38db
Hold hill_geno's population SDs; set up joint-fit simulation run 6
harmsm Oct 18, 2026
c137646
Joint-fit simulation run 6: the m bias is an affine squeeze of theta
harmsm Oct 18, 2026
333aaba
Joint-fit simulation: set up run 7 (weaker pooling, more binding)
harmsm Oct 18, 2026
1a3d3d4
Joint-fit simulation run 7: binding singles are the lever on m
harmsm Oct 18, 2026
5f45e87
Joint-fit simulation: set up run 8 (binding singles with congression)
harmsm Oct 18, 2026
f40e234
Joint-fit simulation run 8: congression is now the largest m bias
harmsm Oct 18, 2026
e2dda3b
Add tfs-configure-model --congression_sets; set up run 9
harmsm Oct 18, 2026
34fd22d
Joint-fit simulation run 9: more co-resident draws help, then plateau
harmsm Oct 18, 2026
43c2126
Joint-fit simulation: record theta so far; set up run 10
harmsm Oct 18, 2026
dff58cd
Joint-fit simulation run 10: theta error falls as 1/sqrt(binding sing…
harmsm Oct 18, 2026
a76a657
Set up the joint stage 1 on the real screen (joint-fit plan step 6)
harmsm Oct 18, 2026
bf319f8
Add a findings ledger; record joint-fit-real run 1; pause the joint plan
harmsm Oct 18, 2026
f36df1d
x-vs-binding run 2: M42I's inverted order survives the two-stage X
harmsm Oct 19, 2026
76881c5
Add the 0.5.0 close-out checklist; drop the reversed pheS row
harmsm Oct 19, 2026
d8161bc
Keep the two-stage k-shift refits at stage 2's MAP
harmsm Oct 19, 2026
37dd8d1
Release checklist: keep the release at 0.5.0
harmsm Oct 19, 2026
9639145
Refuse experimental pieces in tfs-fit-two-stage; apply tube corrections
harmsm Oct 19, 2026
6fd184a
Add tfs-fit-two-stage's summary step: one results table, tfs_x.csv
harmsm Oct 20, 2026
ccd5544
Fix --shared_shift under pandas 3; test with copy-on-write locally
harmsm Oct 20, 2026
796a2f0
Add the "Analyzing a screen" docs page and its SLURM example
harmsm Oct 20, 2026
f30c2ef
Point CLAUDE.md and the pipeline page at the release route
harmsm Oct 20, 2026
4396cbb
Ship the two-stage fit without the k shift (validation run 2)
harmsm Oct 20, 2026
3fe6941
Floor the dependencies, add a cuda12 extra and the 0.5.0 constraints
harmsm Oct 20, 2026
7109137
Require Python 3.12, test 3.12-3.14; drop the constraints file
harmsm Oct 20, 2026
68b958f
Screen-analysis docs: make the growth table step by step
harmsm Oct 25, 2026
8eb4af9
Fold the CHANGELOG into 0.5.0
harmsm Oct 25, 2026
d5e636a
Cover every changed line for diff-cover; fix a ΔΔG loader crash
harmsm Oct 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[flake8]
exclude =
.git,
.claude,
__pycache__,
build,
dist,
docs/build,
*.egg-info,
.venv,
venv
25 changes: 25 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## What and why

<!-- What does this change do, and why is it needed? Link the issue or
planning/ file it addresses. -->

## How it was verified

<!-- Tests added, commands run, simulations or fits checked. -->

## Checklist

See [CONTRIBUTING.md](https://github.com/harmslab/tfscreen/blob/main/CONTRIBUTING.md) for details on each item.

- [ ] Branch is up to date with `upstream/main`
- [ ] New and changed code has full unit test coverage, including branches and error paths
- [ ] Bug fixes include a test that fails without the fix
- [ ] Slow tests are marked `@pytest.mark.slow`
- [ ] `pytest tests/tfscreen --runslow` passes locally
- [ ] `diff-cover coverage.xml --compare-branch=upstream/main` reports 100%
- [ ] `flake8 . --count --select=E9,F63,F7,F82` reports no errors
- [ ] Public functions, classes and methods have numpydoc docstrings
- [ ] New components, CLIs and YAML keys follow the conventions in `CLAUDE.md`
- [ ] `CLAUDE.md` is updated if the change alters how the code works
- [ ] `CHANGELOG.md` has an entry under `[Unreleased]` for any user-visible change
- [ ] No data, checkpoints or other large files are committed
56 changes: 54 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
type: boolean
default: false

# A newer push to the same branch or pull request cancels the older run.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Python ${{ matrix.python-version }} / ${{ matrix.os }}
Expand All @@ -20,7 +25,11 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.11", "3.12", "3.13"]
python-version: ["3.12", "3.13", "3.14"]
# The coverage job runs this one, plus the slow tests.
exclude:
- os: ubuntu-latest
python-version: "3.12"

steps:
- uses: actions/checkout@v4
Expand All @@ -29,6 +38,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install package and test dependencies
run: pip install -e ".[test]"
Expand All @@ -40,5 +50,47 @@ jobs:
env:
NUMBA_DISABLE_JIT: "1"
run: >
pytest tests/tfscreen
pytest -n auto tests/tfscreen
${{ (github.event_name == 'workflow_dispatch' && inputs.run_slow_tests) && '--runslow' || '' }}

coverage:
name: Coverage
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
# diff-cover compares against main, so it needs the full history.
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip

- name: Install package and test dependencies
run: pip install -e ".[test]"

# Slow tests are included so code tested only by them counts as covered.
# pytest-cov combines the workers' data; settings come from pyproject.toml
# (branch coverage, source = tfscreen only, so planning/, tests/ and
# docs/ are never measured).
- name: Run unit tests under coverage
env:
NUMBA_DISABLE_JIT: "1"
run: pytest -n auto --runslow --cov --cov-report= tests/tfscreen

- name: Report total coverage
run: |
coverage xml
coverage report --fail-under=90

# Every line and branch a pull request adds or changes in src/ must be
# covered. Files outside coverage.xml are not judged.
- name: Check coverage of changed lines
if: github.event_name == 'pull_request'
run: >
diff-cover coverage.xml
--compare-branch=origin/${{ github.base_ref }}
--fail-under=100
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,45 @@ cython_debug/
marimo/_static/
marimo/_lsp/
__marimo__/

# Local test/lint/coverage output from run_all_tests.sh
reports/
docs/badges/

# Lab data for development; never committed (C10)
planning/dev-data/
planning/results/
# Run outputs downloaded into study directories (lab-data fits, multi-GB
# simulations); the study's scripts and README stay tracked
planning/studies/recipe/
planning/studies/full-size-sim/sim_*/
planning/studies/full-size-sim/pilot_*/
planning/studies/full-size-sim-*/
planning/studies/m-bias-factorial/m_bias/
planning/studies/m-bias-factorial/m_subsets/
planning/studies/m-bias-factorial/m_subsets_real/
planning/studies/m-bias-factorial/m_subsets_poisson/
planning/studies/m-bias-factorial/held_s2/
planning/studies/m-bias-factorial/held_kanR_*/
planning/studies/m-bias-factorial/held_all_*/
planning/studies/m-bias-factorial/held_mix_*/
planning/studies/m-bias-factorial/kanR_only_*/
planning/studies/m-bias-factorial/jk_seed*/
planning/studies/m-bias-factorial/km_draws/
planning/studies/m-bias-factorial/sim_realistic_seed2/
planning/studies/m-bias-factorial/sim_realistic_s2/
planning/studies/m-bias-factorial/real_depth/
planning/studies/m-bias-factorial/sim_realistic_nocong/
planning/studies/two-stage-validation/run_*/
planning/studies/m-bias-factorial/stage2_*/

.DS_Store

planning/studies/x-vs-binding/out/
planning/studies/within-tube-m/out/
planning/studies/within-tube-m/runs/
planning/studies/relative-m/runs/
planning/studies/joint-fit-sim/runs/
planning/studies/joint-fit-sim/out/
planning/studies/joint-fit-real/runs/
planning/studies/joint-fit-real/out/
Loading
Loading