stroke-viewer-frontend / pyproject.toml
VibecoderMcSwaggins's picture
fix: resolve technical debt (P2/P3) with TDD validation (#9)
26f14be unverified
raw
history blame
3.82 kB
[project]
name = "stroke-deepisles-demo"
version = "0.1.0"
description = "Demo: HF datasets + DeepISLES stroke segmentation + Gradio visualization"
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.11"
authors = [
{ name = "stroke-deepisles-demo contributors" }
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Medical Science Apps.",
]
keywords = ["stroke", "neuroimaging", "segmentation", "BIDS", "NIfTI", "deep-learning"]
dependencies = [
# Core - pinned to Tobias's fork for BIDS + NIfTI lazy loading (commit c1c15aa)
"datasets @ git+https://github.com/CloseChoice/datasets.git@c1c15aaa4f00f28f1916f3a896283494162eac49",
"huggingface-hub>=0.25.0",
# NIfTI handling
"nibabel>=5.2.0",
"numpy>=1.26.0,<2.0.0",
# Configuration
"pydantic>=2.5.0",
"pydantic-settings>=2.1.0",
# UI (Gradio 6.x - Dec 2025 stable)
"gradio>=6.0.0,<7.0.0",
"matplotlib>=3.8.0",
# Networking
"requests>=2.0.0",
]
[project.scripts]
stroke-demo = "stroke_deepisles_demo.cli:main"
[dependency-groups]
dev = [
"pytest>=8.0.0",
"pytest-cov>=4.1.0",
"pytest-mock>=3.12.0",
"pytest-timeout>=2.3.0",
"mypy>=1.19.0",
"ruff>=0.14.0",
"pre-commit>=3.6.0",
# Type stubs
"types-requests",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["src/stroke_deepisles_demo"]
# ─────────────────────────────────────────────────────────────────
# Tool configurations
# ─────────────────────────────────────────────────────────────────
[tool.ruff]
target-version = "py312"
line-length = 100
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"PTH", # flake8-use-pathlib
"RUF", # ruff-specific
]
ignore = [
"E501", # line too long (handled by formatter)
]
[tool.ruff.lint.isort]
known-first-party = ["stroke_deepisles_demo"]
[tool.mypy]
python_version = "3.12"
strict = true
warn_return_any = true
warn_unused_ignores = true
disallow_untyped_defs = true
plugins = ["pydantic.mypy"]
[[tool.mypy.overrides]]
module = [
"nibabel.*",
"gradio.*",
"datasets.*",
"niivue.*",
"numpy.*",
"pytest.*",
# DeepISLES modules (only available in DeepISLES Docker image)
"src.isles22_ensemble",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
addopts = [
"-v",
"--tb=short",
"--strict-markers",
"-m", "not integration", # Skip integration tests by default
]
markers = [
"integration: marks tests requiring external resources (Docker, network)",
"slow: marks tests that take >10s to run",
]
filterwarnings = [
"ignore::DeprecationWarning",
]
[tool.coverage.run]
source = ["src/stroke_deepisles_demo"]
branch = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
]