2023-07-18 07:41:06 +03:00
|
|
|
[project]
|
|
|
|
name = "econml"
|
2023-10-31 22:36:07 +03:00
|
|
|
requires-python = ">=3.8"
|
2023-07-18 07:41:06 +03:00
|
|
|
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",
|
2023-10-31 22:36:07 +03:00
|
|
|
"Programming Language :: Python :: 3.11",
|
|
|
|
"Programming Language :: Python :: 3.12",
|
2023-07-18 07:41:06 +03:00
|
|
|
"License :: OSI Approved :: MIT License",
|
|
|
|
"Operating System :: MacOS",
|
|
|
|
"Operating System :: Microsoft :: Windows",
|
|
|
|
"Operating System :: POSIX :: Linux"
|
|
|
|
]
|
|
|
|
dependencies = [
|
2024-06-28 19:13:51 +03:00
|
|
|
"numpy<2",
|
2023-07-18 07:41:06 +03:00
|
|
|
"scipy > 1.4.0",
|
2024-06-27 20:29:55 +03:00
|
|
|
"scikit-learn >= 1.0, < 1.6",
|
2023-07-18 07:41:06 +03:00
|
|
|
"sparse",
|
2023-10-31 22:36:07 +03:00
|
|
|
"joblib >= 0.13.0",
|
2023-07-18 07:41:06 +03:00
|
|
|
"statsmodels >= 0.10",
|
2023-10-10 17:14:43 +03:00
|
|
|
"pandas > 1.0",
|
2023-10-31 22:36:28 +03:00
|
|
|
"shap >= 0.38.1, < 0.44.0",
|
2024-03-06 02:32:34 +03:00
|
|
|
"lightgbm",
|
|
|
|
"packaging"
|
2023-07-18 07:41:06 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
[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
|
2024-03-06 22:52:27 +03:00
|
|
|
"protobuf < 4; python_version < '3.9'",
|
2023-07-18 07:41:06 +03:00
|
|
|
# Version capped due to tensorflow incompatibility
|
2024-03-06 22:52:27 +03:00
|
|
|
"numpy < 1.24; python_version < '3.9'"
|
2023-07-18 07:41:06 +03:00
|
|
|
]
|
|
|
|
plt = [
|
|
|
|
"graphviz",
|
2023-10-10 17:14:43 +03:00
|
|
|
"matplotlib"
|
2023-07-18 07:41:06 +03:00
|
|
|
]
|
|
|
|
dowhy = [
|
2024-03-06 21:37:39 +03:00
|
|
|
# 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'"
|
2023-07-18 07:41:06 +03:00
|
|
|
]
|
2023-10-28 01:17:14 +03:00
|
|
|
ray = [
|
|
|
|
"ray > 2.2.0"
|
|
|
|
]
|
2023-07-18 07:41:06 +03:00
|
|
|
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
|
2024-03-06 22:52:27 +03:00
|
|
|
"protobuf < 4; python_version < '3.9'",
|
2023-07-18 07:41:06 +03:00
|
|
|
# Version capped due to tensorflow incompatibility
|
2024-03-06 22:52:27 +03:00
|
|
|
"numpy < 1.24; python_version < '3.9'",
|
2023-07-18 07:41:06 +03:00
|
|
|
"graphviz",
|
2024-03-06 21:37:39 +03:00
|
|
|
"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'",
|
2023-10-28 01:17:14 +03:00
|
|
|
"ray > 2.2.0"
|
2023-07-18 07:41:06 +03:00
|
|
|
]
|
|
|
|
|
2021-01-09 06:29:56 +03:00
|
|
|
[build-system]
|
|
|
|
requires = [
|
|
|
|
"setuptools",
|
|
|
|
"wheel",
|
2021-02-17 09:16:11 +03:00
|
|
|
"oldest-supported-numpy",
|
|
|
|
"scipy",
|
2023-07-18 18:55:52 +03:00
|
|
|
"cython<3" # Our native code has several incompatibilities with Cython 3
|
2021-01-09 06:29:56 +03:00
|
|
|
]
|
|
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
|
2024-03-09 22:04:17 +03:00
|
|
|
[tool.setuptools.packages.find]
|
|
|
|
include = ["econml", "econml.*"]
|
|
|
|
exclude = ["econml.tests"]
|
|
|
|
|
|
|
|
[tool.setuptools.package-data]
|
|
|
|
# include all CSV files as data
|
|
|
|
"*" = ["*.csv", "*.jbl"]
|
|
|
|
|
2021-01-09 06:29:56 +03:00
|
|
|
[tool.pytest.ini_options]
|
2024-03-07 00:14:58 +03:00
|
|
|
testpaths = ["econml/tests"]
|
2024-03-09 22:04:17 +03:00
|
|
|
addopts = "--junitxml=junit/test-results.xml -n auto --strict-markers --cov-config=pyproject.toml --cov --import-mode=importlib"
|
2021-01-09 06:29:56 +03:00
|
|
|
markers = [
|
|
|
|
"slow",
|
|
|
|
"notebook",
|
2021-02-20 15:43:37 +03:00
|
|
|
"automl",
|
2021-08-06 00:14:15 +03:00
|
|
|
"dml",
|
2022-04-06 17:05:21 +03:00
|
|
|
"serial",
|
2022-10-28 20:15:25 +03:00
|
|
|
"cate_api",
|
2023-10-28 01:17:14 +03:00
|
|
|
"treatment_featurization",
|
|
|
|
"ray"
|
2024-03-07 00:14:58 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
[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)\"\\)"
|
|
|
|
]
|
2024-07-17 23:56:00 +03:00
|
|
|
|
|
|
|
[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
|
2024-08-10 20:04:18 +03:00
|
|
|
"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 = [
|
2024-07-17 23:56:00 +03:00
|
|
|
"D", # Docstring
|
2024-07-19 23:07:12 +03:00
|
|
|
"W", # Pycodestyle warnings
|
2024-08-10 20:04:18 +03:00
|
|
|
"E", # All Pycodestyle erros, not just the default ones
|
|
|
|
"F", # All pyflakes rules
|
|
|
|
"SIM", # Simplifification
|
2024-07-17 23:56:00 +03:00
|
|
|
]
|
2024-07-19 19:46:53 +03:00
|
|
|
extend-per-file-ignores = { "econml/tests" = ["D"] } # ignore docstring rules for tests
|
2024-07-17 23:56:00 +03:00
|
|
|
|
|
|
|
[tool.ruff.lint.pydocstyle]
|
2024-08-10 20:04:18 +03:00
|
|
|
convention = "numpy"
|