Builds PaperTrail from the base skeleton into a full evidence-verification platform for the "Built with Claude: Life Sciences" hackathon (Builder Track). New named-user features (Build Beyond the Bench): - Lab Notebook Companion — rough bench notes -> structured, searchable, grounded experiment records (lib/labNotebook, /console/lab-notebook, migration 0059) - Clinical Trial Matcher — de-identified patient notes -> ranked eligible ClinicalTrials.gov trials with per-criterion inclusion/exclusion reasoning (lib/trialMatcher, /console/trial-matcher, migrations 0060) Platform: - Deterministic verification moat (biostats recompute, exact-span grounding) - 11 biomedical evidence engines (FAERS, GWAS, Open Targets, ChEMBL, ClinVar, PharmGKB, PubTator, DDI, repurposing, biomarker, unified verifier) - Evidence Intelligence (KG, dossier, provenance/export, RWE) + enterprise governance (RBAC, /api/v1 gateway, metering, audit chain, retention) - 17 OSS projects assimilated into native TypeScript on our stack (backend/engines retained + credited in NOTICE) - Multi-format upload (PDF/DOCX/XLSX/CSV/MD/TXT), logo, marketing site - Next.js 16 upgrade, benchmark harness (honest smoke-test caveat) Licensing: Apache-2.0 (LICENSE + NOTICE).
37 lines
1022 B
Python
37 lines
1022 B
Python
import os
|
|
|
|
import pytest
|
|
|
|
from biocypher.output.write.relational._sqlite import _SQLiteBatchWriter
|
|
|
|
|
|
@pytest.fixture(scope="function")
|
|
def bw_tab_sqlite(translator, deduplicator, tmp_path_session):
|
|
bw_tab = _SQLiteBatchWriter(
|
|
db_name="test_sqlite.db",
|
|
translator=translator,
|
|
deduplicator=deduplicator,
|
|
output_directory=tmp_path_session,
|
|
delimiter="\\t",
|
|
)
|
|
|
|
yield bw_tab
|
|
|
|
# teardown
|
|
for f in os.listdir(tmp_path_session):
|
|
remove_file(os.path.join(tmp_path_session, f))
|
|
remove_file("test_sqlite.db")
|
|
|
|
|
|
def remove_file(file_path: str):
|
|
try:
|
|
os.remove(file_path)
|
|
except PermissionError:
|
|
# fix Windows error that once opened files can only be removed after a restart
|
|
# https://groups.google.com/g/python-sqlite/c/2KBI2cR-t70
|
|
os.rename(file_path, f"renamed_{file_path}")
|
|
os.remove(f"renamed_{file_path}")
|
|
except FileNotFoundError:
|
|
# at the moment on windows the file is not created
|
|
pass
|