forked from vega/altair
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
227 lines (209 loc) · 5.45 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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# this file contains:
# 1 build system configuration
# 2 project configuration
# 3 tool configuration, for:
# - hatch
# - ruff
# - pytest
# - mypy
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "altair"
authors = [{ name = "Vega-Altair Contributors" }]
dependencies = [
"typing_extensions>=4.0.1; python_version<\"3.11\"",
"jinja2",
# If you update the minimum required jsonschema version, also update it in build.yml
"jsonschema>=3.0",
"numpy",
# If you update the minimum required pandas version, also update it in build.yml
"pandas>=0.25",
"toolz",
"packaging"
]
description = "Vega-Altair: A declarative statistical visualization library for Python."
readme = "README.md"
keywords = [
"declarative",
"statistics",
"visualization",
"interactive",
"json",
"vega-lite",
]
requires-python = ">=3.8"
dynamic = ["version"]
license-files = { paths = ["LICENSE"] }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"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",
"Typing :: Typed",
]
[project.urls]
Documentation = "https://altair-viz.github.io"
Source = "https://github.com/altair-viz/altair"
[project.optional-dependencies]
dev = [
"hatch",
"ruff>=0.1.3",
"ipython",
"pytest",
"pytest-cov",
"m2r",
"vega_datasets",
"vl-convert-python>=1.1.0",
"mypy",
"pandas-stubs",
"types-jsonschema",
"types-setuptools",
"pyarrow>=11",
"vegafusion[embed]>=1.4.0",
"anywidget",
"geopandas",
]
doc = [
"sphinx",
"docutils",
"sphinxext_altair",
"jinja2",
"numpydoc",
"pillow>=9,<10",
"pydata-sphinx-theme>=0.14.1",
"myst-parser",
"sphinx_copybutton",
"sphinx-design",
"scipy",
]
[tool.hatch.version]
path = "altair/__init__.py"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build]
include = ["/altair"]
artifacts = ["altair/jupyter/js/index.js"]
[tool.hatch.envs.default]
features = ["dev"]
[tool.hatch.envs.default.scripts]
test = [
"ruff check .",
"ruff format --diff --check .",
"mypy altair tests",
"python -m pytest --pyargs --doctest-modules tests altair",
]
test-coverage = "python -m pytest --pyargs --doctest-modules --cov=altair --cov-report term altair"
test-coverage-html = "python -m pytest --pyargs --doctest-modules --cov=altair --cov-report html altair"
[tool.hatch.envs.doc]
features = ["dev", "doc"]
[tool.hatch.envs.doc.scripts]
clean = "rm -rf doc/_build"
clean-generated = ["rm -rf doc/user_guide/generated", "rm -rf doc/gallery"]
clean-all = ["clean", "clean-generated", "rm -rf doc/_images"]
clean-win = "if exist doc\\_build rd /s /q doc\\_build"
clean-generated-win = [
"if exist doc\\user_guide\\generated rd /s /q doc\\user_guide\\generated",
"if exist doc\\gallery rd /s /q doc\\gallery",
]
clean-all-win = [
"clean-win",
"clean-generated-win",
"if exist doc\\_images rd /s /q doc\\_images",
]
build-html = [
"mkdir -p doc/_images",
"sphinx-build -b html -d doc/_build/doctrees doc doc/_build/html",
]
build-html-win = [
"if not exist doc\\_images md doc\\_images",
"sphinx-build -b html -d doc\\_build\\doctrees doc doc\\_build\\html",
]
doctest = "sphinx-build -b doctest -d doc/_build/doctrees doc doc/_build/doctest"
coverage = "sphinx-build -b coverage -d doc/_build/doctrees doc doc/_build/coverage"
serve = "(cd doc/_build/html && python -m http.server)"
publish-clean-build = [
"clean-all",
"build-html",
"(cd doc && bash sync_website.sh)",
]
[tool.ruff]
target-version = "py38"
line-length = 88
indent-width = 4
exclude = [
".git",
"build",
"__pycache__",
"tests/examples_arguments_syntax",
"tests/examples_methods_syntax",
"tests/test_transformed_data.py",
"altair/vegalite/v?/schema",
]
[tool.ruff.lint]
select = [
# flake8-bugbear
"B",
# flake8-comprehensions
"C4",
# pycodestyle-error
"E",
# pycodestyle-warning
"W",
# pyflakes
"F",
# flake8-tidy-imports
"TID",
]
ignore = [
# Whitespace before ':'
"E203",
# Too many leading '#' for block comment
"E266",
# Line too long
"E501",
# Relative imports are banned
"TID252",
# zip() without an explicit strict= parameter set.
# python>=3.10 only
"B905",
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "lf"
[tool.ruff.mccabe]
max-complexity = 18
[tool.pytest.ini_options]
markers = [
"save_engine: marks some of the tests which are using an external package to save a chart to e.g. a png file. This mark is used to run those tests selectively in the build GitHub Action.",
]
[tool.mypy]
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = [
"vega_datasets.*",
"toolz.*",
"altair_viewer.*",
"altair_saver.*",
"pyarrow.*",
"yaml.*",
"vl_convert.*",
"pandas.lib.*",
"geopandas.*",
"nbformat.*",
"ipykernel.*",
"m2r.*",
# This refers to schemapi in the tools folder which is imported
# by the tools scripts such as generate_schema_wrapper.py
"schemapi.*"
]
ignore_missing_imports = true