caelum0x 174222bcaa feat: Builder-Track named-user tools, bio + evidence-intelligence platform, Apache-2.0
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).
2026-07-10 16:23:13 +03:00

85 lines
2.3 KiB
Python

import os
import shutil
from glob import glob
import pytest
from biocypher._deduplicate import Deduplicator
from biocypher._translate import Translator
# load all fixtures from the fixtures directory
pytest_plugins = [
fixture_file.replace(os.sep, ".").replace(".py", "")
for fixture_file in glob(f"test{os.sep}fixtures{os.sep}[!__]*.py", recursive=True)
]
# CLI option parser
def pytest_addoption(parser):
options = (
# neo4j
("database_name", "The Neo4j database to be used for tests."),
("user", "Tests access Neo4j as this user."),
("password", "Password to access Neo4j."),
("uri", "URI of the Neo4j server."),
("neo4j_enterprise", "Set to 'true' to force Enterprise Edition mode (skip Community Edition workarounds)."),
# postgresl
(
"database_name_postgresql",
"The PostgreSQL database to be used for tests. Defaults to " '"postgresql-biocypher-test-TG2C7GsdNw".',
),
("user_postgresql", "Tests access PostgreSQL as this user."),
("password_postgresql", "Password to access PostgreSQL."),
("host_postgresql", "Host of the PostgreSQL server."),
("port_postgresql", "Port of the PostgreSQL server."),
)
for name, help_ in options:
parser.addoption(
f"--{name}",
action="store",
default=None,
help=help_,
)
@pytest.fixture(scope="session")
def tmp_path_session(tmp_path_factory):
"""
Create a session-scoped temporary directory.
Args:
tmp_path_factory: The built-in pytest fixture.
Returns:
pathlib.Path: The path to the temporary directory.
"""
return tmp_path_factory.mktemp("data")
@pytest.fixture(scope="session", autouse=True)
def cleanup(request, tmp_path_session):
"""
Teardown function to delete the session-scoped temporary directory.
Args:
request: The pytest request object.
tmp_path_session: The session-scoped temporary directory.
"""
def remove_tmp_dir():
shutil.rmtree(tmp_path_session)
request.addfinalizer(remove_tmp_dir)
@pytest.fixture(scope="function")
def deduplicator():
return Deduplicator()
@pytest.fixture(scope="module")
def translator(hybrid_ontology):
return Translator(hybrid_ontology)