-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathpyproject.toml
More file actions
190 lines (171 loc) · 4.69 KB
/
pyproject.toml
File metadata and controls
190 lines (171 loc) · 4.69 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
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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "bigtree"
description = "Tree Implementation and Methods for Python, integrated with list, dictionary, pandas and polars DataFrame."
readme = "README.md"
requires-python = ">=3.10"
license = {text = "MIT"}
keywords = [
"tree",
"bigtree",
]
authors = [
{ name = "Kay Jan", email = "kayjanw@gmail.com" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = []
dynamic = ["version"]
[project.urls]
Documentation = "https://bigtree.readthedocs.io"
Issues = "https://github.com/kayjan/bigtree/issues"
Discussions = "https://github.com/kayjan/bigtree/discussions"
Source = "https://github.com/kayjan/bigtree"
[project.optional-dependencies]
all = [
"lark",
"matplotlib",
"pandas",
"polars",
"pydot",
"Pillow",
"pyvis",
"rich",
]
image = [
"pydot",
"Pillow",
]
matplotlib = ["matplotlib"]
pandas = ["pandas"]
polars = ["polars"]
query = ["lark"]
rich = ["rich"]
vis = ["pyvis"]
[tool.hatch.version]
path = "bigtree/__init__.py"
[tool.hatch.envs.default]
dependencies = [
"black",
"coverage",
"isort",
"lark",
"matplotlib",
"mypy",
"pandas",
"Pillow",
"polars",
"polars-lts-cpu",
"pydot",
"pytest<9",
"pytest-cov",
"pytest-benchmark[histogram]",
"pyvis",
"rich",
"ruff",
]
[tool.hatch.envs.default.scripts]
cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=bigtree {args}"
cov-benchmark = "cov && --benchmark-autosave --benchmark-histogram=.benchmarks/histogram --benchmark-json .benchmarks/output.json"
no-cov = "test && coverage report --show-missing --omit='*/workflows/*' --benchmark-autosave --benchmark-histogram=.benchmarks/histogram --benchmark-json .benchmarks/output.json"
test = "pytest . {args}"
lint = "black -l 88 ."
sort = "isort --profile black ."
mypy-type = "mypy bigtree"
ruff-check = "ruff check ."
ruff-fix = "ruff check . --fix"
[tool.hatch.envs.docs]
dependencies = [
"autodocsumm==0.2.11",
"IPython",
"myst-parser~=1.0.0",
"sphinxcontrib-mermaid==0.9.2",
"sphinxemoji==0.2.0",
"sphinx-material==0.0.36"
]
[tool.hatch.envs.docs.scripts]
html = "sphinx-build -M html docs_sphinx/source docs_sphinx/build"
coverage = "sphinx-build -v -b coverage docs_sphinx/source docs_sphinx/build/coverage"
doctest = "sphinx-build -v -b doctest docs_sphinx/source docs_sphinx/build/doctest"
clean = "sphinx-build -M clean docs_sphinx/source docs_sphinx/build"
clean-html = "sphinx-build -M html docs_sphinx/source docs_sphinx/build & sphinx-build -M clean docs_sphinx/source docs_sphinx/build"
[tool.hatch.envs.mkdocs]
dependencies = [
"black",
"docstr-coverage",
"IPython",
"mkdocs==1.6.1",
"mkdocs-glightbox",
"mkdocs-include-markdown-plugin",
"mkdocs-jupyter",
"mkdocs-material[imaging]==9.6.22",
"mdx_truly_sane_lists==1.3",
"mkdocstrings[python]>=0.25.0",
"requests",
"ruff",
"termynal==0.11.1",
]
[tool.hatch.envs.mkdocs.scripts]
add-cairo = "ln -s /opt/homebrew/lib/libcairo.2.dylib . "
refresh-js = "python docs/_static/playground_whl.py"
coverage = "docstr-coverage bigtree --skip-file-doc --skip-init --exclude \"(.*/exceptions.py|.*/constants.py)\""
build = "mkdocs build"
serve = "refresh-js && mkdocs serve --livereload"
deploy = "mkdocs gh-deploy"
[tool.hatch.envs.test]
description = "Run tests with multiple Python versions"
[[tool.hatch.envs.test.matrix]]
python = ["3.10", "3.11", "3.12", "3.13"]
[tool.coverage.run]
branch = true
parallel = true
omit = [
"*/tests/*",
"*/workflows/*",
"bigtree/tree/construct/render.py"
]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.flake8]
ignore = """E501, W503"""
per-file-ignores = """
docs_sphinx/source/conf.py: E402
bigtree/__init__.py: F401
"""
[tool.isort]
profile = "black"
[tool.mypy]
ignore_missing_imports = true
strict = true
strict_optional = false
warn_no_return = false
disallow_untyped_calls = false
[tool.ruff]
line-length = 88
target-version = "py38"
include = ["*.py", "*.pyi"]
exclude = ["assets", "dist", "docs*", "tests"]
[tool.ruff.lint]
select = ["B", "E", "F", "I", "N", "UP", "W"]
ignore = [
"E501", # line too long
"E741", # ambiguous variable name
"F401", # imported but not used / explicit reexport
"N802", # function should be lowercase
"UP015", # unnecessry mode argument for open
"UP037", # Remove quotes from type annotation
]