You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pure refactor; zero behavior change. 65 pytest cases still pass; full
block build green (7/7).
Workflow (main.tpl.tengo):
- Extract `withSidecar(cmd, bundleKey, filename, cliFlag)` helper for
the optional enrichment sidecars. Two near-identical 7-line blocks
(cdrh3 lengths, per-residue confidence) collapse to two one-liner
calls returning the extended `cmd`. Filter stays inline since it
uses the single-column accessor.
- Extract `withOptArg(cmd, flag, value)` for the three optional CLI
string knobs (numbering scheme, chain-h, chain-l). Three 3-line
guarded `cmd.arg(...)` chains collapse to three one-liners.
- Replace the `pdbIndex := ""` accumulator loop with one-shot
`text.join(indexLines, "\n") + "\n"`.
- Drop dead `rowCount` increment (never read after the loop).
- Hoist `ll` import to module level (was lazy-imported inside
wf.body's panic branch only).
Python (metrics.py):
- Extract `_weight_fns(in_bridge)` factory. The same three weight
closures (hydrophobicity / pos_charge_abs / neg_charge_abs) were
defined inline in `_chain_metrics` (per-chain, VHH branch) AND
again in the TAP branch over the unified H+L `in_bridge`. Both
callsites now unpack a single helper call.
- Drop the local `h_scale` / `h_glycine` aliases, the helper reads
the module constants directly.
Python (main.py):
- Replace `isinstance(surface_metrics, dict)` with the simpler `sm =
surface_metrics` (compute_metrics always returns a dict; the
paranoia check is unwarranted).
- `hallmark` can be None (per its signature), so the mismatch check
is now `if hallmark and hallmark.get("mismatch")`.
Em-dash sweep:
- Drop em-dashes / en-dashes across all Python source
(cysteines.py, motifs.py, scoring.py, structure.py, metrics.py)
per the no-em-dashes feedback. ~30 occurrences total.
- `check_hallmark_tetrad` warning message switched the em-dash
sentinel `'—'` to `'?'` so missing residues show up readably.
0 commit comments