forked from beancount/fava
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
194 lines (177 loc) · 6.14 KB
/
pyproject.toml
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
[project]
name = "fava"
dynamic = ["version"]
description = "Web interface for the accounting tool Beancount."
readme = "README.rst"
requires-python = ">=3.9"
license = {text = "MIT License"}
authors = [
{name = "Dominik Aumayr", email = "[email protected]"}
]
maintainers = [
{name = "Jakob Schnitzer", email = "[email protected]"}
]
keywords = ["fava", "beancount", "accounting",]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Flask",
"Intended Audience :: Education",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Financial and Insurance Industry",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: JavaScript",
"Programming Language :: Python :: 3 :: Only",
"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",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Office/Business :: Financial :: Accounting",
"Topic :: Office/Business :: Financial :: Investment",
]
dependencies = [
"Babel>=2.11,<3",
"Flask-Babel>=1,<5",
"Flask>=2.2,<4",
"Jinja2>=3,<4",
"Werkzeug>=2.2,<4",
"beancount>=2.3.5,<3",
"cheroot>=8,<11",
"click>=7,<9",
"markdown2>=2.3.0,<3",
"ply",
"simplejson>=3.16.0,<4",
"watchfiles>=0.20.0",
]
[project.urls]
Homepage = "https://beancount.github.io/fava/"
Changelog = "https://beancount.github.io/fava/changelog.html"
Source = "https://github.com/beancount/fava/"
Issues = "https://github.com/beancount/fava/issues/"
Chat = "https://gitter.im/beancount/fava"
[project.scripts]
fava = "fava.cli:main"
[project.optional-dependencies]
# Extra dependencies that are needed for the export to excel.
excel =[
"pyexcel>=0.5",
"pyexcel-ods3>=0.5",
"pyexcel-xlsx>=0.5",
]
# Extra dependencies that are used in tests or for linting.
dev = [
"build",
"furo",
"mypy",
"pre-commit",
"pyinstaller",
"pylint",
"pytest",
"pytest-cov",
"setuptools",
"sphinx",
"sphinx-autodoc-typehints",
"tox",
"tox-uv",
"twine",
"types-setuptools",
"types-simplejson",
]
# Pin some lower bounds for transitive dependencies in the old_deps tests
# This a basically determined by increasing them until getting a combination that runs.
old_deps_pins = [
"bottle>=0.12.20", # older ones didn't build
"importlib_metadata>=3.6",
"jaraco-functools>=4",
"lxml>=5.3.0", # older ones don't have wheels for recent Python versions
"more-itertools>=6",
"pytest>=7.2", # also used for running the tests of Fava, needs to somewhat recent
"python-dateutil>=2",
"pytz>=2020",
"setuptools>=67",
"six>=1.16",
]
[build-system]
requires = ["setuptools>=67", "setuptools_scm>=8.0", "Babel>=2.7,<3", "wheel"]
build-backend = "_build_backend"
backend-path = ["."]
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools_scm]
[tool.black]
line-length = 79
preview = true
[tool.mypy]
mypy_path = "stubs"
strict = true
[tool.pylint.'messages control']
disable = [
"too-few-public-methods",
"too-many-branches", # is checked by ruff (PLR0912)
"too-many-instance-attributes",
"too-many-locals", # is checked by ruff (PLR0914)
"duplicate-code",
"unused-argument", # is checked by ruff (ARG001)
"stop-iteration-return",
"invalid-unary-operand-type", # type-checking like, had false-positives
"not-an-iterable", # type-checking like, had false-positives
"unsubscriptable-object", # type-checking like, had false-positives
"broad-except", # is checked by ruff (BLE)
"too-many-return-statements", # is checked by ruff (PLR0911)
"too-many-arguments", # is checked by ruff (PLR0913)
"too-many-positional-arguments", # is checked by ruff (PLR0917)
"redefined-builtin", # is checked by ruff (A002)
"protected-access", # is checked by ruff (SLF001)
"invalid-name", # is checked by ruff (N)
"missing-docstring", # is checked by ruff (D)
"redefined-outer-name", # false positives for pytest fixtures
]
[tool.pytest.ini_options]
filterwarnings = "ignore:.*locked_cached_property.*deprecated:DeprecationWarning"
[tool.ruff]
target-version = "py39"
preview = true
line-length = 79
[tool.ruff.lint]
extend-select = [
"ALL",
]
extend-ignore = [
"ANN401", # allow `typing.Any`
"C901", # ignore mccabe complecity for now
"CPY", # no copyright notices in all files
"COM812", # better handled by formatter - avoid having trailing commas everywhere
"DOC201", # allow returns not to be documented for now
"DOC501", # allow raised exception not to be documented for now
"DOC502", # allow documented exceptions that are not explicitly raised
"D105", # allow magic methods to be undocumented
"D107", # allow __init__ to be undocumented - the class should be.
"PD", # pandas-related, has false-positives
"PERF203", # allow try-except in loop; zero-cost since Python 3.11
"PLR2004", # allow magic constants in comparisons
"PLR6301", # allow methods that do not use self
"S404", # This is a bit over-zelous on subprocess
"S603", # This is a bit over-zelous on subprocess.run
]
[tool.ruff.lint.flake8-type-checking]
strict = true # always move type-only imports to TYPE_CHECKING-if blocks
[tool.ruff.lint.isort]
force-single-line = true
order-by-type = false
known-first-party = ["fava"]
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pylint]
max-args = 9
[tool.ruff.lint.per-file-ignores]
"contrib/**" = ["D", "INP"]
"docs/**" = ["D", "INP"]
"tests/conftest.py" = ["S101"]
"tests/test_*.py" = ["D", "PLC2701", "S101", "SLF001"]
"tests/data/import_config.py" = ["D", "INP"]
"src/fava/core/filters.py" = ["D"]