2022-07-08 10:22:35 +02:00
|
|
|
[tool.poetry]
|
|
|
|
name = "lnbits"
|
2023-06-15 15:30:39 +02:00
|
|
|
version = "0.10.9"
|
2023-01-10 12:25:11 +01:00
|
|
|
description = "LNbits, free and open-source Lightning wallet and accounts system."
|
2023-01-12 15:47:42 +01:00
|
|
|
authors = ["Alan Bits <alan@lnbits.com>"]
|
2022-07-08 10:22:35 +02:00
|
|
|
|
|
|
|
[tool.poetry.dependencies]
|
2023-04-21 14:37:26 +02:00
|
|
|
python = "^3.10 | ^3.9"
|
2022-07-08 10:22:35 +02:00
|
|
|
bech32 = "1.2.0"
|
|
|
|
bitstring = "3.1.9"
|
2022-11-30 16:24:13 +01:00
|
|
|
click = "8.0.4"
|
|
|
|
ecdsa = "0.18.0"
|
2023-07-21 10:42:35 +02:00
|
|
|
embit = "^0.7.0"
|
2022-12-01 12:28:28 +01:00
|
|
|
fastapi = "0.83.0"
|
2022-08-03 14:10:32 +02:00
|
|
|
httpx = "0.23.0"
|
2022-09-29 20:42:13 +02:00
|
|
|
jinja2 = "3.0.1"
|
2022-07-08 10:22:35 +02:00
|
|
|
lnurl = "0.3.6"
|
2022-09-29 20:42:13 +02:00
|
|
|
psycopg2-binary = "2.9.1"
|
2023-01-15 11:24:11 +01:00
|
|
|
pydantic = "1.10.4"
|
2022-07-08 10:22:35 +02:00
|
|
|
pyqrcode = "1.2.1"
|
2023-03-10 11:32:02 +01:00
|
|
|
shortuuid = "1.0.11"
|
2022-11-30 16:24:13 +01:00
|
|
|
sqlalchemy = "1.3.24"
|
2022-08-03 14:10:32 +02:00
|
|
|
sqlalchemy-aio = "0.17.0"
|
2022-07-08 10:22:35 +02:00
|
|
|
sse-starlette = "0.6.2"
|
2023-01-26 13:51:12 +01:00
|
|
|
typing-extensions = "4.4.0"
|
2022-11-30 16:24:13 +01:00
|
|
|
uvicorn = "0.18.3"
|
2022-07-08 10:22:35 +02:00
|
|
|
uvloop = "0.16.0"
|
|
|
|
websockets = "10.0"
|
2022-11-30 16:24:13 +01:00
|
|
|
loguru = "0.6.0"
|
2023-01-26 14:24:17 +01:00
|
|
|
grpcio = "1.51.1"
|
|
|
|
protobuf = "4.21.12"
|
2023-01-26 13:51:12 +01:00
|
|
|
Cerberus = "1.3.4"
|
|
|
|
async-timeout = "4.0.2"
|
2022-09-30 13:55:46 +02:00
|
|
|
pyln-client = "0.11.1"
|
2023-01-30 09:29:44 +01:00
|
|
|
cashu = "0.9.0"
|
2023-06-20 11:26:33 +02:00
|
|
|
slowapi = "^0.1.7"
|
2022-11-30 16:24:13 +01:00
|
|
|
|
2023-04-17 09:44:08 +02:00
|
|
|
[tool.poetry.group.dev.dependencies]
|
2022-08-03 14:10:32 +02:00
|
|
|
pytest = "^7.1.2"
|
|
|
|
mock = "^4.0.3"
|
2023-08-19 07:38:04 +02:00
|
|
|
black = "^23.7.0"
|
2022-08-03 14:10:32 +02:00
|
|
|
pytest-asyncio = "^0.19.0"
|
2023-08-16 16:26:48 +02:00
|
|
|
pytest-cov = "^4.1.0"
|
2022-08-03 14:10:32 +02:00
|
|
|
mypy = "^0.971"
|
|
|
|
types-protobuf = "^3.19.22"
|
2023-05-09 10:41:40 +02:00
|
|
|
pre-commit = "^3.2.2"
|
|
|
|
types-mock = "^5.0.0.6"
|
2023-07-19 13:28:27 +02:00
|
|
|
openapi-spec-validator = "^0.5.5"
|
2023-08-19 07:38:04 +02:00
|
|
|
ruff = "^0.0.284"
|
2022-07-08 10:22:35 +02:00
|
|
|
|
|
|
|
[build-system]
|
2023-04-21 14:51:46 +02:00
|
|
|
requires = ["poetry-core>=1.0.0"]
|
2022-07-08 10:22:35 +02:00
|
|
|
build-backend = "poetry.core.masonry.api"
|
|
|
|
|
|
|
|
[tool.poetry.scripts]
|
|
|
|
lnbits = "lnbits.server:main"
|
2022-08-03 14:10:32 +02:00
|
|
|
|
2023-01-23 10:29:17 +01:00
|
|
|
[tool.pyright]
|
|
|
|
include = [
|
|
|
|
"lnbits"
|
|
|
|
]
|
|
|
|
exclude = [
|
|
|
|
"lnbits/wallets/lnd_grpc_files",
|
2023-03-02 12:03:58 +01:00
|
|
|
"lnbits/extensions",
|
2023-06-26 10:38:40 +02:00
|
|
|
"lnbits/upgrades",
|
2023-01-23 10:29:17 +01:00
|
|
|
]
|
|
|
|
|
2022-08-03 14:10:32 +02:00
|
|
|
[tool.mypy]
|
|
|
|
files = "lnbits"
|
2023-03-17 18:05:43 +01:00
|
|
|
exclude = [
|
|
|
|
"^lnbits/wallets/lnd_grpc_files",
|
|
|
|
"^lnbits/extensions",
|
2023-08-19 07:38:04 +02:00
|
|
|
"^lnbits/upgrades",
|
2023-03-17 18:05:43 +01:00
|
|
|
]
|
2022-08-03 14:10:32 +02:00
|
|
|
|
2023-01-09 10:53:30 +01:00
|
|
|
[[tool.mypy.overrides]]
|
2023-01-09 16:35:19 +01:00
|
|
|
module = [
|
|
|
|
"embit.*",
|
2023-01-09 16:56:49 +01:00
|
|
|
"secp256k1.*",
|
|
|
|
"uvicorn.*",
|
|
|
|
"sqlalchemy.*",
|
|
|
|
"sqlalchemy_aio.*",
|
|
|
|
"websocket.*",
|
|
|
|
"websockets.*",
|
|
|
|
"pyqrcode.*",
|
|
|
|
"shortuuid.*",
|
|
|
|
"grpc.*",
|
|
|
|
"lnurl.*",
|
|
|
|
"bitstring.*",
|
|
|
|
"ecdsa.*",
|
|
|
|
"psycopg2.*",
|
2023-01-11 12:40:02 +01:00
|
|
|
"pyngrok.*",
|
2023-08-16 15:54:06 +02:00
|
|
|
"pyln.client.*",
|
2023-01-09 16:35:19 +01:00
|
|
|
]
|
2023-01-09 10:53:30 +01:00
|
|
|
ignore_missing_imports = "True"
|
|
|
|
|
2022-08-03 14:10:32 +02:00
|
|
|
[tool.pytest.ini_options]
|
2023-08-16 13:31:56 +02:00
|
|
|
log_cli = true
|
2022-08-03 14:10:32 +02:00
|
|
|
addopts = "--durations=1 -s --cov=lnbits --cov-report=xml"
|
|
|
|
testpaths = [
|
|
|
|
"tests"
|
|
|
|
]
|
2023-01-20 11:43:16 +01:00
|
|
|
|
2023-08-19 07:38:04 +02:00
|
|
|
[tool.black]
|
|
|
|
# line-length = 150
|
|
|
|
# previously experimental-string-processing = true
|
|
|
|
# this should autoformat string poperly but does not work
|
|
|
|
# preview = true
|
|
|
|
target-versions = ["py39"]
|
|
|
|
extend-exclude = """(
|
|
|
|
lnbits/static
|
|
|
|
| lnbits/extensions
|
|
|
|
| lnbits/upgrades
|
|
|
|
| lnbits/wallets/lnd_grpc_files
|
|
|
|
)"""
|
|
|
|
|
|
|
|
[tool.ruff]
|
|
|
|
# Same as Black.
|
|
|
|
line-length = 150
|
|
|
|
|
|
|
|
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
|
|
|
|
select = ["E", "F", "I"]
|
|
|
|
ignore = [
|
|
|
|
"E402", # Module level import not at top of file
|
|
|
|
"E501", # Line length
|
2023-01-20 11:43:16 +01:00
|
|
|
]
|
|
|
|
|
2023-08-19 07:38:04 +02:00
|
|
|
# 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",
|
2023-01-20 11:43:16 +01:00
|
|
|
]
|
2023-08-19 07:38:04 +02:00
|
|
|
|
|
|
|
# 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
|