-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
111 lines (98 loc) · 2.83 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
#-->> System <<--------------------------------------------
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
#-->> Metadata <<------------------------------------------
[tool.poetry]
name = "rearwing"
version = "0.7.0"
description = "Slick Telemetry backend written in python with fastapi"
authors = ["Slick Telemetry <[email protected]>"]
readme = "README.md"
#-->> Dependencies <<--------------------------------------
# Main dependencies (required by application)
[tool.poetry.dependencies]
fastapi = "^0.115.3"
fastf1 = "3.4.3"
gunicorn = "^23.0.0"
newrelic = "^10.2.0"
python = "3.12.7"
python-dotenv = "^1.0.1"
uvicorn = { extras = ["standard"], version = "^0.32.0" }
uvicorn-worker = "^0.2.0"
# Development (common) dependencies
[tool.poetry.group.dev.dependencies]
commitizen = "*"
pre-commit = "*"
poethepoet = "*"
# Formatting dependencies
[tool.poetry.group.lint]
optional = true
[tool.poetry.group.lint.dependencies]
black = "*"
isort = "*"
mypy = "*"
pylint = "*"
pyproject-autoflake = "*"
# Testing dependencies
[tool.poetry.group.test]
optional = true
[tool.poetry.group.test.dependencies]
httpx = "*"
pytest = "*"
#-->> Scripts <<-------------------------------------------
[tool.poe.tasks]
autoflake = "pautoflake run.py app"
black = "black run.py app"
isort = "isort run.py app"
formatters = ["autoflake", "isort", "black"]
git-hooks-setup = "pre-commit install --hook-type commit-msg --hook-type pre-push --hook-type pre-commit"
git-hooks-update = "pre-commit autoupdate"
linters = ["pylint"]
pylint = "pylint run.py app"
# tests = "python run_tests.py"
typings = "mypy run.py app"
#-->> Configuration <<-------------------------------------
[tool.autoflake]
# return error code if changes are needed
check = false
# make changes to files instead of printing diffs
in-place = true
# exclude __init__.py when removing unused imports
ignore-init-module-imports = true
# remove all unused imports (not just those from the standard library)
remove-all-unused-imports = true
# remove unused variables
remove-unused-variables = true
# drill down directories recursively
recursive = true
[tool.black]
line-length = 120
target-version = ["py312"]
[tool.commitizen]
version = "0.7.0"
version_files = [
"app/__init__.py:__version__",
"pyproject.toml:version",
"VERSION",
]
update_changelog_on_bump = true
major_version_zero = true
[tool.isort]
profile = "black"
lines_after_imports = 2
line_length = 120
multi_line_output = 3
import_heading_stdlib = "Built-in"
import_heading_thirdparty = "External"
import_heading_firstparty = "Project"
import_heading_localfolder = "App"
[tool.mypy]
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
files = ["app/*.py"]
ignore_missing_imports = true
pretty = true
show_error_codes = true
show_error_context = true
warn_unreachable = true
warn_return_any = true