-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
177 lines (154 loc) · 5.56 KB
/
Copy pathpyproject.toml
File metadata and controls
177 lines (154 loc) · 5.56 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
168
169
170
171
172
173
174
175
176
177
[build-system]
requires = ["hatchling>=1.27.0", "hatch-vcs>=0.4.0"]
build-backend = "hatchling.build"
[project]
name = "swgoh_comlink"
dynamic = ["version"]
authors = [
{ name = "Mar Trepodi", email = "martrepodi@gmail.com" },
]
description = "Python 3 interface library for swgoh-comlink (https://github.com/swgoh-utils/swgoh-comlink)"
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"httpx>=0.28",
"typing-extensions>=4.15.0",
]
[project.scripts]
swgoh-migrate = "swgoh_comlink.migrate:main"
[project.urls]
"Homepage" = "https://github.com/swgoh-utils/comlink-python"
"Bug Tracker" = "https://github.com/swgoh-utils/comlink-python/issues"
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
"--strict-markers",
]
asyncio_mode = "auto"
testpaths = ["tests"]
markers = [
"integration: tests that require an accessible comlink service",
"parity: tests that compare python stat calculation against JS baseline",
"exhaustive: comprehensive pre-release validation tests",
"cat_endpoints: sync and async endpoint functional tests",
"cat_enums: enums=True parameter verification across endpoints",
"cat_localization: localization bundle gzip/unzip processing tests",
"cat_parity: sync vs async response parity verification",
"cat_statcalc: StatCalc live calculation tests",
"cat_builder: GameDataBuilder validation tests",
"cat_helpers: helper function integration tests",
"cat_errors: error handling and edge case tests",
"cat_schemas: response structure contract validation",
"cat_stress: load endurance and connection pool tests",
]
# Version is derived from the Git tag (e.g. v2.1.0) at build time.
# No version string is committed to the repo — tag the release and the
# build reads it. See .github/workflows/release.yml.
[tool.hatch.version]
source = "vcs"
# Write the resolved version to a generated, git-ignored module so it is
# importable at runtime (consumed by src/swgoh_comlink/version.py).
[tool.hatch.build.hooks.vcs]
version-file = "src/swgoh_comlink/_version.py"
[tool.hatch.build.targets.wheel]
packages = ["src/swgoh_comlink"]
[tool.hatch.build.targets.sdist]
include = [
"/src",
"/docs",
"/README.md",
"/CHANGELOG.md",
"/LICENSE",
"/pyproject.toml",
"/mkdocs.yml",
]
[tool.uv.sources]
swgoh-comlink = { workspace = true }
[dependency-groups]
test = [
"pytest>=7.0",
"pytest-cov>=4.0",
"pytest-httpx>=0.35",
"pytest-asyncio>=0.24",
]
typecheck = [
"ty>=0.0.34",
]
changelog = [
"git-changelog>=2.9,<3",
]
dev = [
{include-group = "test"},
{include-group = "typecheck"},
{include-group = "changelog"},
"ruff>=0.8",
]
docs = [
"mkdocs-material>=9.5.0",
"mkdocstrings[python]>=0.28.0",
]
# ── Ruff ─────────────────────────────────────────────────────────────────
[tool.ruff]
target-version = "py310"
line-length = 120
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"W", # pycodestyle warnings
"I", # isort (import sorting)
"UP", # pyupgrade (Python version upgrades)
"B", # flake8-bugbear (common bug patterns)
"SIM", # flake8-simplify
]
ignore = [
"E501", # line length — enforced at 120 by formatter, not linter
"UP009", # utf-8 encoding declarations — existing codebase convention
"SIM108", # ternary operator — style preference, too many existing instances
"SIM118", # dict.keys() — style preference, too many existing instances
]
[tool.ruff.lint.per-file-ignores]
# Existing violations to address incrementally — do not add new suppressions
"src/swgoh_comlink/__init__.py" = ["UP036"] # outdated version block (sys.exit check)
"src/swgoh_comlink/helpers/*.py" = ["B007", "B904", "SIM102"] # existing patterns to clean up
[tool.ruff.lint.isort]
known-first-party = ["swgoh_comlink"]
[tool.ruff.format]
quote-style = "double"
# ── ty (Astral type checker) ─────────────────────────────────────────────
[tool.ty.environment]
python-version = "3.10"
# ── git-changelog ────────────────────────────────────────────────────────
[tool.git-changelog]
convention = "angular"
template = "angular"
provider = "github"
versioning = "pep440"
in-place = true
output = "CHANGELOG.md"
marker-line = "<!-- insertion marker -->"
bump = "auto"
# The angular convention renders only feat/fix/revert/refactor/perf by default.
# Listing them explicitly is what lets `docs` join them.
sections = ["feat", "fix", "revert", "refactor", "perf", "docs"]
# ── Coverage ─────────────────────────────────────────────────────────────
[tool.coverage.run]
source = ["swgoh_comlink"]
[tool.coverage.report]
fail_under = 40
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"if __name__ == .__main__.",
]