-
Notifications
You must be signed in to change notification settings - Fork 52
/
pyproject.toml
134 lines (104 loc) · 3.14 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "google-i18n-address"
version = "3.1.1"
readme = "README.md"
description = "Address validation helpers for Google's i18n address database"
authors = [{ name = "Mirumee Software", email = "hello@mirumee.com" }]
license = { file = "LICENSE" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Topic :: Software Development :: Internationalization",
"Topic :: Software Development :: Libraries :: Python Modules",
"Operating System :: OS Independent",
"Environment :: Web Environment",
"Programming Language :: Python",
"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",
]
dependencies = ["requests>=2.7.0"]
[project.urls]
"Homepage" = "https://github.com/mirumee/google-i18n-address"
"Repository" = "https://github.com/mirumee/google-i18n-address"
"Bug Tracker" = "https://github.com/mirumee/google-i18n-address/issues"
[project.optional-dependencies]
dev = ["ipdb"]
test = ["pytest-asyncio", "pytest-cov", "coverage[toml]"]
[project.scripts]
update-validation-files = "i18naddress.scripts:download_json_files"
[tool.hatch.build]
include = [
"src/i18naddress/**/*.py",
"src/i18naddress/**/*.json",
]
[tool.hatch.build.targets.wheel]
packages = ["src/i18naddress"]
[tool.hatch.build.targets.sdist]
packages = ["src/i18naddress"]
[tool.hatch.envs.default]
features = ["dev", "test"]
[tool.hatch.envs.default.scripts]
check = ["hatch fmt", "hatch test -a", "hatch test --cover"]
[tool.hatch.envs.hatch-test]
dependencies = [
"asynctest",
"ipdb",
"pytest-asyncio",
"pytest-cov",
"coverage[toml]",
]
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
# Coverage - `hatch test --cover` options
[tool.coverage.run]
source_pkgs = ["i18naddress"]
branch = true
parallel = true
[tool.coverage.paths]
i18naddress = ["src/i18naddress"]
tests = ["tests"]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"@abstract",
]
fail_under = 90
[tool.hatch.envs.coverage]
detached = true
dependencies = [
"coverage[toml]",
]
[tool.hatch.envs.coverage.scripts]
combine = "coverage combine {args}"
html = "coverage html --skip-covered --skip-empty"
xml = "coverage xml --skip-empty"
# Ruff - `hatch fmt` options
[tool.ruff]
line-length = 88
target-version = "py38"
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 80
[tool.ruff.lint]
select = ["E", "F", "G", "I", "N", "Q", "UP", "C90", "T20", "TID"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.mccabe]
max-complexity = 30
[tool.ruff.lint.isort]
known-first-party = ["i18naddress"]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false