-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
156 lines (140 loc) · 3.76 KB
/
pyproject.toml
File metadata and controls
156 lines (140 loc) · 3.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
[build-system]
requires = ["setuptools>=61.0", "wheel", "tomli>=1.0.0;python_version<'3.11'"]
build-backend = "setuptools.build_meta"
[project]
name = "timeflies"
version = "1.0.0"
description = "Machine Learning for Aging Analysis in Drosophila Single-Cell Data with Deep Learning and Batch Correction"
authors = [{name = "Singh Lab"}]
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
# TensorFlow with platform-specific GPU support
"tensorflow[and-cuda]>=2.13.0; platform_machine != 'arm64' and sys_platform != 'win32'",
"tensorflow>=2.13.0; platform_machine == 'arm64' or sys_platform == 'win32'",
"scikit-learn>=1.3.0",
"pandas>=2.0.0",
"numpy>=1.24.0",
"scanpy>=1.9.0",
"anndata>=0.9.0",
"matplotlib>=3.7.0",
"seaborn>=0.12.0",
"shap>=0.42.0",
"pyyaml>=6.0",
"dill>=0.3.0",
"xgboost>=1.7.0",
"optuna>=3.0.0",
"gradio>=4.0.0",
]
[project.optional-dependencies]
# GPU support (platform-specific)
gpu = [
"tensorflow[and-cuda]>=2.13.0; sys_platform != 'win32'",
"tensorflow>=2.13.0; sys_platform == 'win32'",
]
# CPU-only fallback for systems without CUDA
cpu = [
"tensorflow-cpu>=2.13.0",
]
dev = [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"pytest-mock>=3.8.0",
"pytest-xdist>=3.0.0", # Parallel test execution
"pytest-benchmark>=5.0.0", # Performance benchmarking
"psutil>=5.9.0", # System monitoring for memory tests
"joblib>=1.3.0", # For model persistence tests
"ruff>=0.1.0", # Fast linter and formatter (replaces black, isort, flake8)
"mypy>=1.5.0", # Type checking
"types-PyYAML", # Type stubs for PyYAML
"pre-commit>=3.0.0", # Git hooks
]
batch-correction = [
"scvi-tools>=1.0.0",
"torch>=2.0.0",
]
[project.scripts]
timeflies = "common.timeflies_cli:main"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-dir]
"" = "src"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--disable-warnings",
"-ra",
]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"functional: Functional tests",
"system: System tests",
"performance: Performance benchmark tests",
"slow: Slow tests",
]
[tool.coverage.run]
source = ["src"]
data_file = "coverage/.coverage"
omit = [
"*/tests/*",
"*/legacy/*",
"*/__pycache__/*",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
]
[tool.coverage.html]
directory = "coverage/html"
[tool.coverage.xml]
output = "coverage/coverage.xml"
[tool.ruff]
line-length = 88
target-version = "py312"
exclude = [
".venv",
"__pycache__",
"legacy",
"build",
"dist",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
]
ignore = [
"E501", # line too long (handled by ruff formatter)
"F401", # imported but unused (common in __init__.py)
"N803", # argument name should be lowercase (ML convention: X, y)
"N806", # variable in function should be lowercase (ML convention: X_train, X_test, adata.X)
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.mypy]
python_version = "3.12"
warn_return_any = false # Disable Any warnings for now
warn_unused_configs = true
disallow_untyped_defs = false # Gradually enable
ignore_missing_imports = true
no_implicit_optional = false # Allow None defaults without Optional[]
exclude = [
"legacy/",
"tests/",
".venv/",
]