-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
294 lines (262 loc) · 8.15 KB
/
pyproject.toml
File metadata and controls
294 lines (262 loc) · 8.15 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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
[project]
name = "stonks-overwatch"
version = "0.3.1.dev0"
description = "Stonks Overwatch"
authors = [{name = "Carlos Tasada", email = "carlos.tasada@gmail.com"}]
license = "MIT"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"degiro-connector[quotecast] >= 3.0.35",
"django >= 6.0.3",
"pycountry >= 26.2.16",
"currency-symbols >= 2.0.4",
"polars >=1.37.2",
"requests-cache >= 1.3.1",
"django-extensions >= 4.1.0",
"currencyconverter >= 0.18.15",
"django-node-assets >= 0.9.16",
"apscheduler >= 3.11.2",
"tzlocal >= 5.3.1",
"python-bitvavo-api >= 1.4.3",
"yfinance >= 1.2.0",
"iso10383 >=2025.2.10",
"requests >=2.32.4",
"ibind[oauth] >=0.1.22",
"cryptography >=46.0.4",
"packaging >=25.0",
"python-dateutil >=2.9.0.post0",
"markdown >=3.10.2",
"pyotp >= 2.9.0",
]
[project.optional-dependencies]
# Keep in sync with `tool.briefcase.app.stonks-overwatch.requires`
briefcase = [
"toga >=0.5.3",
"asgiref >= 3.11.1",
]
[tool.poetry.dependencies]
python = ">=3.13,<3.14"
[build-system]
requires = ["poetry-core>=2.3.1,<3.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.group.dev.dependencies]
ruff = ">=0.15.5"
pytest = ">=9.0.2"
pytest-cov = ">=7.0.0"
pytest-django = "^4.12.0"
pook = "^2.1.6"
pyinstrument = "^5.1.2"
licensecheck = "^2025.1.0"
pip-licenses = "^5.5.1"
briefcase = ">=0.4.1"
deptry = ">=0.24.0"
pre-commit = "^4.5.1"
bandit = "^1.9.4"
pymarkdownlnt = "^0.9.35"
pytest-asyncio = "^1.3.0"
[tool.poetry]
include = [
{ path = "Makefile", format = ["sdist", "wheel"] },
{ path = "CHANGELOG.md", format = ["sdist", "wheel"] },
{ path = "LICENSE", format = ["sdist", "wheel"] },
{ path = "THIRD_PARTY_LICENSES.txt", format = ["sdist", "wheel"] },
{ path = "package.json", format = ["sdist", "wheel"] },
{ path = "package-lock.json", format = ["sdist", "wheel"] },
{ path = "Dockerfile", format = ["sdist", "wheel"] },
{ path = "docker-compose.yml", format = ["sdist", "wheel"] },
{ path = "config/config.json.template", format = ["sdist", "wheel"] },
{ path = "src/stonks_overwatch/**/*.*", format = ["sdist", "wheel"] },
{ path = "src/icons/**/*.*", format = ["sdist", "wheel"] },
{ path = "src/scripts/**/*.*", format = ["sdist", "wheel"] },
{ path = "src/*.py", format = ["sdist", "wheel"] },
{ path = "src/*.sh", format = ["sdist", "wheel"] },
]
[tool.poetry.requires-plugins]
poetry-plugin-export = ">=1.10.0"
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
# Same as Black.
line-length = 120
indent-width = 4
target-version = "py313"
[tool.ruff.lint]
select = [
"C", # pylint convention
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"N", # PEP8 naming conventions
"W", # pylint warning
"DTZ", # flake8-datetimez (prevent naive datetime usage)
]
ignore = []
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.per-file-ignores]
# Ignore timezone-awareness rules in tests and scripts (they don't interact with Django models)
"tests/**/*.py" = ["DTZ"]
"scripts/**/*.py" = ["DTZ"]
[tool.ruff.lint.isort]
order-by-type = true
relative-imports-order = "closest-to-furthest"
extra-standard-library = ["typing"]
lines-after-imports = -1
lines-between-types = 0
combine-as-imports = true
force-single-line = false
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder", "testing"]
[tool.ruff.lint.isort.sections]
testing = ["django.test", "pytest", "pook", "unittest"]
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
#
# This is currently disabled by default, but it is planned for this
# to be opt-out in the future.
docstring-code-format = false
# Set the line length limit used when formatting code snippets in
# docstrings.
#
# This only has an effect when the `docstring-code-format` setting is
# enabled.
docstring-code-line-length = "dynamic"
[tool.coverage.run]
source = ['src/stonks_overwatch']
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "src.stonks_overwatch.settings"
pythonpath = [".", "src/stonks_overwatch", "src"]
testpaths = ["tests"]
python_files = [
"test_*.py"
]
addopts = [
'--import-mode=importlib',
]
[tool.briefcase]
project_name = "Stonks Overwatch"
bundle = "com.caribay"
url = "https://github.com/ctasada/stonks-overwatch"
license = {file = "LICENSE"}
author = "Carlos Tasada"
author_email = "ctasada@gmail.com"
# revision is injected during the build process: "git rev-parse --short HEAD"
[tool.briefcase.app.stonks-overwatch]
formal_name = "Stonks Overwatch"
description = "Stocks Porfolio Tracker"
long_description = """Stonks Overwatch is a new Stocks Dashboard.
Why do we need yet another dashboard? I have been a DeGiro user for many years, and the more active I was,
the more frustrated I became with the lack of any decent dashboard to overview my investments.
After trying different options (I will omit names), I couldn't find any that was really covering my needs, or
that I could trust.
Stonks Overwatch runs locally and doesn't share your data with anyone. Your data is yours
"""
icon = "src/icons/stonks_overwatch"
sources = [
"src/stonks_overwatch",
]
test_sources = [
"tests",
]
# Keep in sync with `project.optional-dependencies.briefcase`
requires = [
"toga >=0.5.3",
"std-nslog >=1.0.3",
"asgiref >= 3.11.0",
]
test_requires = [ ]
requirement_installer_args = ["--find-links", "./wheels"]
[tool.briefcase.app.stonks-overwatch.macOS]
universal_build = false
[tool.briefcase.app.stonks-overwatch.linux.flatpak]
# Toga's WebView only supports properly GTK, for with we need to install Gnome
# This avoids the need to manually add extensions to the manifest.
flatpak_runtime = "org.gnome.Platform"
flatpak_runtime_version = "49"
flatpak_sdk = "org.gnome.Sdk"
# Grant access to XDG directories for storing application data
flatpak_finish_args = [
"--filesystem=xdg-data/stonks-overwatch:create",
"--filesystem=xdg-config/stonks-overwatch:create",
"--filesystem=xdg-cache/stonks-overwatch:create",
]
[tool.briefcase.app.stonks-overwatch.windows]
use_full_install_path = false
[tool.pip-licenses]
format = "plain-vertical"
with-license-file = true
no-license-path = true
output-file = "THIRD_PARTY_LICENSES.txt"
order = "name"
# Ignore licenses for packages that are not distributed with the project.
# The development dependencies need to be manually maintained.
ignore-packages = [
"ruff",
"pytest",
"pytest-cov",
"pytest-django",
"pook",
"pyinstrument",
"licensecheck",
"pip-licenses",
"briefcase",
]
[tool.deptry]
extend_exclude = ["scripts"]
known_first_party = ["stonks_overwatch"]
[tool.deptry.per_rule_ignores]
# django-extensions are not actively used in the codebase, but it can be useful
# django-node-assets is used to simplify the management of NPM dependencies
DEP002 = ["django-extensions", "django-node-assets"]
[tool.bandit]
exclude_dirs = ["build", ".venv"]
#tests = ["B201", "B301"]
#skips = ["B101", "B601"]
[tool.pymarkdown]
plugins.md007.indent = 4
plugins.md013.enabled = false
plugins.md024.siblings_only = true
plugins.md026.enabled = false
plugins.md036.enabled = false