-
Notifications
You must be signed in to change notification settings - Fork 807
Expand file tree
/
Copy pathpyproject.toml
More file actions
152 lines (139 loc) · 4.06 KB
/
pyproject.toml
File metadata and controls
152 lines (139 loc) · 4.06 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
[project]
name = "econml"
requires-python = ">=3.9"
authors = [{ name = "PyWhy contributors" }]
description = "This package contains several methods for calculating Conditional Average Treatment Effects"
readme = "README.md"
keywords = ["treatment-effect"]
license = "MIT"
dynamic = ["version"]
classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux"
]
dependencies = [
"numpy",
# numba is only a transitive dependency, so ideally we wouldn't need to specify it here,
# but to avoid issues with very old incompatible versions being installed with numpy 2.4.x
# we need to constrain it here (at least until package metadata directly supports constraints
# in addition to dependencies)
"numba > 0.53.1",
"scipy > 1.4.0",
"scikit-learn >= 1.0, < 1.9",
"sparse",
"joblib >= 0.13.0",
"statsmodels >= 0.10",
"pandas > 1.0",
"shap >= 0.38.1",
"lightgbm",
"packaging"
]
[project.urls]
"Homepage" = "https://github.com/py-why/EconML"
"Bug Tracker" = "https://github.com/py-why/EconML/Issues"
"Source Code" = "https://github.com/py-why/EconML"
"Documentation" = "https://www.pywhy.org/EconML/"
[project.optional-dependencies]
automl = [
# Disabled due to incompatibility with scikit-learn
# azureml-sdk[explain,automl] == 1.0.83
"azure-cli"
]
plt = [
"graphviz",
"matplotlib"
]
dowhy = [
# when updating this, also update the version check in dowhy.py
"dowhy >= 0.13, < 0.15"
]
ray = [
"ray > 2.2.0"
]
all = [
# Disabled due to incompatibility with scikit-learn
# azureml-sdk[explain,automl] == 1.0.83
"azure-cli",
"graphviz",
"matplotlib",
"dowhy >= 0.13, < 0.15",
"ray > 2.2.0"
]
[build-system]
requires = [
"setuptools",
"wheel",
"numpy >=2, <3",
"scipy",
"cython"
]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
include = ["econml", "econml.*"]
exclude = ["econml.tests"]
[tool.setuptools.package-data]
# include all CSV files as data
"*" = ["*.csv", "*.jbl"]
[tool.pytest.ini_options]
testpaths = ["econml/tests"]
addopts = "--junitxml=junit/test-results.xml -n auto --strict-markers --cov-config=pyproject.toml --cov --import-mode=importlib"
markers = [
"slow",
"notebook",
"automl",
"dml",
"serial",
"cate_api",
"treatment_featurization",
"ray"
]
[tool.coverage.run]
branch = true
# need to explicitly add support for multiprocessing for OrthoForest
concurrency = [
"thread",
"multiprocessing"
]
source = ["econml"]
omit = ["econml/tests/*"]
relative_files = true
[tool.coverage.report]
exclude_lines = [
"raise NotImplementedError\\(\"(Abstract method|Defer to inference)\"\\)"
]
[tool.ruff]
line-length = 120
extend-include = ["*.ipynb"]
extend-exclude = ["prototypes", "monte_carlo_tests"]
[tool.ruff.format]
docstring-code-format = true
quote-style = "preserve"
[tool.ruff.lint]
ignore = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D301", # Use r""" if any backslashes in a docstring,
"SIM108", # Use ternary instead of if-else (looks ugly for some of our long expressions)
"SIM300", # Yoda condition detected (these are often easier to understand in array expressions)
]
select = [
"D", # Docstring
"W", # Pycodestyle warnings
"E", # All Pycodestyle erros, not just the default ones
"F", # All pyflakes rules
"SIM", # Simplifification
]
extend-per-file-ignores = { "econml/tests" = ["D"] } # ignore docstring rules for tests
[tool.ruff.lint.pydocstyle]
convention = "numpy"