-
Notifications
You must be signed in to change notification settings - Fork 15
/
pyproject.toml
131 lines (119 loc) · 2.9 KB
/
pyproject.toml
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
[project]
name = "hazardous"
description = "Predictive Competing Risks and Survival Analysis."
authors = [
{ name = "Olivier Grisel", email = "[email protected]" },
{ name = "Vincent Maladière", email = "[email protected]" }
]
readme = "README.md"
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"numpy",
"scikit-learn",
"tqdm",
# TODO: implement KM and make this a soft dependency for the
# doc and tests.
"lifelines",
# lifelines.KaplanMeierFitter imports lifelines.datasets which has an
# undeclared runtime dependency on setuptools.
"setuptools",
]
dynamic = ["version"]
[project.optional-dependencies]
dev = [
"pre-commit",
"nox",
]
test = [
"pytest",
"pytest-cov",
"pandas",
]
oldest_deps = [
"numpy==1.22",
"scikit-learn==1.1.3",
"pandas==1.5.1",
]
doc = [
"sphinx",
"pydata-sphinx-theme",
"sphinx-gallery",
"sphinx-design",
"sphinx-copybutton",
"matplotlib",
"pillow", # to scrape images from the examples
"numpydoc",
"pycox",
"torch",
]
[project.urls]
"Homepage" = "https://github.com/soda-inria/hazardous"
"Bug Tracker" = "https://github.com/soda-inria/hazardous/issues"
[build-system]
build-backend = "flit_core.buildapi"
requires = ["flit_core"]
[tool.black]
line-length = 88
target_version = ['py39', 'py310', 'py311']
preview = true
exclude = '''
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.mypy_cache
| \.vscode
| build
| dist
)/
'''
[tool.ruff]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
select = ["E", "F"]
ignore = []
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"doc",
]
per-file-ignores = {"examples/*" = ["E402"]}
# Same as Black.
line-length = 88
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
target-version = "py39"
[tool.ruff.mccabe]
max-complexity = 10
[tool.pytest.ini_options]
addopts = "--doctest-modules"
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS"
testpaths = [
"hazardous",
]