NeurIPS-Code / itrialspace /pyproject.toml
AnonymousUN's picture
Add full itrialspace framework, including code, slurm scripts, and configs
da53a66 verified
Raw History Blame Contribute Delete
4.05 kB
[build-system]
requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "itrialspace"
version = "0.1.0"
description = "iTrialSpace — Synthetic Imaging Clinical Trial Engine for lung CT AI evaluation"
readme = "README.md"
requires-python = ">=3.10"
# TODO: confirm license before public release (Apache-2.0 / MIT / BSD-3-Clause)
license = {text = "LicenseRef-TODO"}
authors = [{ name = "iTrialSpace contributors" }]
keywords = ["medical-imaging", "lung-ct", "synthetic-data", "clinical-trial", "VLM"]
classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Medical Science Apps.",
"Operating System :: POSIX :: Linux",
]
# Core dependencies — enough to build the nodule index, query, and plan trials.
dependencies = [
"pandas>=1.5",
"numpy>=1.23",
"pyyaml>=6.0",
]
[project.optional-dependencies]
# Mask insertion + NIfTI handling
imaging = ["nibabel>=5.0", "scipy>=1.10", "SimpleITK>=2.2"]
# Interactive exploration apps: NoduleMap (FastAPI + sigma.js) and Retriever (FastAPI + Streamlit)
apps = [
"fastapi>=0.104",
"uvicorn[standard]>=0.24",
"pydantic>=2.0",
"streamlit>=1.28",
"nibabel>=5.0",
"Pillow>=10.0",
"matplotlib>=3.5",
"requests>=2.28",
"scikit-learn>=1.2",
"umap-learn>=0.5",
"faiss-cpu>=1.7",
"pyarrow>=10.0",
]
# Backward-compatible alias for the previous name.
web = ["itrialspace[apps]"]
# CT synthesis (NodMAISI). Heavy; torch/monai install is platform-specific — see docs/installation.md.
synthesis = [
"monai>=1.3",
"nibabel>=5.0",
"scipy>=1.10",
"matplotlib>=3.5",
"scikit-image>=0.21",
"fire>=0.5",
"tqdm>=4.60",
"einops>=0.6",
]
# Vision-Language Model evaluation. Model backends pulled separately — see docs/installation.md.
vlm = [
"transformers>=4.40",
"accelerate>=0.26",
"open_clip_torch>=2.24",
"nibabel>=5.0",
"Pillow>=10.0",
"matplotlib>=3.5",
"seaborn>=0.12",
]
# Developer tooling
dev = [
"pytest>=7.0",
"ruff>=0.4",
"black>=24.0",
"pre-commit>=3.5",
]
all = [
"itrialspace[imaging,apps,vlm,dev]",
]
[project.scripts]
its = "itrialspace.cli:main"
its-insert = "itrialspace.mask_inserter.cli:main"
its-trials = "itrialspace.trials.run_trial:main"
its-nodulemap = "itrialspace.apps.nodulemap.cli.cli:main"
its-retriever = "itrialspace.apps.retriever.cli:main"
[tool.setuptools.packages.find]
where = ["src"]
include = ["itrialspace*"]
[tool.setuptools.package-data]
itrialspace = [
"config/*.yaml",
"site/config/*.yaml",
"apps/nodulemap/configs/*.yaml",
"apps/nodulemap/frontend/static/*",
"synthesis/configs/*.json",
]
[tool.ruff]
line-length = 100
target-version = "py310"
extend-exclude = ["docs", "infra"]
[tool.ruff.lint]
select = ["E", "F", "I", "W"]
ignore = [
"E501", # line length handled by black
"E402", # module-level import not at top (needed for src-path bootstrap / lazy config)
"E741", # ambiguous variable names (research code uses l/I occasionally)
"E711", # `== None` — kept where pandas/None semantics are intentional
"E712", # `== True/False` — idiomatic in pandas boolean masks here
"F841", # unused locals — common in research code; not a correctness risk
]
[tool.ruff.lint.per-file-ignores]
# __init__.py intentionally re-exports the public API.
"**/__init__.py" = ["F401"]
# Tests use fixtures/imports that linters misread as unused.
"tests/**" = ["F401", "F811", "E731"]
# Vendored MAISI inference code (run as scripts) — keep upstream style as-is.
"src/itrialspace/synthesis/scripts/**" = ["F401", "F403", "F405", "F841", "E711", "E712", "E721", "E722"]
[tool.black]
line-length = 100
target-version = ["py310", "py311"]
[tool.pytest.ini_options]
markers = [
"full_volume: tests that require real CT data (env-gated, skipped in CI)",
]
testpaths = ["tests"]