-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathpyproject.toml
More file actions
145 lines (118 loc) · 3.6 KB
/
pyproject.toml
File metadata and controls
145 lines (118 loc) · 3.6 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "django-prices-vatlayer"
dynamic = ["version"]
readme = "README.md"
description = "vatlayer.com support for Django"
authors = [{ name = "Mirumee Software", email = "hello@mirumee.com" }]
license = "BSD-3-Clause"
license-files = ["LICENSE"]
classifiers = [
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.10"
dependencies = ["Django>=3.2", "prices>=1.0.0", "requests", "jsonfield"]
[project.optional-dependencies]
dev = ["ipdb"]
test = ["pytest", "pytest-cov", "pytest-django", "pytest-vcr", "coverage[toml]"]
[project.urls]
"Homepage" = "https://github.com/mirumee/django-prices-vatlayer"
"Repository" = "https://github.com/mirumee/django-prices-vatlayer"
"Bug Tracker" = "https://github.com/mirumee/django-prices-vatlayer/issues"
[tool.hatch.build]
include = ["django_prices_vatlayer/**/*.py"]
exclude = ["tests"]
[tool.hatch.version]
path = "django_prices_vatlayer/__about__.py"
[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 = [
"pytest",
"pytest-cov",
"pytest-vcr",
"coverage[toml]",
"pytest-django",
]
# Django 3.2
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.10"]
django = ["3.2"]
# Django 4.2
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.10", "3.11", "3.12"]
django = ["4.2"]
# Django 5.2
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.10", "3.11", "3.12", "3.13"]
django = ["5.2"]
[tool.hatch.envs.hatch-test.overrides]
matrix.django.dependencies = [
{ value = "Django==3.2.*", if = ["3.2"]},
{ value = "Django==4.2.*", if = ["4.2"]},
{ value = "Django==5.2.*", if = ["5.2"]},
]
# Tool configuration
## Pytest configuration
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "tests.settings"
pythonpath = "."
testpaths = ["tests"]
## Coverage configuration
[tool.coverage.run]
source = ["django_prices_vatlayer", "tests"]
[tool.coverage.report]
exclude_also = [
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
omit = ["*/__about__.py"]
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 configuration
[tool.ruff]
line-length = 88
target-version = "py310"
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 99
[tool.ruff.lint]
select = ["E", "F", "G", "I", "N", "Q", "UP", "C90", "T20", "TID"]
ignore = ["UP038"]
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.lint.isort]
known-first-party = ["django_prices_vatlayer"]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false