-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
167 lines (144 loc) · 3.57 KB
/
Copy pathpyproject.toml
File metadata and controls
167 lines (144 loc) · 3.57 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
166
167
[project]
name = "ch-api"
description = "UK Companies House API"
authors = [
{name = "Ilja Orlovs", email = "VRGhost@users.noreply.github.com"},
]
dynamic = ["version"]
dependencies = ["httpx>=0.28.1", "pydantic>=2.12.5"]
requires-python = ">=3.11"
readme = "README.md"
license = {text = "MIT"}
keywords = [
"Companies House",
"CH",
"restful api",
"uk",
"united kingdom",
]
classifiers = [
"Environment :: Console",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Development Status :: 5 - Production/Stable",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
]
[project.optional-dependencies]
dev = [
"pytest>=9.0.2",
"pytest-mock>=3.15.1",
"pytest-cov>=7.0.0",
"pytest-asyncio>=1.3.0",
"ruff>=0.14.13",
"myst-parser>=5.0.0",
"sphinx>=9.0.4",
"sphinx-autobuild>=2025.8.25",
"sphinx-copybutton>=0.5.2",
"sphinx-design>=0.7.0",
"pydata-sphinx-theme>=0.16.1",
"autodoc-pydantic>=2.2.0",
"pytest-doctestplus>=1.7.1",
"pyright>=1.1.408",
]
[project.urls]
Homepage = "https://docs.release.art/ch-api/"
Documentation = "https://docs.release.art/ch-api/"
Repository = "https://github.com/release-art/ch-api/"
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm.build]
includes = ["src/ch_api"]
[tool.ruff]
target-version = "py313"
lint.select = [
# https://beta.ruff.rs/docs/rules/
"A", # do not shadow bultins - TODO
"B", # flake8-bugbear
"C",
"E",
"F",
"I", # isort
"W", # pycodestyle
"N", # pep8 naming
"C4", # list comprehensions
"T20", # print()
"PTH", # use-pathlib - todo
]
lint.ignore = ["N802", "F841"]
line-length = 120
[tool.ruff.format]
line-ending = "lf"
[tool.ruff.lint.per-file-ignores]
"__init__.py" = [
# imported but unused
"F401",
# E402 Module level import not at top of file
"E402",
]
"bin/**/*.py" = [
# print()
"T201",
]
"main.py" = [
"B008" # the typer.Option() as default arg
]
[tool.ruff.lint.isort]
order-by-type = true
combine-as-imports = true
force-wrap-aliases = true
known-first-party = ["ch_api"]
forced-separate = ["tests"]
[tool.pdm]
distribution = true
[tool.pdm.version]
source = "file"
path = "src/ch_api/__version__.py"
[tool.pdm.scripts]
doc = {shell = "sphinx-build -b html -W -T -E ./docs ./dist/docs/html", help="Build sphynx docs"}
lint = {shell = "./bin/autoformat.sh", help = "Lint source with Ruff"}
typecheck = {cmd = "pyright", help = "Type-check source with Pyright"}
[tool.pytest.ini_options]
pythonpath = "src"
addopts = """\
--cache-clear \
--code-highlight=yes \
--color=yes \
--cov=src \
--cov-config=pyproject.toml \
--cov-report=xml \
--cov-report=html \
--cov-report=term-missing:skip-covered \
-ra \
--tb=native \
--verbosity=3 \
--doctest-plus \
--doctest-modules \
--doctest-rst \
--doctest-glob=*.md \
--doctest-glob=*.rst \
"""
filterwarnings = [
"ignore::DeprecationWarning"
]
python_files = ["test_*.py",]
python_classes = ["Test", "Acceptance",]
python_functions = ["test"]
testpaths = [
"tests/",
"src/",
"docs/",
"README.md",
]
doctest_optionflags = ["NORMALIZE_WHITESPACE", "ELLIPSIS"]
markers = [
# Test tags/labels/markers - not using any currently
]
[tool.pyright]
include = ["src"]
pythonVersion = "3.11"
typeCheckingMode = "standard"