-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
114 lines (103 loc) · 2.84 KB
/
Copy pathpyproject.toml
File metadata and controls
114 lines (103 loc) · 2.84 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
[project]
name = "pg-nearest-city"
version = "2.0.0"
description = "Given a geopoint, find the nearest city using PostGIS (reverse geocode)."
authors = [
{name = "Sam Woodcock", email = "sam.woodcock@hotosm.org"},
{name = "Emir Fabio Cognigni"},
{name = "Stephan Garland", email = "stephan@sgarland.dev"}
]
readme = "README.md"
license = {text = "GPL-3.0-only"}
requires-python = ">=3.10"
keywords = ["reverse-geocode", "geocode", "reverse", "postgis", "nearest"]
classifiers = [
"Topic :: Utilities",
"Topic :: Scientific/Engineering :: GIS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"psycopg>=3.1",
]
[project.urls]
homepage = "https://github.com/hotosm/pg-nearest-city"
documentation = "https://hotosm.github.io/pg-nearest-city"
repository = "https://github.com/hotosm/pg-nearest-city"
[project.scripts]
build-sync = "unasync:main"
pgnearest-load = "pg_nearest_city.scripts.load_database:main"
[dependency-groups]
test = [
"pytest>=8.3.4",
"pytest-asyncio>=0.25.3",
]
docs = [
"mkdocs>=1.6.1",
"mkdocs-exclude>=1.0.2",
"mkdocs-git-revision-date-localized-plugin>=1.3.0",
"mkdocs-material>=9.5.49",
"mkdocstrings-python>=1.13.0",
]
dev = [
"gdal>=3.6",
"psutil>=6.1.1",
"reverse-geocoder>=1.5.1",
"ruff>=0.9",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["pg_nearest_city"]
include = [
"pg_nearest_city/data/country.csv.xz*",
"pg_nearest_city/data/geocoding.csv.xz",
"pg_nearest_city/db/iso-3166-1.csv.gz",
]
[tool.ruff]
fix = true
line-length = 88
target-version = "py310"
exclude = [
".ruff_cache",
"pg_nearest_city/__version__.py",
# Generated files
"pg_nearest_city/_sync/nearest_city.py",
"tests/_sync/test_nearest_city.py",
]
[tool.ruff.lint]
# Note we do not use "I" for import sorting to avoid conflict with
# import sorting after unasync is run
select = ["E", "W", "D", "B", "F", "N", "Q"]
ignore = [
"D105", # magic method docstrings are not required
"D107", # __init__ docstrings are not required
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["D"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.pytest.ini_options]
addopts = "-ra -q"
testpaths = [
"tests",
]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
markers = [
"integration: tests that require a running PostGIS database with loaded data",
]
[tool.commitizen]
name = "cz_conventional_commits"
version = "2.0.0"
version_provider = "uv"
version_files = [
"pyproject.toml:version",
"pg_nearest_city/__version__.py",
]
changelog_file = "CHANGELOG.md"
update_changelog_on_bump = true