Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
122 lines (109 loc) · 3.46 KB
/
Copy pathpyproject.toml
File metadata and controls
122 lines (109 loc) · 3.46 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "geopard"
dynamic = ["version"]
description = "Matching of GPX segments with dynamic time warping."
readme = "README.md"
requires-python = ">=3.11,<3.14"
license = "MIT"
license-files = ["LICENSE"]
authors = [
{ name = "Daniel Vogler" },
{ name = "Sebastian de Castelberg" },
]
keywords = ["gpx", "dtw", "dynamic-time-warping", "gps", "segment-matching", "running", "cycling"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: GIS",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
dependencies = [
"gpxpy>=1.5.0",
# Shapely 2 is a hard floor, not a preference: 1.x has no wheels for any
# Python this project supports, so the old `<2` pin made a fresh install
# fail at compile time. Nothing here uses an API that moved.
"shapely>=2.0",
"scipy>=1.11",
"numpy>=1.26",
"matplotlib>=3.8",
]
[project.urls]
Homepage = "https://github.com/danielvogler/geopard"
Source = "https://github.com/danielvogler/geopard"
Issues = "https://github.com/danielvogler/geopard/issues"
Changelog = "https://github.com/danielvogler/geopard/blob/main/CHANGELOG.md"
[dependency-groups]
dev = [
"mypy>=1.11",
"pre-commit>=3.7",
"pytest>=8.2",
"pytest-cov>=5.0",
"ruff>=0.5",
]
[tool.hatch.version]
path = "src/geopard/version.py"
[tool.hatch.build.targets.wheel]
packages = ["src/geopard"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = ["--strict-markers", "--strict-config"]
markers = [
"slow: end-to-end matches over the shipped tracks",
]
[tool.coverage.run]
source = ["src/geopard"]
branch = true
[tool.coverage.report]
# Plotting is exercised by tests/test_plotting.py through a headless backend,
# but the interactive `plt.show()` branches cannot be.
exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:"]
[tool.ruff]
line-length = 110
target-version = "py311"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # bugbear
"C4", # comprehensions
"SIM", # simplify
"RUF", # ruff
"D", # pydocstyle
"NPY", # numpy-specific
"PTH", # use pathlib
]
ignore = [
"D107", # __init__ docstring: the class docstring covers it
"D203", # incompatible with D211
"D213", # incompatible with D212
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
# Tests document themselves through their names; a docstring on every one of
# 90-odd cases is noise that hides the handful carrying real reasoning.
"tests/*" = ["D103"]
# Example scripts are read top-to-bottom as prose, and use module-level names.
"examples/*" = ["D103"]
[tool.mypy]
files = ["src", "tests"]
# `python_version` is deliberately not pinned. Pinning it to 3.11 makes mypy
# reject its own dependencies' stubs when it runs on a newer interpreter --
# numpy's __init__.pyi uses PEP 695 `type` statements, legal on 3.12+, which a
# 3.11 target refuses. Left unset, mypy targets whichever interpreter it runs
# under, so `make check` works on every version the project supports.
# gpxpy, scipy and matplotlib ship partial or no type information. Everything
# this repository writes itself is still checked.
ignore_missing_imports = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unreachable = true