-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
168 lines (145 loc) · 4.14 KB
/
Copy pathpyproject.toml
File metadata and controls
168 lines (145 loc) · 4.14 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
[build-system]
requires = ["hatchling", "uv-dynamic-versioning>=0.7.0"]
build-backend = "hatchling.build"
[project]
name = "python_ms"
dynamic = ["version"]
description = "A Python equivalent to the JavaScript ms package."
authors = [{ name = "Lari Liuhamo", email = "lari.liuhamo+pypi@gmail.com" }]
requires-python = ">=3.11"
readme = "README.md"
license = "MIT"
maintainers = [{ name = "Lari Liuhamo", email = "lari.liuhamo+pypi@gmail.com" }]
keywords = ["package", "python3", "time"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries",
"Typing :: Typed",
]
[project.urls]
Homepage = "https://pypi.org/project/python-ms/"
Repository = "https://github.com/Diapolo10/python-ms"
Documentation = "https://github.com/Diapolo10/python-ms/tree/main/docs"
Tracker = "https://github.com/Diapolo10/python-ms/issues"
Changelog = "https://github.com/Diapolo10/python-ms/blob/main/CHANGELOG.md"
[dependency-groups]
dev = [
"hatch>=1.16.5",
"mypy>=2.1.0",
"pytest>=9.0.3",
"pytest-cov>=7.1.0",
"ruff>=0.15.12",
"tox>=4.54.0",
"tox-gh-actions>=3.5.0",
]
[tool.coverage.run]
branch = true
relative_files = true
omit = [".tox/*", "tests/*"]
[tool.coverage.report]
exclude_also = [
"pragma: not covered",
"@overload",
"except importlib.metadata.PackageNotFoundError:",
]
[tool.hatch.build.targets.sdist]
include = ["src/python_ms"]
[tool.hatch.build.targets.wheel]
include = ["src/python_ms"]
[tool.hatch.build.targets.wheel.sources]
"src/python_ms" = "python_ms"
[tool.hatch.version]
source = "uv-dynamic-versioning"
[tool.mypy]
exclude = ["tests/"]
exclude_gitignore = true
strict = true
strict_equality = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.pytest]
minversion = "9.0"
addopts = [
"--doctest-modules",
"--cov=./",
"--cov-append",
"--cov-fail-under=80",
"--cov-report=html:tests/reports/coverage-html",
"--cov-report=term-missing:skip-covered",
"--cov-report=xml:tests/reports/coverage.xml",
"--ignore=docs/",
]
testpaths = ["tests"]
[tool.ruff]
lint.select = ["ALL"]
lint.ignore = [
"COM812", # Missing trailing comma (disabled due to formatter conflict)
"D203", # One blank line before class docstring
"D212", # Multi-line summary first line
"ISC001", # Single-line implicit string concatenation (disabled due to formatter conflict)
"PLR0913", # Too many arguments
"Q000", # Single quotes found but double quotes preferred
]
line-length = 120
show-fixes = true
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
multiline-quotes = "double"
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.lint.per-file-ignores]
# https://beta.ruff.rs/docs/rules/
"__init__.py" = ["F401", "F403", "F405", "PGH003"]
"tests/*" = ["ANN", "ARG", "INP001", "PLR2004", "S101"]
"*/config.py" = ["S311"]
"ms.py" = ["FBT001", "FBT002"]
[tool.ruff.lint.pylint]
max-args = 15
max-branches = 20
max-returns = 15
max-statements = 80
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py3{11, 12, 13, 14}, pypy3
skip_missing_interpreters = true
[gh-actions]
python =
3.11: py311
3.12: py312
3.13: py313
3.14: py314
pypy-3.11: pypy3
[testenv]
pass_env =
GITHUB_*
FORCE_COLOR
allowlist_externals = uv
commands =
uv run --active --frozen pytest
uv run --active --frozen coverage report
"""
[tool.uv]
cache-keys = [
{ file = "pyproject.toml" },
{ git = { commit = true, tags = true } },
]
constraint-dependencies = ["pygments>=2.20.0"]
[tool.uv-dynamic-versioning]
bump = true
fallback-version = "0.0.0"
style = "pep440"
vcs = "git"