forked from jorio/gitfourchette
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
196 lines (168 loc) · 4.98 KB
/
Copy pathpyproject.toml
File metadata and controls
196 lines (168 loc) · 4.98 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
[build-system]
requires = ["setuptools >= 61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "gitfourchette"
dynamic = ["version"] # see [tool.setuptools.dynamic]
description = "The comfortable Git UI"
keywords = ["git"]
authors = [
{name = "Iliyas Jorio"},
]
classifiers = [
"Topic :: Software Development :: Version Control :: Git",
"Environment :: X11 Applications :: Qt",
"Intended Audience :: Developers",
]
readme = "README.md"
requires-python = ">= 3.12"
dependencies = [
"pygit2 >= 1.14.1",
"pygments >= 2.12",
]
[project.urls]
Homepage = "https://gitfourchette.org"
Documentation = "https://gitfourchette.org/guide"
Repository = "https://github.com/jorio/gitfourchette"
Issues = "https://github.com/jorio/gitfourchette/issues"
Changelog = "https://github.com/jorio/gitfourchette/blob/master/CHANGELOG.md"
[project.gui-scripts]
gitfourchette = "gitfourchette.__main__:main"
gitfourchette-askpass = "gitfourchette.forms.askpassdialog:main"
[project.scripts]
gitfourchette-mount = "gitfourchette.mount.treemount:main"
[project.optional-dependencies]
test = [
"pytest",
"pytest-qt",
"pytest-cov",
"pytest-xdist",
"ruff",
"mypy",
"types-Pygments",
]
pyqt6 = ["pyqt6"]
# WARNING: PyQt5 support is deprecated and will be removed soon
pyqt5 = ["pyqt5"]
pyside6 = ["PySide6 >= 6.9"]
mfusepy = ["mfusepy ~= 3.1.0"] # mount a git tree as FUSE filesystem
memory-indicator = ["psutil"]
[tool.setuptools]
package-dir = {gitfourchette = "gitfourchette"}
package-data = {"gitfourchette.assets" = ['**']}
exclude-package-data = {"gitfourchette.assets" = ['lang/*.po', 'lang/*.pot', '**/README.md']}
[tool.setuptools.dynamic]
version = {attr = "gitfourchette.appconsts.APP_VERSION"}
#------------------------------------------------------------------------------
# Tests
[pytest]
# Qt binding used by default for pytest configurations in PyCharm
# (including single-test configs generated by clicking the green arrow in the gutter).
# To override, set the PYTEST_QT_API environment variable.
qt_api = "pyqt6"
[tool.pytest.ini_options]
markers = [
"notParallelizableOnWindows: mark the test as using win32ctrlc, which is incompatible with pytest-xdist",
]
log_format = "%(levelname)-7s %(module)-16s%(lineno)4d | %(message)s"
#------------------------------------------------------------------------------
# Coverage
[tool.coverage.run]
source = [
"gitfourchette/",
]
omit = [
"gitfourchette/**/__main__.py",
"gitfourchette/exttools/win32ctrlc.py",
"gitfourchette/pycompat.py",
"gitfourchette/qt.py",
"gitfourchette/toolbox/excutils.py", # uncaught exception formatters (shouldn't be needed if all tests pass!)
"gitfourchette/toolbox/benchmark.py",
"gitfourchette/toolbox/memoryindicator.py",
"gitfourchette/forms/ui_*.py", # pyuic generated code
]
[tool.coverage.report]
precision = 1
skip_covered = false # don't report files that are 100% covered
skip_empty = true # skip files without executable code like __init__.py
# Regexes for lines to exclude from consideration
exclude_lines = [
# We're overriding the defaults, so add them back
"pragma: no cover",
# Don't complain about missing debug-only code:
"def __repr__",
"if self\\.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
"assert False",
"warnings\\.warn\\(",
"logger\\.warning\\(",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"if not APP_TESTMODE:",
"if APP_FREEZE_\\w+:",
"if APP_VERBOSEDEL:",
"if MACOS:",
"if WINDOWS:",
"if FLATPAK:",
"if not BRANCH_FOLDERS:",
"if not pygit2_version_at_least\\(",
"if qtIsNativeMacosStyle\\(",
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
]
[tool.coverage.html]
directory = "coverage_html_report"
#------------------------------------------------------------------------------
# Linting
[tool.ruff]
exclude = [
'gitfourchette/forms/ui_*.py',
'mfusepy.py',
]
[tool.ruff.lint]
extend-select = ['W', 'E', 'F', 'C', 'N9', 'B', 'U']
ignore = [
'B028',
'BLE001',
'C901',
'E501',
'F403',
'F405',
'I001',
'PIE808',
'PLC0415',
'PLR1730',
'PYI025',
'SIM105',
'SIM108',
'SIM114',
'SIM300',
]
[tool.ruff.lint.per-file-ignores]
# F401: unused import
'gitfourchette/porcelain.py' = ['F401']
'gitfourchette/qt.py' = ['F401']
'**/__init__.py' = ['F401']
#------------------------------------------------------------------------------
# Type checking
[tool.mypy]
files = [
"gitfourchette",
#"test",
]
show_column_numbers = true
show_error_codes = true
show_traceback = true
local_partial_types = true
strict_optional = false
check_untyped_defs = true
disallow_untyped_decorators = true
warn_unreachable = true
#warn_unused_ignores = true
[[tool.mypy.overrides]]
module = ["mfusepy", "psutil"]
ignore_missing_imports = true