-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
134 lines (110 loc) · 4.06 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
134
################################################################################
## Project Configuration
################################################################################
[project]
name = "pypacter-api"
description = "API for PyPacter"
dynamic = ["version"]
authors = [{ name = "JP-Ellis", email = "[email protected]" }]
maintainers = [{ name = "JP-Ellis", email = "[email protected]" }]
readme = "README.md"
license = { file = "LICENSE" }
keywords = [
"pactflow",
"pypacter",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Framework :: FastAPI",
"Intended Audience :: Developers",
"License :: Other/Proprietary License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Code Generators",
]
requires-python = ">=3.13"
dependencies = [
"fastapi~=0.0",
"multidict~=6.0",
"pypacter",
]
[project.urls]
Documentation = "https://github.com/pactflow/pactflow-python-coding-test/tree/main/pypacter-api"
Issues = "https://github.com/pactflow/pactflow-python-coding-test/issues"
Source = "https://github.com/pactflow/pactflow-python-coding-test/tree/main/pypacter-api"
[project.scripts]
local-api = "pypacter_api:local"
[project.optional-dependencies]
devel-types = [
"mypy==1.15.0",
"pydantic~=2.9",
]
devel-test = ["pytest", "pytest-cov", "coverage[toml]", "uvicorn"]
devel = ["pypacter-api[devel-types,devel-test]", "ruff==0.10.0"]
################################################################################
## Build System Configuration
################################################################################
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
raw-options = { root = ".." }
[tool.hatch.build.hooks.vcs]
version-file = "src/pypacter_api/__version__.py"
[tool.hatch.envs.default]
installer = "uv"
features = ["devel"]
# This is require to get around an incompatibility between hatch and uv
# See: https://github.com/pypa/hatch/issues/1639
pre-install-commands = ["uv pip install .[devel]"]
[tool.hatch.envs.default.scripts]
lint = "ruff check --output-format full --show-fixes {args} src tests"
typecheck = "mypy . {args}"
format = "ruff format . {args}"
test = "pytest tests/ {args}"
all = ["format", "lint", "typecheck", "test"]
[tool.hatch.envs.test]
installer = "uv"
features = ["devel"]
# This is require to get around an incompatibility between hatch and uv
# See: https://github.com/pypa/hatch/issues/1639
pre-install-commands = ["uv pip install .[devel-test]"]
################################################################################
## Ruff Configuration
################################################################################
[tool.ruff]
extend = "../pyproject.toml"
[tool.ruff.format]
preview = true
################################################################################
## PyTest Configuration
################################################################################
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
"--cov-config=pyproject.toml",
"--cov-report=xml",
]
################################################################################
## Mypy Configuration
################################################################################
[tool.mypy]
plugins = "pydantic.mypy"
################################################################################
## Coverage Configuration
################################################################################
[tool.coverage.paths]
pypacter_api = ["src/pypacter_api"]
tests = ["tests"]
[tool.coverage.report]
exclude_lines = [
"if __name__ == .__main__.:", # Ignore non-runnable code
"if TYPE_CHECKING:", # Ignore typing
"raise NotImplementedError", # Ignore defensive assertions
"@(abc\\.)?abstractmethod", # Ignore abstract methods
]