-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
167 lines (148 loc) · 3.21 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
# 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_tiles"
authors = [{ name = "altair_tiles contributors" }]
dependencies = ["altair", "xyzservices", "mercantile"]
description = "altair_tiles"
readme = "README.md"
keywords = ["altair", "basemaps", "tiles"]
requires-python = ">=3.8"
dynamic = ["version"]
license-files = { paths = ["LICENSE"] }
classifiers = [
"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]
Source = "https://github.com/altair-viz/altair_tiles"
[project.optional-dependencies]
dev = [
"hatch",
"ruff>=0.1.4",
"ipython",
"ipykernel",
"pytest",
"geopandas",
"vega_datasets",
"vl-convert-python",
"mypy",
"ghp-import",
]
doc = [
"jupyter-book",
# We need vl-convert-python to build the docs which use the png renderer
"vl-convert-python",
]
[tool.hatch.version]
path = "altair_tiles/__init__.py"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build]
include = ["/altair_tiles"]
[tool.hatch.envs.default]
features = ["dev"]
[tool.hatch.envs.doc]
features = ["dev", "doc"]
[tool.hatch.envs.default.scripts]
test = [
"ruff format --diff --check .",
"ruff check .",
"mypy altair_tiles tests",
"python -m pytest tests",
]
[tool.hatch.envs.doc.scripts]
clean = "rm -rf doc/_build"
build = ["jupyter-book build doc/"]
serve = "(cd doc/_build/html && python -m http.server)"
publish = "ghp-import -n -p -f -o doc/_build/html"
build-and-publish = ["clean", "build", "publish"]
[tool.ruff]
target-version = "py38"
line-length = 88
exclude = [".git", "build", "__pycache__"]
[tool.ruff.lint]
select = [
# flake8-bugbear
"B",
# flake8-comprehensions
"C4",
# pycodestyle-error
"E",
# pycodestyle-warning
"W",
# pyflakes
"F",
# flake8-tidy-imports
"TID",
"I",
"C90",
"UP",
"YTT",
"S",
"BLE",
"A",
"T10",
"ISC",
"ICN",
"INP",
"PIE",
"T20",
"PT",
"RET501",
"RET502",
"RET503",
"SLF",
"SIM",
"TCH",
"ARG",
"PTH",
"ERA",
"PD",
"PGH",
"RUF",
]
ignore = [
# Rule prefers implicitly concatenated strings over explicitly.
# We prefer explicitly concatenated strings.
"ISC003",
"ISC001",
]
[tool.ruff.lint.per-file-ignores]
# Allow assert statements in test files
"tests/**/*.py" = ["S101"]
[tool.mypy]
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
strict_equality = true
strict_concatenate = true
check_untyped_defs = true
disallow_untyped_defs = true
[[tool.mypy.overrides]]
module = [
"vega_datasets.*",
"vl_convert.*",
"altair",
"xyzservices.*",
"mercantile.*",
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false