-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathpyproject.toml
More file actions
165 lines (150 loc) · 4.59 KB
/
pyproject.toml
File metadata and controls
165 lines (150 loc) · 4.59 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
157
158
159
160
161
162
163
164
165
[project]
name = "odyssey"
version = "0.1.0"
description = "A toolkit to develop clinical foundation models using electronic health records"
readme = "README.md"
authors = [{name = "Vector AI Engineering", email = "odyssey@vectorinstitute.ai"}]
license = "Apache-2.0"
repository = "https://github.com/VectorInstitute/odyssey"
documentation = "https://vectorinstitute.github.io/odyssey/"
requires-python = ">=3.12"
dependencies = [
"lightning>=2.0.0",
"scikit-learn>=1.2.2",
# torch is not pinned here — install the wheel matching your CUDA version:
# CPU: uv pip install torch
# CUDA 12.8: uv pip install torch --index-url https://download.pytorch.org/whl/cu128
# CUDA 12.4: uv pip install torch --index-url https://download.pytorch.org/whl/cu124
"torch>=2.0.0",
"tqdm>=4.60.0",
"wandb>=0.15.0",
"pandas>=2.2.1",
"sqlalchemy>=2.0.28",
"psycopg2-binary>=2.9.9",
"fhir-resources>=5.1.1",
"pyarrow>=15.0.1",
"plotly>=5.7.0",
"tokenizers>=0.15.2",
"transformers>=5.0.0",
"captum>=0.7.0",
"scikit-multilearn>=0.2.0",
"numpy>=1.26.4",
# polars is pinned by meds-transforms 0.6.1 (~=1.30.0); will lift when that updates
"polars>=1.30.0",
"meds>=0.4.0",
"meds-transforms>=0.6.1",
]
[project.optional-dependencies]
# mamba-ssm requires CUDA/nvcc; install on GPU hosts with --no-build-isolation:
# uv sync --extra cuda --no-build-isolation
# or: pip install mamba-ssm>=2.3.0 --no-build-isolation
cuda = [
"mamba-ssm>=2.3.0",
]
[dependency-groups]
dev = [
"pytest>=9.0.3",
"pre-commit>=4.0.0",
"pytest-cov>=3.0.0",
"codecov>=2.1.13",
"nbstripout>=0.6.1",
"mypy>=1.7.0",
"ruff>=0.3.0",
"nbqa[toolchain]>=1.7.0",
]
docs = [
"mkdocs>=1.5.0",
"mkdocs-material>=9.0.0",
"mkdocstrings[python]>=0.24.0",
]
# Default dependency groups to be installed
[tool.uv]
default-groups = ["dev"]
[tool.mypy]
plugins = ["numpy.typing.mypy_plugin"]
ignore_missing_imports = true
install_types = true
pretty = true
namespace_packages = true
explicit_package_bases = true
non_interactive = true
warn_unused_configs = true
allow_any_generics = false
allow_subclassing_any = false
allow_untyped_calls = false
allow_untyped_defs = false
allow_incomplete_defs = false
check_untyped_defs = true
allow_untyped_decorators = false
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
implicit_reexport = false
strict_equality = true
extra_checks = true
[tool.ruff]
include = ["*.py", "pyproject.toml", "*.ipynb"]
exclude = []
line-length = 88
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"COM", # flake8-commas
"C4", # flake8-comprehensions
"RET", # flake8-return
"SIM", # flake8-simplify
"ICN", # flake8-import-conventions
"Q", # flake8-quotes
"RSE", # flake8-raise
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"W", # pycodestyle
"N", # pep8-naming
"ERA", # eradicate
"PL", # pylint
]
fixable = ["A", "B", "COM", "C4", "RET", "SIM", "ICN", "Q", "RSE", "D", "E", "F", "I", "W", "N", "ERA", "PL"]
ignore = [
"B905", # `zip()` without an explicit `strict=` parameter
"E501", # line too long
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"PLR2004", # Replace magic number with named constant
"PLR0913", # Too many arguments
"COM812", # Missing trailing comma
"ERA001", # Found commented-out code (too many false positives with math comments)
"A001", # Ignore variable `input` is shadowing a Python builtin (common for torch)
"A002", # Ignore variable `input` is shadowing a Python builtin in function (common for torch)
"D301", # r-strings for docstrings with backslashes
]
# Ignore import violations in all `__init__.py` files.
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401", "F403", "F811"]
# Ignoring undocumented public functions, public init, magic method in tests folder
"tests/*" = ["D103", "D105", "D107"]
[tool.ruff.lint.pep8-naming]
ignore-names = ["X*", "setUp"]
[tool.ruff.lint.isort]
lines-after-imports = 2
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.pycodestyle]
max-doc-length = 88
[tool.pytest.ini_options]
markers = [
"integration_test: marks tests as integration tests",
]
[tool.coverage]
[tool.coverage.run]
source=["odyssey"]
omit=["tests/*", "*__init__.py"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"