forked from vkbo/novelWriter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
177 lines (158 loc) · 4.97 KB
/
Copy pathpyproject.toml
File metadata and controls
177 lines (158 loc) · 4.97 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
[build-system]
requires = ["setuptools>=77.0.3"]
build-backend = "setuptools.build_meta"
[project]
name = "novelWriter"
authors = [{ name = "Veronica Berglyd Olsen", email = "code@vkbo.net" }]
description = "A plain text editor for planning and writing novels"
readme = { file = "setup/description_pypi.md", content-type = "text/markdown" }
license = "GPL-3.0-or-later AND Apache-2.0 AND CC-BY-4.0 AND ISC"
license-files = ["LICENSE.md", "setup/LICENSE-Apache-2.0.txt"]
dynamic = ["version"]
requires-python = ">=3.11"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Development Status :: 5 - Production/Stable",
"Operating System :: OS Independent",
"Intended Audience :: End Users/Desktop",
"Natural Language :: English",
"Topic :: Text Editors",
]
dependencies = [
"pyqt6>=6.4",
"pyenchant>=3.3.0",
"pyobjc; sys_platform == 'darwin'",
]
[dependency-groups]
dev = [
{ include-group = "build" },
{ include-group = "docs" },
{ include-group = "test" },
{ include-group = "lint" },
]
build = ["build", "setuptools>=77.0.3"]
docs = [
"docutils>=0.17.1",
"pygments>=2.7",
"sphinx-book-theme",
"sphinx-copybutton",
"sphinx-design",
"sphinx-favicon",
"sphinx-intl",
"sphinx>=5.0",
]
test = ["coverage>=7.2.0", "pytest-qt", "pytest-timeout", "pytest>=6.0.0"]
lint = ["pyright", "ruff"]
[project.urls]
Homepage = "https://novelwriter.io"
Documentation = "https://docs.novelwriter.io"
Repository = "https://github.com/vkbo/novelWriter"
Issues = "https://github.com/vkbo/novelWriter/issues"
[project.gui-scripts]
novelwriter = "novelwriter:main"
[tool.setuptools.dynamic]
version = { attr = "novelwriter.__init__.__version__" }
[tool.setuptools.packages.find]
include = ["novelwriter*"]
[tool.setuptools.package-data]
novelwriter = ["assets/**/*"]
[tool.ruff]
line-length = 120
[tool.ruff.lint]
preview = true
# Rules: https://docs.astral.sh/ruff/rules
select = [
"A", # flake8-builtins (A)
"ANN", # flake8-annotations (ANN)
"B", # flake8-bugbear (B)
"C4", # flake8-comprehensions (C4)
"CPY", # flake8-copyright (CPY)
"D", # pydocstyle (D)
"E", # pycodestyle (E)
"F", # Pyflakes (F)
"FA", # flake8-future-annotations (FA)
"G", # flake8-logging-format (G)
"I", # isort (I)
"ISC", # flake8-implicit-str-concat (ISC)
"LOG", # flake8-logging (LOG)
"PERF", # Perflint (PERF)
"PIE", # flake8-pie (PIE)
"PLC", # Pylint Convention (PLC)
"PLE", # Pylint Error (PLE)
"PLR17", # Refactor (PLR) - Only PLR17xx
"PLW", # Pylint Warning (PLW)
"PT", # flake8-pytest-style (PT)
"Q", # flake8-quotes (Q)
"RET", # flake8-return (RET)
"RUF", # Ruff-specific rules (RUF)
"SIM", # flake8-simplify (SIM)
"SLF", # flake8-self (SLF)
"SLOT", # flake8-slots (SLOT)
"TC", # flake8-type-checking (TC)
"TID", # flake8-tidy-imports (TID)
"UP", # pyupgrade (UP)
"W", # pycodestyle (W)
]
ignore = [
"ANN401", # any-type
"D107", # undocumented-public-init
"D203", # incorrect-blank-line-before-class
"D205", # missing-blank-line-after-summary
"D213", # multi-line-summary-second-line
"PLC0415", # import-outside-top-level
"PLC1901", # compare-to-empty-string
"PLW0108", # unnecessary-lambda
"PLW0717", # too-many-statements-in-try-clause
"PLW2901", # redefined-loop-name
"RET505", # superfluous-else-return
"RUF001", # ambiguous-unicode-character-string
"RUF015", # unnecessary-iterable-allocation-for-first-element
"RUF067", # non-empty-init-module
"RUF076", # pytest-fixture-autouse
"SIM108", # if-else-block-instead-of-if-exp
"UP015", # redundant-open-modes
"UP030", # format-literals
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["ANN", "D101", "D102", "D105", "PLC2701", "RUF069", "SLF", "TC"]
"utils/*" = ["ANN", "SLF", "TC"]
[tool.ruff.lint.pydocstyle]
ignore-decorators = [
"abc.abstractmethod",
"property",
"PyQt6.QtCore.pyqtProperty",
"typing.overload",
"pytest.fixture",
]
[tool.ruff.lint.isort]
lines-between-types = 1
forced-separate = ["tests"]
[tool.ruff.lint.pylint]
max-nested-blocks = 10
[tool.ruff.format]
quote-style = "double"
[tool.pyright]
include = ["novelwriter"]
reportIncompatibleMethodOverride = false
pythonVersion = "3.11"
[tool.pytest.ini_options]
addopts = "--import-mode=importlib"
log_level = "DEBUG"
qt_api = "pyqt6"
markers = [
"base: Base classes tests",
"core: Core classes tests",
"gui: GUI classes tests",
"opt_assets: Include optional asset tests",
]
[tool.coverage.run]
branch = false
source = ["novelwriter"]
[tool.coverage.report]
precision = 2
exclude_also = ["if TYPE_CHECKING:"]