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
155 lines (130 loc) · 4.46 KB
/
pyproject.toml
File metadata and controls
155 lines (130 loc) · 4.46 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
[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.10"
dependencies = [
"pygit2 >= 1.14.1",
]
[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"]
pyqt6 = ["pyqt6"]
# WARNING: PyQt5 support is deprecated and will be removed soon
pyqt5 = ["pyqt5"]
pyside6 = ["PySide6 >= 6.9"]
pygments = ["pygments >= 2.12"] # syntax highlighting
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']
# E501: line too long
# F403: star imports
# F405: star imports
# C901: too complex
# B028: no explicit stacklevel (warnings.warn)
ignore = ['E501', 'F403', 'F405', 'C901', 'B028']
[tool.ruff.lint.per-file-ignores]
# F401: unused import
'gitfourchette/porcelain.py' = ['F401']
'gitfourchette/qt.py' = ['F401']
'**/__init__.py' = ['F401']