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).
86 lines
2.1 KiB
Python
86 lines
2.1 KiB
Python
import pytest
|
|
from pytest import mark
|
|
|
|
from asreview.datasets import BaseDataGroup
|
|
from asreview.datasets import BaseDataSet
|
|
from asreview.datasets import DatasetManager
|
|
from asreview.datasets import SynergyDataGroup
|
|
|
|
|
|
@mark.internet_required
|
|
def test_group():
|
|
group_synergy = SynergyDataGroup()
|
|
|
|
assert group_synergy.group_id is not None
|
|
|
|
assert len(group_synergy.datasets) == 26
|
|
|
|
|
|
@mark.internet_required
|
|
def test_group_to_dict():
|
|
group_synergy = SynergyDataGroup()
|
|
|
|
assert isinstance(group_synergy.__dict__(), dict)
|
|
|
|
|
|
@mark.internet_required
|
|
def test_group_list():
|
|
dm = DatasetManager()
|
|
|
|
synergy_group = dm.list(include="synergy", raise_on_error=True, serialize=False)[0]
|
|
|
|
assert len(synergy_group.datasets) == 26
|
|
|
|
|
|
def test_group_exclude_list():
|
|
dm = DatasetManager()
|
|
|
|
groups = dm.list(exclude="synergy", raise_on_error=True, serialize=False)
|
|
assert "synergy" not in [group.group_id for group in groups]
|
|
|
|
groups = dm.list(exclude=["synergy"], raise_on_error=True, serialize=False)
|
|
assert "synergy" not in [group.group_id for group in groups]
|
|
|
|
|
|
def test_template_group():
|
|
# START - use for building your plugin
|
|
my_dataset1 = BaseDataSet(
|
|
dataset_id="my_dataset1", filepath="http", title="My dataset"
|
|
)
|
|
|
|
my_dataset2 = BaseDataSet(
|
|
dataset_id="my_dataset2",
|
|
filepath="http",
|
|
title="My second dataset",
|
|
aliases=["J535"],
|
|
)
|
|
|
|
class TemplateDataGroup(BaseDataGroup):
|
|
group_id = "template"
|
|
description = "Template group"
|
|
|
|
def __init__(self):
|
|
super().__init__(my_dataset1, my_dataset2)
|
|
|
|
# END
|
|
|
|
my_group = TemplateDataGroup()
|
|
|
|
assert my_group.find("my_dataset1").title == "My dataset"
|
|
assert my_group.find("j535").title == "My second dataset" # see lowercase alias
|
|
|
|
|
|
@pytest.mark.xfail(raises=TypeError)
|
|
def test_template_group_abc():
|
|
my_dataset1 = BaseDataSet(
|
|
dataset_id="my_dataset2",
|
|
filepath="http",
|
|
title="My second dataset",
|
|
aliases=["J535"],
|
|
)
|
|
|
|
class TemplateDataGroup(BaseDataGroup):
|
|
description = "Template group"
|
|
|
|
TemplateDataGroup(my_dataset1)
|