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

78 lines
2.2 KiB
Python

"""Data for tests."""
import numpy as np
import pytest
from pymare import Dataset
@pytest.fixture(scope="package")
def variables():
"""Build basic numpy variables."""
y = np.array([[-1, 0.5, 0.5, 0.5, 1, 1, 2, 10]]).T
v = np.array([[1, 1, 2.4, 0.5, 1, 1, 1.2, 1.5]]).T
X = np.array([1, 1, 2, 2, 4, 4, 2.8, 2.8])
return (y, v, X)
@pytest.fixture(scope="package")
def small_variance_variables(variables):
"""Make highly correlated variables."""
y, v, X = variables
y = X.copy()
v /= 10
return (y, v, X)
@pytest.fixture(scope="package")
def dataset(variables):
"""Build a Dataset compiled from the variables fixture."""
return Dataset(*variables, X_names=["my_covariate"])
@pytest.fixture(scope="package")
def small_variance_dataset(small_variance_variables):
"""Build a Dataset compiled from the small variance variables fixture."""
return Dataset(*small_variance_variables, X_names=["my_covariate"])
@pytest.fixture(scope="package")
def small_dataset_2d(variables):
"""Build a small Dataset with 2D data."""
y = np.array([[1.5, 1.9, 2.2], [4, 2, 1]]).T
v = np.array([[1, 0.8, 3], [1, 1.5, 1]]).T
return Dataset(y, v)
@pytest.fixture(scope="package")
def dataset_2d(variables):
"""Build a larger Dataset with 2D data."""
y, v, X = variables
y = np.repeat(y, 3, axis=1)
y[:, 1] = np.random.randint(-10, 10, size=len(y))
v = np.repeat(v, 3, axis=1)
v[:, 1] = np.random.randint(2, 10, size=len(v))
return Dataset(y, v, X)
@pytest.fixture(scope="package")
def dataset_n():
"""Build a Dataset with sample sizes, but no variances."""
y = np.array([[-3.0, -0.5, 0.0, -5.01, 0.35, -2.0, -6.0, -4.0, -4.3, -0.1, -1.0]]).T
n = (
np.array(
[[16, 16, 20.548, 32.597, 14.0, 11.118, 4.444, 12.414, 26.963, 130.556, 126.76]]
).T
/ 2
)
return Dataset(y, n=n)
@pytest.fixture(scope="package")
def vars_with_intercept():
"""Build basic numpy variables with intercepts included in the design matrix."""
y = np.array([[-1, 0.5, 0.5, 0.5, 1, 1, 2, 10]]).T
v = np.array([[1, 1, 2.4, 0.5, 1, 1, 1.2, 1.5]]).T
X = np.array([np.ones(8), [1, 1, 2, 2, 4, 4, 2.8, 2.8]]).T
return (y, v, X)