-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
147 lines (134 loc) · 2.67 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
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0"]
[tool.poetry]
authors = ["onerandomusername <me@arielle.codes>"]
description = "An API to provide information for python packages and modules."
license = "MIT"
name = "sage"
packages = [
{include = "sage", from = "src"},
]
readme = "README.md"
version = "0.1.0"
[tool.poetry.dependencies]
alembic = "^1.8.1"
asyncpg = "^0.27.0"
celery = "^5.2.7"
coloredlogs = "^15.0.1"
fastapi = "^0.87.0"
python = "^3.10"
python-multipart = "^0.0.5"
sqlalchemy = {extras = ["postgresql-asyncpg"], version = "^1.4.43"}
tomli = "^2.0.1"
uvicorn = {extras = ["standard"], version = "^0.19.0"}
[tool.poetry.group.dev.dependencies]
black = "==22.8"
isort = "^5.12.0"
pre-commit = "~=2.20.0"
pyright = "==1.1.278"
python-dotenv = "~=0.21.0"
ruff = "==0.0.150"
taskipy = "~=1.10.3"
[tool.poetry.group.tests.dependencies]
httpx = "^0.23.1"
pytest = "^7.2.0"
pytest-env = "^0.8.1"
[tool.ruff]
line-length = 100
select = [
"E", # pycodestyle
"F", # pyflakes
"W", # pycodestyle
"S", # bandit
"I", # isort # "RUF", # ruff specific exceptions
"ANN", # flake8-annotations
"B", # flake8-bugbear
"C", # flake8-comprehensions
"D", # flake-docstrings
"Q", # flake8-quotes
"T201",
"T203", # flake8-print
]
exclude = [
'__pycache__',
'.cache',
'.git',
'.md',
'.svg',
'.png',
'venv',
'.venv',
'.json',
]
ignore = [
'ANN002',
'ANN003',
'ANN101',
'ANN102',
'ANN204',
'ANN206',
'ANN401',
'D100',
'D104',
'D105',
'D107',
'D203',
'D212',
'D214',
'D215',
'D400',
'D402',
'D404',
'D405',
'D406',
'D407',
'D408',
'D409',
'D410',
'D411',
'D412',
'D413',
'D414',
'D416',
'D417',
]
src = ['src']
[tool.ruff.per-file-ignores]
"src/sage/core/database/**.py" = ['D106']
"src/sage/core/database/migrations/versions/**.py" = ['D']
"tests/**.py" = ["S101"]
[tool.ruff.isort]
known-first-party = ["sage"]
[tool.black]
include = '\.pyi?$'
line-length = 100
target-version = ["py310"]
[tool.taskipy.tasks]
export = "poetry export --without-hashes -o requirements.txt"
lint = "pre-commit run --all-files"
precommit = "pre-commit install"
start = "python -m sage"
[tool.isort]
atomic = true
ensure_newline_before_comments = true
force_grid_wrap = 0
include_trailing_comma = true
line_length = 100
lines_after_imports = 2
multi_line_output = 3
profile = "black"
use_parentheses = true
[tool.pyright]
include = [
"src/sage",
"*.py",
]
strictParameterNoneValue = false
typeCheckingMode = "basic"
[tool.pytest.ini_options]
env = [
"D:SAGE_DATABASE_BIND=postgresql+asyncpg://sage:localhost@postgres:5432/sage",
"SAGE_ADMIN_USERNAME=admin",
"SAGE_ADMIN_PASSWORD=password",
]