Weekly literature reading list (Jev), tests for the Jev tools, maintenance tools documented
ci / test (3.13) (push) Successful in 4m22s
ci / test (3.12) (push) Successful in 4m31s

This commit is contained in:
kemal committed 2026-10-01 13:37:52 +01:00
1 parent 01e60ba817
commit f4bd9de93b
4 files changed
+208

No files matched your search

+26
View File
@@ -76,3 +76,29 @@ def test_known_findings_and_evidence(tmp_path: Path) -> None:
assert ev["first_rows"][1] == "1\tGT" and "log" not in ev # another step's log line must not leak in
ev2 = tri.evidence(tmp_path, "t", {"verdict": "ERROR", "error": "exit 137"})
assert ev2["log"] == ["pi_run: MemAvailable 500 MiB < 800 MiB -- stopping the job"]
issue = _load("issue_triage")
lit = _load("literature_watch")
def test_issue_missing_info_and_comment() -> None:
body = "### SimurgArray version\n\n_No response_\n\n### Command\n\n```shell\nsimurg genotype\n```\n"
assert issue.missing_info(body, "bug") == ["the SimurgArray version"]
assert issue.missing_info(body.replace("_No response_", "2.0.0"), "bug") == []
assert issue.missing_info("no template at all", "feature") == []
d = {"kind": "security", "labels": ["kind/security"], "privacy": ["credentials"], "clinical": True,
"missing": []} # fmt: skip
text = issue.comment_text(d)
assert "[email protected]" in text and "credentials" in text and "research tool" in text
def test_literature_prefilter() -> None:
p = lit.Paper
papers = [
p("bioRxiv", "Fast genotype calling for Infinium arrays", "We call genotypes from IDAT files.", "u1", "d"),
p("PubMed", "Fast genotype calling for Infinium arrays!", "Duplicate title.", "u2", "d"),
p("bioRxiv", "Protein folding at scale", "Nothing about arrays here.", "u3", "d"),
p("bioRxiv", "No abstract", "", "u4", "d"),
]
assert [x.url for x in lit.prefilter(papers)] == ["u1"]