-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
271 lines (247 loc) · 5.86 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
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
[tool.poetry]
name = "toggl-api-wrapper"
version = "1.3.0"
description = "Simple Toggl API wrapper for non-premium features."
authors = ["David Kasakaitis <[email protected]>"]
license = "MIT"
readme = "docs/README.md"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Internet",
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: MIT License",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Natural Language :: English",
"Typing :: Typed",
]
packages = [{ include = "toggl_api" }, { include = "toggl_api/py.typed" }]
[tool.poetry.scripts]
clean-toggl-account = "scripts.clean_account:main"
[tool.poetry.urls]
"Homepage" = "https://ddkasa.github.io/toggl-api-wrapper/"
"Documentation" = "https://ddkasa.github.io/toggl-api-wrapper/api-guide/index.html"
"Source" = "https://github.com/ddkasa/toggl-api-wrapper"
"Bug Tracker" = "https://github.com/ddkasa/toggl-api-wrapper/issues"
"Changelog" = "https://ddkasa.github.io/toggl-api-wrapper/CHANGELOG.html"
"Coverage" = "https://app.codecov.io/gh/ddkasa/toggl-api-wrapper"
[tool.poetry.dependencies]
python = "^3.10"
httpx = "^0.27.0"
sqlalchemy = { version = "^2.0.30", optional = true }
[tool.poetry.extras]
sqlite = ["sqlalchemy"]
[tool.poetry.group.dev.dependencies]
pytest = "^8.2.0"
pytest-env = "^1.1.3"
pytest-order = "^1.2.1"
coverage = "^7.5.1"
tox-gh-actions = "^3.2.0"
pytest-httpx = "^0.30.0"
pytest-sqlalchemy-mock = "^0.1.6"
faker = "^25.2.0"
pytest-reportlog = "^0.4.0"
pytest-cov = "^5.0.0"
pytest-replay = "^1.5.2"
pytest-rerunfailures = "^14.0"
pytest-dependency = "^0.6.0"
[tool.poetry.group.docs.dependencies]
mkdocs = "^1.6.0"
mkdocs-callouts = "^1.13.2"
pymdown-extensions = "^10.8.1"
markdown = "^3.6"
markdown-callouts = "^0.4.0"
mdx-gh-links = "^0.4"
mkdocs-click = "^0.8.1"
mkdocs-redirects = "^1.2.1"
mkdocs-autorefs = "^1.0.1"
mkdocs-literate-nav = "^0.6.1"
mkdocstrings = { extras = ["python"], version = "^0.25.1" }
mkdocs-simple-hooks = "^0.1.5"
mkdocs-material = "^9.5.24"
mkdocs-glightbox = "^0.4.0"
mkdocs-mermaid2-plugin = "^1.1.1"
mkdocs-macros-plugin = "^1.0.5"
pygments = "^2.18.0"
mkdocs-panzoom-plugin = "^0.1.1"
git-cliff = "^2.6.1"
[tool.poetry.group.types.dependencies]
types-sqlalchemy = "^1.4.53.38"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".mypy_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"build",
"dist",
"venv",
]
line-length = 120
indent-width = 4
target-version = "py312"
[tool.ruff.lint]
preview = true
select = [
"F",
"E",
"W",
"C90",
"I",
"N",
"UP",
"YTT",
"ASYNC",
"S",
"BLE",
"FBT",
"B",
"A",
"COM",
"C4",
"DTZ",
"T10",
"DJ",
"EM",
"EXE",
"FA",
'ISC',
"ICN",
"G",
'INP',
'PIE',
"T20",
'PYI',
'PT',
"Q",
"RSE",
"RET",
"SLF",
"SLOT",
"SIM",
"TID",
"TCH",
"INT",
"PTH",
"ERA",
"PD",
"PGH",
"PL",
"TRY",
"FLY",
"NPY",
"AIR",
"PERF",
"FURB",
"LOG",
"RUF",
]
ignore = [
"S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"SIM102", # Sometimes it's better to nest
"UP007", # Useless `typing` imports
"N802",
"PLW2901",
"UP017", # Python 3.10 backwards compatibility
"PLR6301", # Class Method Suggestion
"S311", # Unsafe pseudo-random generator
]
# 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.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint.per-file-ignores]
"docs/examples/*" = ["INP001", "T201"]
[tool.mypy]
ignore_missing_imports = true
[tool.pytest.ini_options]
markers = [
"unit: Basic unit tests using local cache.",
"integration: Tests that actively use the API.",
"slow: Tests that are slow to run or have delays included.",
]
testpaths = ["tests"]
addopts = "--report-log=logs/pytest.jsonl --cov --cov-append --cov-report xml"
[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = True
envlist = ruff, mypy, py312, py311, py310, py313
[testenv]
skip_install = true
passenv = *
setenv =
GH_ACTION = "True"
TOGGL_WORKSPACE_ID = {env:TOGGL_WORKSPACE_ID}
TOGGL_API_TOKEN = {env:TOGGL_API_TOKEN}
PYTHONPATH = {toxinidir}
allowlist_externals = poetry
commands_pre =
poetry install --without=docs
commands =
poetry run pytest {posargs}
[gh-actions]
python =
3.10: py310
3.11: py311
3.12: ruff, mypy, py312
3.13: py313
[testenv:mypy]
allowlist_externals = mypy, poetry
basepython = python3.12
commands = mypy toggl_api
[testenv:ruff]
allowlist_externals = ruff, poetry
basepython = python3.12
commands = ruff check toggl_api
"""
[tool.coverage.run]
omit = [
"*/tests/*",
"*/.venv/*",
"*/.mypy_cache/*",
"*/.ruff_cache/*",
"*/.pytest_cache/*",
"docs/*",
"scripts/*",
"*/.github/*",
"*/.tox/*",
"*/.git/*",
]
[tool.coverage.report]
exclude_also = [
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"except ImportError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]