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
134 lines (114 loc) · 3.95 KB
/
pyproject.toml
File metadata and controls
134 lines (114 loc) · 3.95 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
[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.15.1 is strongly recommended to be able to use all features,
# but we're maintaining backwards compatibility with 1.14.1 for now.
"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"
[project.optional-dependencies]
test = ["pytest", "pytest-qt", "pytest-cov", "pytest-xdist", "ruff"]
pyqt6 = ["pyqt6"]
pyqt5 = ["pyqt5"]
pyside6 = ["PySide6 >= 6.9"]
pygments = ["pygments >= 2.12"] # syntax highlighting
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"
#------------------------------------------------------------------------------
# Coverage
[tool.coverage.run]
source = [
"gitfourchette/",
]
omit = [
"gitfourchette/**/__main__.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/toolbox/qbusyspinner.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\\(",
# 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_.+:",
"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"
[tool.ruff.lint]
extend-select = ['W', 'E', 'F', 'C', 'N9', 'B', 'U']
# E203: whitespace before ':'
# E221: multiple spaces before operator
# E501: line too long
# F403: star imports
# F405: star imports
# C901: too complex
ignore = ['E203', 'E221', 'E501', 'F403', 'F405', 'C901', 'B028']
exclude = ['gitfourchette/forms/ui_*.py']
[tool.ruff.lint.per-file-ignores]
'gitfourchette/porcelain.py' = ['F401']
'gitfourchette/qt.py' = ['F401']
'**/__init__.py' = ['F401']