-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
216 lines (182 loc) · 5.54 KB
/
pyproject.toml
File metadata and controls
216 lines (182 loc) · 5.54 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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
[project]
name = "mxdev"
description = "Enable to work with Python projects containing lots of packages, of which you only want to develop some."
dynamic = ["version", "readme"]
keywords = ["pip", "vcs", "git", "development"]
authors = [
{name = "MX Stack Developers", email = "dev@bluedynamics.com" }
]
requires-python = ">=3.10"
license = { text = "BSD 2-Clause License" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"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",
"Programming Language :: Python :: 3.14",
]
dependencies = ["packaging"]
[project.optional-dependencies]
mypy = []
test = [
"pytest",
"pytest-cov",
"pytest-mock",
"httpretty",
"coverage[toml]",
]
[project.urls]
Homepage = "https://github.com/mxstack/mxdev"
"Bug Reports" = "https://github.com/mxstack/mxdev/issues"
Source = "https://github.com/mxstack/mxdev/"
[project.scripts]
mxdev = "mxdev.main:main"
[project.entry-points."mxdev.workingcopytypes"]
svn = "mxdev.vcs.svn:SVNWorkingCopy"
git = "mxdev.vcs.git:GitWorkingCopy"
gitsvn = "mxdev.vcs.gitsvn:GitSVNWorkingCopy"
hg = "mxdev.vcs.mercurial:MercurialWorkingCopy"
bzr = "mxdev.vcs.bazaar:BazaarWorkingCopy"
fs = "mxdev.vcs.filesystem:FilesystemWorkingCopy"
darcs = "mxdev.vcs.darcs:DarcsWorkingCopy"
[build-system]
requires = ["hatchling", "hatch-vcs", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "src/mxdev/_version.py"
[tool.hatch.build.targets.wheel]
packages = ["src/mxdev"]
[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
"/example",
"/README.md",
"/CONTRIBUTING.md",
"/CHANGES.md",
"/LICENSE.md",
"/RELEASE.md",
"/pyproject.toml",
]
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.md"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
text = "\n\n---\n\n"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "CONTRIBUTING.md"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
text = "\n\n---\n\n"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "CHANGES.md"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
text = "\n\n---\n\n"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "LICENSE.md"
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q"
testpaths = [
"tests",
]
[tool.isort]
profile = "plone"
force_alphabetical_sort = true
force_single_line = true
lines_after_imports = 2
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
# Enable pycodestyle (E/W), pyflakes (F), and pyupgrade (UP) rules
# Note: isort (I) rules are disabled because we use isort directly
select = ["E", "W", "F", "UP", "D"]
# Ignore specific rules that conflict with our style or are too strict
ignore = [
"D100", "D101", "D102", "D103", "D104", "D105", "D106", "D107", # Missing docstrings
"D202", # No blank lines allowed after function docstring
"D205", # 1 blank line required between summary line and description
"D301", # Use r""" if any backslashes in a docstring
"D400", # First line should end with a period
"D401", # First line should be in imperative mood
"D415", # First line should end with a period, question mark, or exclamation point
]
[tool.ruff.format]
# Use tabs instead of spaces (if needed), but default is spaces
quote-style = "double"
indent-style = "space"
[tool.ruff.lint.per-file-ignores]
# Ignore unused variables in tests (often used for mocking)
"tests/**/*.py" = ["F841"]
[tool.mypy]
ignore_missing_imports = true
[tool.flake8]
# Note: flake8 is now largely replaced by ruff, but keeping config for compatibility
# Excludes for docstring rules (now handled by ruff)
ignore = "D100,D101,D102,D103,D104,D105,D106,D107,D202,D205"
statistics = 1
max-line-length = 120
[tool.doc8]
# Using 120 character line length to match ruff configuration
ignore = "D001"
[tool.coverage.run]
source = ["src"]
branch = true
parallel = true
relative_files = true
omit = [
"*/tests/*",
"*/_version.py",
"*/vcs/__init__.py",
]
[tool.coverage.paths]
source = [
"src",
".tox/*/lib/python*/site-packages",
".tox/*/Lib/site-packages",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if __name__ == .__main__.:",
"raise AssertionError",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"@abstractmethod",
]
precision = 2
show_missing = true
skip_covered = false
[tool.coverage.html]
directory = "htmlcov"
[tool.tox]
requires = ["tox>=4", "tox-uv>=1"]
env_list = ["lint", "py310", "py311", "py312", "py313", "py314"]
[tool.tox.env_run_base]
description = "Run tests with pytest and coverage"
runner = "uv-venv-runner"
uv_resolution = "highest"
pass_env = ["LC_ALL", "LANG", "HOME"]
commands = [
["uv", "pip", "install", "-e", ".[test]"],
["coverage", "run", "-m", "pytest", "{posargs:tests}"]
]
[tool.tox.env.lint]
description = "Run pre-commit hooks for linting"
runner = "uv-venv-runner"
commands = [
["python", "-m", "pre_commit", "run", "{posargs:--all}"]
]
deps = ["pre-commit>=1.20.0"]