-
-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathpyproject.toml
More file actions
165 lines (148 loc) · 5.61 KB
/
pyproject.toml
File metadata and controls
165 lines (148 loc) · 5.61 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
[build-system]
requires = ["setuptools>=64", "setuptools_scm[toml]>=8"]
build-backend = "setuptools.build_meta"
[project]
name = "localtileserver"
dynamic = ["version"]
description = "Locally serve geospatial raster tiles in the Slippy Map standard."
readme = "README.md"
license = "MIT"
requires-python = ">=3.10"
authors = [{ name = "Bane Sullivan", email = "hello@banesullivan.com" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Information Analysis",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"click",
"fastapi>=0.100.0",
"uvicorn[standard]",
"jinja2",
# ``[comm]`` pulls in ``anywidget`` so the jupyter-loopback bridge
# works out of the box in VS Code / Colab / Shiny / Solara / marimo.
# Without it, tile URLs silently fail in those frontends.
"jupyter-loopback[comm]>=0.3.3",
"rio-tiler",
"rio-cogeo",
"requests",
"server-thread",
"scooby",
]
[project.optional-dependencies]
colormaps = ["matplotlib", "cmocean", "colorcet"]
jupyter = ["ipyleaflet"]
xarray = ["xarray", "rioxarray"]
helpers = ["shapely"]
test = [
"pytest",
"pytest-cov",
"pytest-asyncio",
"matplotlib",
"folium",
"ipyleaflet",
"shapely",
]
doc = [
"bokeh",
"folium",
"ipyleaflet",
"jupyter-sphinx",
"matplotlib",
"pydata-sphinx-theme",
"shapely",
"sphinx",
"sphinx-copybutton",
"sphinx-notfound-page",
]
dev = [
"localtileserver[test,doc,colormaps,jupyter,xarray,helpers]",
"pre-commit",
"ruff",
]
all = ["localtileserver[colormaps,jupyter,xarray,helpers]"]
[project.urls]
Documentation = "https://localtileserver.banesullivan.com"
"Bug Tracker" = "https://github.com/banesullivan/localtileserver/issues"
"Source Code" = "https://github.com/banesullivan/localtileserver"
[project.scripts]
localtileserver = "localtileserver.__main__:run_app"
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
include = ["localtileserver*"]
[tool.setuptools.package-data]
"localtileserver.tiler.data" = ["*.tif", "*.xml", "*.wkb"]
"localtileserver.web" = ["static/**/*", "templates/**/*"]
[tool.setuptools.data-files]
"etc/jupyter/jupyter_server_config.d" = [
"jupyter-config/jupyter_server_config.d/localtileserver.json",
]
[tool.setuptools_scm]
version_file = "localtileserver/_version.py"
version_scheme = "release-branch-semver"
# Heroku's Python buildpack strips .git from the build context, so
# setuptools-scm can't infer a version from tags there. Fall back to a
# placeholder so the install step doesn't abort; real releases (PyPI, CI)
# always have .git present and use the inferred version.
fallback_version = "0.0.0+unknown"
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-v --tb=short"
[tool.coverage.run]
source = ["localtileserver"]
omit = ["localtileserver/web/sentry.py", "localtileserver/web/wsgi.py"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.",
"except ImportError",
]
[tool.ruff]
line-length = 100
# ``_version.py`` is emitted by setuptools-scm at build time; its exact
# formatting (e.g. ``__all__`` ordering) varies between generator
# versions and isn't maintained by hand.
extend-exclude = ["localtileserver/_version.py"]
[tool.ruff.lint]
select = [
"F", # pyflakes
"E",
"W", # pycodestyle
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"RUF", # ruff-specific rules
]
[tool.ruff.lint.per-file-ignores]
"**/__init__.py" = ["F401", "F403"]
"*.ipynb" = ["E402", "E741"]
"doc/**" = ["E501"]
[tool.ruff.lint.isort]
force-sort-within-sections = true
combine-as-imports = true
[tool.numpydoc_validation]
checks = [
"all", # report on all checks
"ES01", # but don't require an extended summary
"EX01", # or examples
"SA01", # or a see also section
"SS06", # or a summary that fits on one line
]
exclude = [
'\._',
'\.__(init|new|repr|str|del|hash|eq|ne|lt|le|gt|ge|call|iter|next|getattr|setattr|delattr|getitem|setitem|delitem|contains|len|bool|enter|exit|format|reduce|copy|deepcopy)__$',
'_view$', # FastAPI endpoint view functions
'\.click_run_app$', # click CLI wrapper
'\.Report$', # scooby Report subclass
'\.list_palettes$', # simple endpoint wrapper
'\.(cesium_viewer|cesium_split_viewer|split_form)$', # nested template views
'examples\.get_', # @wraps-decorated example loaders
'examples\.load_', # example data loaders
]