-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpyproject.toml
193 lines (168 loc) · 5.13 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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
[tool.poetry]
name = "pywhy_graphs"
#
# 0.0.0 is standard placeholder for poetry-dynamic-versioning
# any changes to this should not be checked in
#
version = "0.0.0"
description = "Causal Graphs for Python"
authors = ["PyWhy Community <[email protected]>"]
license = "MIT"
documentation = "https://py-why.github.io/pywhy-graphs"
repository = "https://github.com/py-why/pywhy-graphs"
readme = "README.md"
classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
]
keywords = ['causality', 'graphs', 'causal-inference', 'graphical-model']
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
[tool.poetry-dynamic-versioning.substitution]
files = ["pywhy_graphs/__init__.py"]
[tool.setuptools]
include-package-data = false
[tool.setuptools.packages.find]
include = ['pywhy_graphs*']
exclude = ['*tests']
[tool.poetry.dependencies]
python = ">=3.8,<3.11"
numpy = "^1.21.0"
scipy = "^1.8.0"
networkx = "^3.1"
importlib-resources = { version = "*", python = "<3.9" }
pygraphviz = { version = "*", optional = true }
[tool.poetry.group.test]
optional = true
[tool.poetry.group.test.dependencies]
poethepoet = "^0.16.0"
pytest = "^7.1.2"
pytest-cov = "^3.0.0"
joblib = { version = "^1.1.0" } # needed in dowhy's package
memory_profiler = { version = "^0.60.0" }
causal-learn = { version = "^0.1.2.8" }
ananke-causal = { version = "^0.3.3" }
pre-commit = "^3.0.4"
[tool.poetry.group.style]
optional = true
[tool.poetry.group.style.dependencies]
poethepoet = "^0.16.0"
mypy = "^0.971"
black = {extras = ["jupyter"], version = "^22.12.0"}
isort = "^5.12.0"
flake8 = "^5.0.4"
bandit = "^1.7.4"
pydocstyle = "^6.1.1"
codespell = "^2.1.0"
toml = "^0.10.2"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
poethepoet = "^0.16.0"
portray = "^1.7.0"
matplotlib = { version = "^3.5" }
numpydoc = { version = "1.4" }
pydata-sphinx-theme = { version = "^0.9.0" }
sphinx = { version = "^5.1.1" }
sphinxcontrib-bibtex = { version = "^2.4.2" }
sphinx-issues = { version = "^3.0.1" }
sphinx-copybutton = { version = "^0.5.0" }
sphinx-gallery = { version = "^0.11.0" }
graphviz = { version = "^0.20.1" }
ipython = { version = "^7.4.0" }
nbsphinx = { version = "^0.8" }
dowhy = { version = "^0.8" }
pygraphviz = { version = "*" }
memory_profiler = { version = "*" }
scikit-learn = { version = "^1.1.0" } # needed in dowhy's package
pandas = { version = "^1.1" } # needed in dowhy's package
joblib = { version = "^1.1.0" } # needed in dowhy's package
tqdm = { version = "^4.64.0" } # needed in dowhy's package
typing-extensions = { version = "*" } # needed in dowhy's package
[tool.poetry.extras]
viz = ['pygraphviz']
[build-system]
requires = ["poetry-core>=1.0.8"]
build-backend = "poetry.core.masonry.api"
[tool.poe.tasks]
_flake8 = 'flake8'
_bandit = 'bandit -r pywhy_graphs -c pyproject.toml'
_black = 'black .'
_isort = 'isort .'
_black_check = 'black --check pywhy_graphs examples'
_isort_check = 'isort --check .'
_pydocstyle = 'pydocstyle .'
_codespell = 'codespell pywhy_graphs/ doc/ examples/ --ignore-words=.codespellignore --skip "**/_build/*"'
type_check = 'mypy -p pywhy_graphs --config-file pyproject.toml'
unit_test = 'pytest ./pywhy_graphs --cov=pywhy_graphs --cov-report=xml --cov-config=pyproject.toml'
build_docs = 'make -C docs clean html'
build_docs_noplot = 'make -C docs clean html-noplot'
[[tool.poe.tasks.lint]]
sequence = ['_flake8', '_bandit', '_codespell', '_pydocstyle']
ignore_fail = 'return_non_zero'
[[tool.poe.tasks.format]]
sequence = ['_black', '_isort']
ignore_fail = 'return_non_zero'
[[tool.poe.tasks.format_check]]
sequence = ['_black_check', '_isort_check']
ignore_fail = 'return_non_zero'
#
# a standard verification sequence for use in pull requests
#
[[tool.poe.tasks.verify]]
sequence = ['format', 'lint', 'type_check', 'unit_test']
ignore_fail = "return_non_zero"
[tool.black]
line-length = 100
target-version = ['py38']
include = '\.pyi?$'
extend-exclude = '''
(
__pycache__
| \.github
| setup.py
| docs/
)
'''
[tool.pylint]
max-line-length = 120
disable = ["W0511"]
[tool.isort]
profile = 'black'
multi_line_output = 3
line_length = 100
py_version = 38
extend_skip_glob = ['setup.py', 'docs/*', 'pywhy_graphs/__init__.py']
[tool.pydocstyle]
convention = 'numpy'
ignore-decorators = '(copy_doc|property|.*setter|.*getter)'
match = '^(?!setup|__init__|test_).*\.py'
match-dir = '^pywhy_graphs.*'
add_ignore = 'D100,D104,D105,D107'
[tool.mypy]
ignore_missing_imports = true
no_site_packages = true
[tool.pytest.ini_options]
minversion = '6.0'
addopts = '--durations 20 --junit-xml=junit-results.xml --verbose'
filterwarnings = []
[tool.coverage.run]
branch = true
cover_pylib = false
source = ['pywhy_graphs']
omit = [
'**/__init__.py',
'pywhy_graphs/config.py',
'**/networkxprotocol.py',
'**/tests/**',
'pywhy_graphs.export.py',
]
[tool.coverage.report]
exclude_lines = ['pragma: no cover', 'if __name__ == .__main__.:']
precision = 2
[tool.bandit]
exclude_dirs = ["tests"]