antibody-predictor / pyproject.toml
VibecoderMcSwaggins's picture
Initial deployment: Antibody non-specificity predictor
6491864
raw
history blame
5.91 kB
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/antibody_training_esm"]
include = [
"src/antibody_training_esm/conf/**/*.yaml",
"src/antibody_training_esm/conf/**/*.py",
]
[tool.hatch.build.targets.sdist]
# Source distribution must include all source files + configs
include = [
"src/antibody_training_esm/**/*.py",
"src/antibody_training_esm/conf/**/*.yaml",
"tests/**/*.py",
"README.md",
"pyproject.toml",
"LICENSE",
]
[project]
name = "antibody-training-esm"
version = "0.7.0"
description = "Professional antibody training pipeline using ESM protein language models"
license = {text = "Apache-2.0"}
requires-python = ">=3.12"
dependencies = [
"authlib>=1.6.5",
"biopython>=1.80",
"brotli>=1.2.0",
"datasets>=4.2.0",
"h2>=4.3.0",
"hydra-core>=1.3.2",
"jupyterlab>=4.4.9",
"matplotlib>=3.7.0",
"more-itertools",
"numpy>=1.24.0",
"pandas>=2.0.0",
"plotly",
"pyparsing>=3.0.0",
"PyYAML>=6.0.0",
"riot_na",
"scikit-learn>=1.3.0",
"scipy>=1.10.0",
"seaborn>=0.12.0",
"torch>=2.6.0",
"tqdm>=4.65.0",
"transformers>=4.30.0",
"xgboost>=2.0.0",
"gradio>=4.0.0",
]
[project.optional-dependencies]
validation = [
"pydantic>=2.10.0", # Stable v2 release
"pydantic-settings>=2.6.0", # For future config management
"pandera>=0.20.0", # Phase 3: Data Integrity
]
dev = [
# Testing
"pytest>=8.3.0",
"pytest-cov>=6.0.0",
"pytest-xdist>=3.6.0",
"pytest-sugar>=1.0.0",
# Linting & Formatting
"ruff>=0.8.0",
# Type Checking
"mypy>=1.13.0",
"pandas-stubs>=2.2.0",
# Security
"bandit[toml]>=1.7.0",
# Pre-commit
"pre-commit>=4.0.0",
# Documentation
"mkdocs>=1.6.0",
"mkdocs-material>=9.5.0",
"mkdocstrings[python]>=0.26.0",
"mkdocs-gen-files>=0.5.0",
"mkdocs-literate-nav>=0.6.0",
"mkdocs-section-index>=0.3.0",
"pymdown-extensions>=10.0.0",
]
[project.scripts]
# Point directly to Hydra-decorated function to enable config group overrides
# (antibody-train model=esm2_650m classifier=xgboost now works correctly)
antibody-train = "antibody_training_esm.core.trainer:main"
antibody-test = "antibody_training_esm.cli.test:main"
antibody-preprocess = "antibody_training_esm.cli.preprocess:main"
antibody-predict = "antibody_training_esm.cli.predict:main"
antibody-app = "antibody_training_esm.cli.app:main"
[tool.ruff]
target-version = "py312"
line-length = 88
[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
]
ignore = [
"E501", # line too long (handled by formatter)
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/**/*" = ["ARG"]
"experiments/**/*" = ["ALL"]
"reference_repos/**/*" = ["ALL"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
ignore_missing_imports = true
exclude = [
"experiments/",
"reference_repos/",
"site/", # MkDocs generated documentation
"tests/unit/cli/test_train.py", # Legacy CLI tests (deprecated)
]
[tool.pytest.ini_options]
# Pytest Configuration (canonical source - pytest.ini deleted for single source of truth)
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
# Output formatting
"-v",
"--tb=short",
"--strict-markers",
"-ra",
# Coverage reporting
"--cov=src/antibody_training_esm",
"--cov-report=html",
"--cov-report=term-missing",
# Performance
"--maxfail=10",
]
markers = [
"unit: Unit tests (fast, no I/O) - Core business logic",
"integration: Integration tests (medium speed, some I/O) - Component interactions",
"e2e: End-to-end tests (slow, full pipeline) - Full workflows",
"slow: Tests that take >1s to run",
"gpu: Tests that require GPU (skip in CI with: -m 'not gpu')",
"legacy: Legacy tests for backward compatibility (deprecated, will be removed)",
]
filterwarnings = [
# sklearn deprecation warnings
"ignore:.*__sklearn_tags__.*:DeprecationWarning:sklearn.utils._tags",
# sklearn convergence warnings (expected with small test datasets)
"ignore:.*lbfgs failed to converge.*:sklearn.exceptions.ConvergenceWarning",
"ignore:.*lbfgs failed to converge.*:UserWarning:sklearn.linear_model._logistic",
# sklearn scoring warnings (expected when testing edge cases)
"ignore:.*Scoring failed.*:UserWarning:sklearn.model_selection._validation",
# sklearn undefined metric warnings (expected with edge case test data)
"ignore:.*Precision is ill-defined.*:sklearn.exceptions.UndefinedMetricWarning",
"ignore:.*Precision is ill-defined.*:UserWarning:sklearn.metrics._classification",
# pytest collection warnings (TestConfig is a dataclass, not a test class)
"ignore:.*cannot collect test class.*TestConfig.*:pytest.PytestCollectionWarning",
# General deprecation warnings
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]
[tool.coverage.run]
source = ["src"]
omit = [
"tests/*",
"experiments/*",
"reference_repos/*",
"**/__pycache__/*",
".venv/*",
"**/conftest.py",
]
branch = true
[tool.coverage.report]
precision = 2
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[dependency-groups]
dev = [
"openpyxl>=3.1.5",
"types-pyyaml>=6.0.12.20250915",
]