-
Notifications
You must be signed in to change notification settings - Fork 714
/
pyproject.toml
167 lines (154 loc) · 4.92 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
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
166
167
[project]
name = "econml"
requires-python = ">=3.8"
authors = [{ name = "PyWhy contributors" }]
description = "This package contains several methods for calculating Conditional Average Treatment Effects"
readme = "README.md"
keywords = ["treatment-effect"]
license = { text = "MIT" }
dynamic = ["version"]
classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux"
]
dependencies = [
"numpy<2",
"scipy > 1.4.0",
"scikit-learn >= 1.0, < 1.6",
"sparse",
"joblib >= 0.13.0",
"statsmodels >= 0.10",
"pandas > 1.0",
"shap >= 0.38.1, < 0.44.0",
"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://econml.azurewebsites.net/"
[project.optional-dependencies]
automl = [
# Disabled due to incompatibility with scikit-learn
# azureml-sdk[explain,automl] == 1.0.83
"azure-cli"
]
tf = [
# This extra is not currently compatible with python 3.9 or above because of tensorflow breaking changes
"keras < 2.4; python_version < '3.9'",
"tensorflow > 1.10, < 2.3; python_version < '3.9'",
# Version capped due to tensorflow incompatibility
"protobuf < 4; python_version < '3.9'",
# Version capped due to tensorflow incompatibility
"numpy < 1.24; python_version < '3.9'"
]
plt = [
"graphviz",
"matplotlib"
]
dowhy = [
# when updating this, also update the version check in dowhy.py
"dowhy < 0.12; python_version > '3.8'",
# Version capped due to scipy incompatibility - can't import dowhy 0.11.1 with scipy 1.4.1
"dowhy < 0.11; python_version <= '3.8'"
]
ray = [
"ray > 2.2.0"
]
all = [
# Disabled due to incompatibility with scikit-learn
# azureml-sdk[explain,automl] == 1.0.83
"azure-cli",
# This extra is not currently compatible with python 3.9 or above because of tensorflow breaking changes
"keras < 2.4; python_version < '3.9'",
"tensorflow > 1.10, < 2.3; python_version < '3.9'",
# Version capped due to tensorflow incompatibility
"protobuf < 4; python_version < '3.9'",
# Version capped due to tensorflow incompatibility
"numpy < 1.24; python_version < '3.9'",
"graphviz",
"matplotlib",
"dowhy < 0.12; python_version > '3.8'",
# Version capped due to scipy incompatibility - can't import dowhy 0.11.1 with scipy 1.4.1
"dowhy < 0.11; python_version <= '3.8'",
"ray > 2.2.0"
]
[build-system]
requires = [
"setuptools",
"wheel",
"oldest-supported-numpy",
"scipy",
"cython<3" # Our native code has several incompatibilities with Cython 3
]
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"