forked from lnbits/lnbits
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
195 lines (177 loc) · 4.05 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
[tool.poetry]
name = "lnbits"
version = "0.12.2"
description = "LNbits, free and open-source Lightning wallet and accounts system."
authors = ["Alan Bits <[email protected]>"]
[tool.poetry.dependencies]
python = "^3.10 | ^3.9"
bech32 = "1.2.0"
click = "8.1.7"
ecdsa = "0.18.0"
fastapi = "0.109.2"
httpx = "0.25.0"
jinja2 = "3.1.3"
lnurl = "0.4.2"
psycopg2-binary = "2.9.7"
pydantic = "1.10.9"
pyqrcode = "1.2.1"
shortuuid = "1.0.11"
sqlalchemy = "1.3.24"
sqlalchemy-aio = "0.17.0"
sse-starlette = "1.6.5"
typing-extensions = "4.8.0"
uvicorn = "0.23.2"
uvloop = "0.17.0"
websockets = "11.0.3"
loguru = "0.7.2"
grpcio = "1.58.0"
protobuf = "4.24.3"
pyln-client = "23.8"
pywebpush = "1.14.0"
slowapi = "0.1.9"
websocket-client = "1.6.3"
pycryptodomex = "3.19.0"
packaging = "23.1"
bolt11 = "2.0.5"
# needed for new login methods: username-password, google-auth, github-auth
bcrypt = "^4.1.1"
python-jose = "^3.3.0"
passlib = "^1.7.4"
itsdangerous = "^2.1.2"
fastapi-sso = "^0.9.1"
# needed for boltz, lnurldevice, watchonly extensions
embit = "0.7.0"
# needed for cashu, lnurlp, nostrclient, nostrmarket, nostrrelay extensions
secp256k1 = "0.14.0"
# keep for backwards compatibility with lnurlp and cashu
environs = "9.5.0"
# needed for scheduler extension
python-crontab = "3.0.0"
# needed for liquid support boltz
wallycore = {version = "^1.0.0", optional = true}
[tool.poetry.extras]
liquid = ["wallycore"]
[tool.poetry.group.dev.dependencies]
black = "^23.7.0"
pytest-asyncio = "^0.21.0"
pytest = "^7.3.2"
pytest-cov = "^4.1.0"
mypy = "^1.5.1"
types-protobuf = "^4.24.0.2"
pre-commit = "^3.2.2"
openapi-spec-validator = "^0.6.0"
ruff = "^0.0.291"
# not our dependency but needed indirectly by openapi-spec-validator
# we want to use 0.10.3 because newer versions are broken on nix
rpds-py = "0.10.3"
types-passlib = "^1.7.7.13"
types-python-jose = "^3.3.4.8"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
lnbits = "lnbits.server:main"
lnbits-cli = "lnbits.commands:main"
[tool.pyright]
include = [
"lnbits"
]
exclude = [
"lnbits/wallets/lnd_grpc_files",
"lnbits/extensions",
"lnbits/upgrades",
]
[tool.mypy]
files = "lnbits"
exclude = [
"^lnbits/wallets/lnd_grpc_files",
"^lnbits/extensions",
"^lnbits/upgrades",
]
[[tool.mypy.overrides]]
module = [
"embit.*",
"secp256k1.*",
"uvicorn.*",
"sqlalchemy.*",
"sqlalchemy_aio.*",
"websocket.*",
"websockets.*",
"pyqrcode.*",
"shortuuid.*",
"grpc.*",
"lnurl.*",
"bolt11.*",
"bitstring.*",
"ecdsa.*",
"psycopg2.*",
"pyngrok.*",
"pyln.client.*",
"py_vapid.*",
"pywebpush.*",
"fastapi_sso.sso.*",
]
ignore_missing_imports = "True"
[tool.pytest.ini_options]
log_cli = false
addopts = "--durations=1 -s --cov=lnbits --cov-report=xml"
testpaths = [
"tests"
]
[tool.black]
line-length = 88
# use upcoming new features
# preview = true
extend-exclude = """(
lnbits/static
| lnbits/extensions
| lnbits/upgrades
| lnbits/wallets/lnd_grpc_files
)"""
[tool.ruff]
# Same as Black. + 10% rule of black
line-length = 88
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
# (`I`) is for `isort`.
select = ["E", "F", "I"]
ignore = []
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
"lnbits/static",
"lnbits/extensions",
"lnbits/wallets/lnd_grpc_files",
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python
# target-version = "py39"
# Ignore unused imports in __init__.py files.
[tool.ruff.extend-per-file-ignores]
"__init__.py" = ["F401", "F403"]
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10