-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
189 lines (164 loc) · 5.52 KB
/
pyproject.toml
File metadata and controls
189 lines (164 loc) · 5.52 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
# SPDX-License-Identifier: FSFAP
# Copyright (C) 2020-2023 Andrew Rechnitzer
# Copyright (C) 2020-2025 Colin B. Macdonald
# Copyright (C) 2021 Nicholas J H Lai
# Copyright (C) 2022 Elizabeth Xiao
# Copyright (C) 2022 Natalia Accomazzo Scotti
# Copyright (C) 2022-2024 Edith Coates
# Copyright (C) 2023 Julian Lapenna
# Copyright (C) 2023 Divy Patel
# Copyright (C) 2023 Natalie Balashov
# Copyright (C) 2024 Bryan Tanady
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
[build-system]
requires = ['pip>=20.3', 'setuptools>=61', 'wheel']
build-backend = 'setuptools.build_meta'
[project]
name = 'plom-client'
description = 'The client marking tool for Plom'
authors = [
{name = 'Andrew Rechnitzer'},
{name = 'Colin B. Macdonald'},
]
# TODO: maybe Python 3.8 is blocking the new format?
# license = "AGPL-3.0-or-later"
license = {text = 'AGPLv3+'}
classifiers=[
"Topic :: Education :: Testing",
"Development Status :: 3 - Alpha",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dynamic = ['version']
requires-python = '>=3.8'
# pyopenssl is not a direct dependency but old versions caused trouble: Issue #3150
dependencies = [
"arrow>=1.1.1",
"cryptography>=41.0.3",
'importlib_resources>=5.0.7 ; python_version<"3.9"', # until we drop 3.8
"packaging",
"Pillow>=7.0.0", # Consider >=10.2 for Issue #3216
"platformdirs>=3.0.0",
"pyspellchecker>=0.8.1",
"pytest>=6.0.0",
"pytest-qt>=4.1.0",
"PyQt6>=6.4.0", # needed for QFormLayout.setRowVisible, 6.4.2 available in Debian 12
"requests",
"requests-toolbelt",
"stdiomask>=0.0.6",
'tomli>=2.0.1 ; python_version<"3.11"', # until we drop 3.10
"tomlkit>=0.11.7",
]
readme = {file = 'README.md', content-type = 'text/markdown'}
[project.urls]
Homepage = "https://plomgrading.org/"
Repository = "https://gitlab.com/plom/plom-client"
'Bug Tracker' = "https://gitlab.com/plom/plom-client/-/issues"
Documentation = "https://plom.readthedocs.org"
Changelog = "https://gitlab.com/plom/plom-client/-/blob/main/CHANGELOG.md"
# [project.optional-dependencies]
# [tool.setuptools]
# zip-safe = true
[tool.setuptools]
packages = [
"plomclient",
"plomclient.client",
"plomclient.client.ui_files",
"plomclient.client.tools",
"plomclient.client.icons",
"plomclient.client.cursors",
"plomclient.client.help_img",
"plomclient.messenger",
]
# somewhat deprecated? not supposed to package things into share?
# https://blog.raek.se/2022/10/31/os-integration-files-in-python-packages/u
[tool.setuptools.data-files]
"share/applications" = ["org.plomgrading.PlomClient.desktop"]
"share/metainfo" = ["org.plomgrading.PlomClient.metainfo.xml"]
"share/icons/hicolor/128x128/apps" = ["org.plomgrading.PlomClient.png"]
[tool.setuptools.dynamic]
version = {attr = 'plomclient.client.__version__'}
[project.scripts]
plom-client = "plomclient.client.__main__:main"
# Tooling configuration
[tool.black]
line-length = 88
target-version = ["py38"]
[tool.pylint.main]
extension-pkg-allow-list = ["PyQt6"]
generated-members = []
# order matters: need errors-only before disable
errors-only = true
output-format = "colorized"
ignored-modules = []
[tool.coverage.report]
# our CI runs /usr/local stuff for some reason
# python*.py errors need -i or config match here
omit = ["*/test_*", "/usr/*", "*/config*"]
[tool.pytest.ini_options]
qt_api = "pyqt6"
[tool.djlint]
# TODO: fix then remove from ignore list: H006, H013
ignore="H006,H013,H021,H023,H030,H031"
# indent=2
[tool.mypy]
# pretty = true
exclude = []
# These avoid mypy errors: mostly libraries that don't yet have typing
# Maintenance: try removing X, removing .mypy_cache, uninstalling types-X, and rerunning mypy locally
[[tool.mypy.overrides]]
module = [
'importlib_resources',
'requests_toolbelt',
'stdiomask',
]
ignore_missing_imports = true
# hide some things from mypy
# - tool.py has pyqtProperty stuff that is also confusing to me
[[tool.mypy.overrides]]
module = [
'plomclient.client.tools.tool',
]
ignore_errors = true
[tool.pyright]
pythonVersion = "3.12"
exclude = []
# changing to "off" makes this much quieter
typeCheckingMode = "basic"
# lots of Django false positives?
reportAttributeAccessIssue = false
[tool.codespell]
skip = "*.po,*.ts,*.pdf,*.png,*.jpg,*.svg,*.csv,*.json,.git"
count = true
check-filenames = true
check-hidden = true
quiet-level = 3
ignore-words = ".codespell-ignorewords"
exclude-file = ".codespell-ignorelines"
[tool.ruff.lint]
# enable docstring checking and import reordering
# select = ["D", "I"] # TODO: later?
select = ["D"]
# D107: perhaps init methods don't need docstrings
# D100: public module docstrings: seem to get a lot of false positives
# D10x: most of these are about missing docstrings
ignore = ["D107", "D100", "D101", "D102", "D103", "D104", "D106"]
exclude = []
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
# F401: defining __all__ might be right fix
# E402, I001: re-ordering causes circular imports
'__init__.py' = ['F401', 'E402', 'I001']
# tests don't need docstrings
'plom*/**/test*.py' = ['D100', 'D101', 'D102', 'D103', 'D104']