Skip to content

Commit 6c8fc77

Browse files
authored
Merge branch 'main' into dependabot/pip/python-minor-patch-f0f6cd8fa2
2 parents 9d0af12 + 26fd113 commit 6c8fc77

7 files changed

Lines changed: 20 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107

108108
- name: Run tests with coverage (OpenSSF Silver test_statement_coverage80)
109109
# Statement + branch coverage on the importable LIBRARY surface, gated at
110-
# fail_under=90 via .coveragerc.library (executable research/pipeline
110+
# fail_under=95 via .coveragerc.library (executable research/pipeline
111111
# scripts are validated by the integration/data gates below, not unit
112112
# coverage). The whole-repo regression floor lives in pyproject.toml for
113113
# local `pytest --cov` runs. PYTHONPATH + COVERAGE_PROCESS_START activate

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
path: dist/
110110

111111
- name: Publish to PyPI
112-
uses: pypa/gh-action-pypi-publish@release/v1
112+
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
113113

114114
- name: Set up Python for smoke test
115115
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ cython_debug/
209209
CLAUDE.md
210210
CLAUDE.local.md
211211
.claude/
212+
# Project-level MCP server config (developer tooling - personal token references
213+
# and local server paths vary per developer; not for public repo).
214+
.mcp.json
212215
# Personal settings overrides - already covered by `.claude/` above; listed
213216
# explicitly so the intent survives any future narrowing of that rule.
214217
.claude/settings.local.json

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1616
protected by required-reviewer approval before any upload proceeds.
1717
Deleted orphaned `environments/requirements-ci-twine.{in,txt}`.
1818
- **`pyproject.toml`**: removed personal email from author metadata; name retained.
19+
- **Library coverage gate raised** `90 -> 95` in `.coveragerc.library`. Verified
20+
library-scope coverage is **98.91% combined** (~99% statement / ~98% branch;
21+
measured 2026-06-22), comfortably clearing the new gate and the OpenSSF Gold
22+
targets. Synced the stale `fail_under` references in `docs/security_compliance.md`,
23+
`ROADMAP.md`, and the `ci.yml` step comment to the authoritative config value.
1924

2025
### Added
2126
- **HBV/HCV proteome ingestion path** (issue #78): `scripts/fetch_viral_proteomes.py`

ROADMAP.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ _Last updated: 2026-06._
2121
library surface - `src`/`functions` modules without a `__main__` CLI entry
2222
point. Measured via `.coveragerc.library` (omit list generated mechanically by
2323
`tools/check_library_coverage.py`, kept in sync by `--check`). Currently
24-
**≈96% statement / ≈94% branch** (combined ≈96%), gated at `fail_under=90`.
24+
**~99% statement / ~98% branch** (combined 98.91%), gated at `fail_under=95`.
2525
This clears the OpenSSF **Gold** targets (≥90% statement, ≥80% branch).
2626
- **Whole-repo floor**: `pyproject.toml`'s `fail_under` blocks regressions across
27-
the entire tree (research/CLI scripts included), currently ≈36% statement.
27+
the entire tree (research/CLI scripts included), gated at `fail_under=35`,
28+
currently ≈45% statement.
2829
Executable scripts (those with `__main__`) are validated by the integration
2930
tests and CI data/benchmark gates rather than unit statement coverage.
3031

docs/security_compliance.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@ This document tracks SESTRAV's posture against the [OpenSSF Best Practices Badge
2525
measured on two scopes, both gated in CI:
2626
- *Library scope* - the importable library surface (`src`/`functions` modules
2727
with no `__main__` CLI entry point), measured via `.coveragerc.library` and
28-
gated at `fail_under=80`. Currently ≈83% statement / ≈81% branch-inclusive.
28+
gated at `fail_under=95`. Currently 98.91% combined (~99% statement /
29+
~98% branch; measured 2026-06-22), clearing the OpenSSF Gold targets
30+
(>=90% statement, >=80% branch).
2931
The omit list is generated mechanically from the presence of a `__main__`
3032
guard (`tools/check_library_coverage.py --check` enforces it stays in sync),
3133
so the scope is objective rather than hand-picked.
3234
- *Whole-repo floor* - a regression floor across the entire tree
33-
(`pyproject.toml`), currently ≈30% statement. Executable research/pipeline
35+
(`pyproject.toml`), gated at `fail_under=35`, currently ≈45% statement.
36+
Executable research/pipeline
3437
scripts (those with `__main__`) are validated by integration tests and the CI
3538
data/benchmark gates rather than by unit statement coverage.
3639
- **Strict Data Typing:** Pydantic is utilized via `SestravConfig` to enforce configuration schema, preventing runtime type coercion errors and hardcoded path injection.

src/train_gnn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def train_gnn(data_path, model_dir='models/gnn', epochs=15, batch_size=64, lr=1e
144144
# 2. Extract physicochemical features (with Cache resolution)
145145
# Include dataset fingerprint so switching datasets invalidates the cache.
146146
import hashlib as _hl
147-
_data_tag = _hl.md5(open(data_path, "rb").read(65536)).hexdigest()[:8] # nosec B324
147+
_data_tag = _hl.sha256(open(data_path, "rb").read(65536)).hexdigest()[:8]
148148
cache_name = f"physico_features_mode{feature_mode}_{_data_tag}.csv"
149149
X_feats = store.load_cached_features(cache_name)
150150
if X_feats is None:
@@ -400,7 +400,7 @@ def train_gnn_v2(data_path, model_dir='models/gnn', epochs=50, batch_size=64,
400400
# Extract feature matrix. Mode 31 adds 10 per-allele MHCflurry binding scores,
401401
# matching RF mode 31 feature parity. Mode 21 uses physico-only features.
402402
import hashlib as _hl
403-
_data_tag = _hl.md5(open(data_path, "rb").read(65536)).hexdigest()[:8] # nosec B324
403+
_data_tag = _hl.sha256(open(data_path, "rb").read(65536)).hexdigest()[:8]
404404
cache_name = f"physico_features_mode{feature_mode}_{_data_tag}.csv"
405405
X_feats = store.load_cached_features(cache_name)
406406
if X_feats is None:

0 commit comments

Comments
 (0)