-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
157 lines (136 loc) · 4.15 KB
/
pyproject.toml
File metadata and controls
157 lines (136 loc) · 4.15 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
[project]
name = "qgis-plugin-dev-tools"
dynamic = ["version", "readme"]
description = "QGIS plugin development and packaging tools, which make managing runtime dependencies easy."
requires-python = ">=3.10"
license = { text = "GNU GPL v3.0" }
authors = [{ name = "National Land Survey of Finland", email = "os@nls.fi" }]
keywords = ["qgis"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Build Tools",
"Typing :: Typed",
]
dependencies = [
"packaging>=21.0",
"tomli>=2.0.0",
"python-dotenv>=0.19.0",
"importlib-metadata>=4.9.0",
"requests>=2.27.0",
"lxml>=4.9.0",
]
[project.urls]
Homepage = "https://github.com/nlsfi/qgis-plugin-dev-tools"
Changelog = "https://github.com/nlsfi/qgis-plugin-dev-tools/blob/main/CHANGELOG.md"
[project.scripts]
qpdt = "qgis_plugin_dev_tools.cli:run"
qgis-plugin-dev-tools = "qgis_plugin_dev_tools.cli:run"
[tool.uv]
default-groups = ["dev", "lint"]
[dependency-groups]
dev = [
"pytest==6.2.5",
"pytest-cov==4.1.0",
"coverage[toml]==7.6.1",
"pytest-mock==3.7.0",
]
lint = [
"pre-commit==4.5.1",
"mypy==1.19.1",
"ruff==0.15.5",
"virtualenv==20.26.3",
"PyYAML==6.0.2",
"typing-extensions==4.12.2",
# flake8 libraries not included in ruff
"flake8==7.3.0",
"flake8-pyproject==1.2.3",
"flake8-spellcheck==0.28.0",
"flake8-qgis==1.0.0",
# requests types
"types-requests==2.28.11.2",
]
[tool.setuptools]
package-dir = { "" = "src" }
[tool.setuptools.dynamic]
version = { attr = "qgis_plugin_dev_tools.__version__" }
readme = { file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown" }
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
qgis_plugin_dev_tools = ["py.typed"]
[tool.ruff]
target-version = "py310"
line-length = 88
lint.ignore = [
"ANN101", # Missing type annotation for self in method
"PLC0415", # Import should be at the top-level of a file
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
]
# List of all rules https://docs.astral.sh/ruff/rules/
lint.select = [
"ANN", # flake8-annotations
"B", # flake8-bugbear
"C", # flake8-comprehensions
"C90", # flake8, mccabe
"E", # flake8, pycodestyle
"F", # flake8, Pyflakes
"I", # isort
"INP", # flake8-no-pep420
"N", # pep8-naming
"PIE", # flake8-pie
"PGH", # pygrep-hooks
"PL", # pylint
"PT", # flake8-pytest-style
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
"T", # flake8-print
"ICN", # flake8-import-conventions
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"W", # flake8, pycodestyle
"UP", # pyupgrade
]
# Avoiding flagging (and removing) `SC200` from any `# noqa`
# directives, despite Ruff's lack of support for `flake8-spellcheck`.
lint.external = ["SC200", "QGS"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.per-file-ignores]
"test*" = [
"INP001",
"ANN201", # Missing return type annotation for public function
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
]
".github/workflows/*" = [
"ALL"
]
[tool.flake8]
max-line-length = 88
spellcheck-targets = "names"
dictionaries = "en_US,python,technical"
select = ["SC", "QGS"]
extend-ignore = [
"E203", # whitespace before ':'
"E501", # line length (checked by ruff now, possible mismatches)
]
per-file-ignores = [
"test/*:INP001,SC200",
]
[tool.mypy]
python_version = "3.10"
follow_imports = "normal"
show_column_numbers = true
[tool.pytest.ini_options]
minversion = "6.0"
[build-system]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"