2022-07-08 10:22:35 +02:00
|
|
|
[tool.poetry]
|
|
|
|
name = "lnbits"
|
2024-07-25 10:19:18 +02:00
|
|
|
version = "0.12.11"
|
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>"]
|
2024-04-17 10:53:57 +02:00
|
|
|
readme = "README.md"
|
|
|
|
repository = "https://github.com/lnbits/lnbits"
|
|
|
|
homepage = "https://lnbits.com"
|
|
|
|
packages = [
|
|
|
|
{include = "lnbits"},
|
|
|
|
{include = "lnbits/py.typed"},
|
|
|
|
]
|
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"
|
2023-09-25 11:54:02 +02:00
|
|
|
click = "8.1.7"
|
2022-11-30 16:24:13 +01:00
|
|
|
ecdsa = "0.18.0"
|
2024-02-06 15:47:36 +01:00
|
|
|
fastapi = "0.109.2"
|
2023-09-25 11:54:02 +02:00
|
|
|
httpx = "0.25.0"
|
2024-07-16 07:59:04 +02:00
|
|
|
jinja2 = "3.1.4"
|
2023-12-05 15:04:28 +01:00
|
|
|
lnurl = "0.4.2"
|
2023-09-25 11:54:02 +02:00
|
|
|
psycopg2-binary = "2.9.7"
|
2024-07-16 07:59:04 +02:00
|
|
|
pydantic = "1.10.17"
|
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"
|
2023-09-25 11:54:02 +02:00
|
|
|
sse-starlette = "1.6.5"
|
|
|
|
typing-extensions = "4.8.0"
|
|
|
|
uvicorn = "0.23.2"
|
2024-04-24 08:39:41 +02:00
|
|
|
uvloop = "0.19.0"
|
2023-09-25 11:54:02 +02:00
|
|
|
websockets = "11.0.3"
|
|
|
|
loguru = "0.7.2"
|
2024-08-20 11:38:30 +02:00
|
|
|
grpcio = "1.65.4"
|
|
|
|
protobuf = "5.26.1"
|
2024-07-30 18:04:28 +02:00
|
|
|
pyln-client = "24.5"
|
2023-09-25 11:54:02 +02:00
|
|
|
pywebpush = "1.14.0"
|
2024-02-06 15:47:36 +01:00
|
|
|
slowapi = "0.1.9"
|
2023-09-25 11:54:02 +02:00
|
|
|
websocket-client = "1.6.3"
|
2024-04-03 11:11:30 +02:00
|
|
|
pycryptodomex = "3.19.1"
|
2023-09-25 11:54:02 +02:00
|
|
|
packaging = "23.1"
|
2024-05-16 14:48:58 +02:00
|
|
|
bolt11 = "2.0.6"
|
2023-12-12 11:38:19 +01:00
|
|
|
# needed for new login methods: username-password, google-auth, github-auth
|
|
|
|
bcrypt = "^4.1.1"
|
2024-07-24 10:42:47 +02:00
|
|
|
pyjwt = "^2.8.0"
|
2023-12-12 11:38:19 +01:00
|
|
|
passlib = "^1.7.4"
|
|
|
|
itsdangerous = "^2.1.2"
|
|
|
|
fastapi-sso = "^0.9.1"
|
2023-10-07 21:06:58 +02:00
|
|
|
# needed for boltz, lnurldevice, watchonly extensions
|
|
|
|
embit = "0.7.0"
|
|
|
|
# needed for cashu, lnurlp, nostrclient, nostrmarket, nostrrelay extensions
|
|
|
|
secp256k1 = "0.14.0"
|
2023-10-06 16:28:34 +02:00
|
|
|
# keep for backwards compatibility with lnurlp and cashu
|
|
|
|
environs = "9.5.0"
|
2023-10-13 04:45:17 +02:00
|
|
|
# needed for scheduler extension
|
|
|
|
python-crontab = "3.0.0"
|
2023-11-27 10:45:16 +01:00
|
|
|
# needed for liquid support boltz
|
|
|
|
wallycore = {version = "^1.0.0", optional = true}
|
2024-08-06 10:06:21 +02:00
|
|
|
# needed for breez funding source
|
2024-08-14 16:42:12 +02:00
|
|
|
breez-sdk = {version = "0.5.2", optional = true}
|
2023-11-27 10:45:16 +01:00
|
|
|
|
|
|
|
[tool.poetry.extras]
|
2024-08-06 10:06:21 +02:00
|
|
|
breez = ["breez-sdk"]
|
2023-11-27 10:45:16 +01:00
|
|
|
liquid = ["wallycore"]
|
2022-11-30 16:24:13 +01:00
|
|
|
|
2023-04-17 09:44:08 +02:00
|
|
|
[tool.poetry.group.dev.dependencies]
|
2024-04-03 11:08:50 +02:00
|
|
|
black = "^24.3.0"
|
2023-09-25 11:54:02 +02:00
|
|
|
pytest-asyncio = "^0.21.0"
|
|
|
|
pytest = "^7.3.2"
|
2023-08-16 16:26:48 +02:00
|
|
|
pytest-cov = "^4.1.0"
|
2023-08-23 21:24:54 +02:00
|
|
|
mypy = "^1.5.1"
|
2023-09-25 11:54:02 +02:00
|
|
|
types-protobuf = "^4.24.0.2"
|
2023-05-09 10:41:40 +02:00
|
|
|
pre-commit = "^3.2.2"
|
2023-09-25 11:54:02 +02:00
|
|
|
openapi-spec-validator = "^0.6.0"
|
2024-03-21 11:05:01 +01:00
|
|
|
ruff = "^0.3.2"
|
2023-10-12 20:14:16 +02:00
|
|
|
# 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"
|
2023-12-12 11:38:19 +01:00
|
|
|
types-passlib = "^1.7.7.13"
|
2024-02-27 14:30:52 +01:00
|
|
|
openai = "^1.12.0"
|
|
|
|
json5 = "^0.9.17"
|
2024-04-05 07:05:26 +02:00
|
|
|
asgi-lifespan = "^2.1.0"
|
2024-04-05 08:35:51 +02:00
|
|
|
pytest-md = "^0.2.0"
|
2024-04-08 11:18:21 +02:00
|
|
|
pytest-httpserver = "^1.0.10"
|
2024-04-15 17:24:28 +02:00
|
|
|
pytest-mock = "^3.14.0"
|
|
|
|
types-mock = "^5.1.0.20240311"
|
|
|
|
mock = "^5.1.0"
|
2024-08-20 11:38:30 +02:00
|
|
|
grpcio-tools = "^1.65.4"
|
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"
|
2023-08-21 16:29:13 +02:00
|
|
|
lnbits-cli = "lnbits.commands:main"
|
2022-08-03 14:10:32 +02:00
|
|
|
|
2023-01-23 10:29:17 +01:00
|
|
|
[tool.pyright]
|
|
|
|
include = [
|
2024-02-27 14:30:52 +01:00
|
|
|
"lnbits",
|
|
|
|
"tests",
|
|
|
|
"tools",
|
2023-01-23 10:29:17 +01:00
|
|
|
]
|
|
|
|
exclude = [
|
2024-08-20 11:38:30 +02:00
|
|
|
"lnbits/wallets/boltz_grpc_files",
|
2023-01-23 10:29:17 +01:00
|
|
|
"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]
|
2024-02-27 14:30:52 +01:00
|
|
|
files = [
|
|
|
|
"lnbits",
|
|
|
|
"tests",
|
|
|
|
"tools",
|
|
|
|
]
|
2023-03-17 18:05:43 +01:00
|
|
|
exclude = [
|
2024-08-20 11:38:30 +02:00
|
|
|
"^lnbits/wallets/boltz_grpc_files",
|
2023-03-17 18:05:43 +01:00
|
|
|
"^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.*",
|
2023-09-25 12:06:54 +02:00
|
|
|
"bolt11.*",
|
2023-01-09 16:56:49 +01:00
|
|
|
"bitstring.*",
|
|
|
|
"ecdsa.*",
|
|
|
|
"psycopg2.*",
|
2023-01-11 12:40:02 +01:00
|
|
|
"pyngrok.*",
|
2023-08-16 15:54:06 +02:00
|
|
|
"pyln.client.*",
|
2023-09-11 15:48:49 +02:00
|
|
|
"py_vapid.*",
|
|
|
|
"pywebpush.*",
|
2023-12-12 11:38:19 +01:00
|
|
|
"fastapi_sso.sso.*",
|
2024-02-27 14:30:52 +01:00
|
|
|
"json5.*",
|
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-09-11 15:06:31 +02:00
|
|
|
log_cli = false
|
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]
|
2023-08-24 11:26:09 +02:00
|
|
|
line-length = 88
|
|
|
|
# use upcoming new features
|
2023-08-19 07:38:04 +02:00
|
|
|
# preview = true
|
|
|
|
extend-exclude = """(
|
|
|
|
lnbits/static
|
|
|
|
| lnbits/extensions
|
|
|
|
| lnbits/upgrades
|
|
|
|
| lnbits/wallets/lnd_grpc_files
|
2024-08-20 11:38:30 +02:00
|
|
|
| lnbits/wallets/boltz_grpc_files
|
2023-08-19 07:38:04 +02:00
|
|
|
)"""
|
|
|
|
|
|
|
|
[tool.ruff]
|
2023-08-24 11:26:09 +02:00
|
|
|
# Same as Black. + 10% rule of black
|
|
|
|
line-length = 88
|
2023-08-19 07:38:04 +02:00
|
|
|
|
2024-03-07 10:55:37 +01:00
|
|
|
# Exclude generated files.
|
|
|
|
extend-exclude = [
|
2024-08-20 11:38:30 +02:00
|
|
|
"lnbits/wallets/lnd_grpc_files",
|
|
|
|
"lnbits/wallets/boltz_grpc_files"
|
2024-03-07 10:55:37 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
[tool.ruff.lint]
|
|
|
|
# Enable:
|
|
|
|
# F - pyflakes
|
|
|
|
# E - pycodestyle errors
|
|
|
|
# W - pycodestyle warnings
|
|
|
|
# I - isort
|
2024-04-01 19:53:30 +02:00
|
|
|
# A - flake8-builtins
|
2024-04-03 17:56:05 +02:00
|
|
|
# C - mccabe
|
2024-04-15 09:02:21 +02:00
|
|
|
# N - naming
|
2024-04-01 18:50:21 +02:00
|
|
|
# UP - pyupgrade
|
2024-04-17 07:36:22 +02:00
|
|
|
# RUF - ruff specific rules
|
2024-04-17 13:11:51 +02:00
|
|
|
# B - bugbear
|
|
|
|
select = ["F", "E", "W", "I", "A", "C", "N", "UP", "RUF", "B"]
|
2024-04-01 18:50:21 +02:00
|
|
|
# UP007: pyupgrade: use X | Y instead of Optional. (python3.10)
|
2024-04-17 07:36:22 +02:00
|
|
|
# RUF012: mutable-class-default
|
|
|
|
ignore = ["UP007", "RUF012"]
|
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 = []
|
|
|
|
|
|
|
|
# Allow unused variables when underscore-prefixed.
|
|
|
|
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
|
|
|
2024-04-15 09:02:21 +02:00
|
|
|
# needed for pydantic
|
|
|
|
[tool.ruff.lint.pep8-naming]
|
|
|
|
classmethod-decorators = [
|
|
|
|
"root_validator",
|
|
|
|
]
|
|
|
|
|
2024-03-07 10:55:37 +01:00
|
|
|
[tool.ruff.lint.mccabe]
|
2024-04-03 17:56:05 +02:00
|
|
|
# TODO: Decrease this to 10.
|
|
|
|
max-complexity = 16
|
2024-04-17 13:11:51 +02:00
|
|
|
|
|
|
|
[tool.ruff.lint.flake8-bugbear]
|
|
|
|
# Allow default arguments like, e.g., `data: List[str] = fastapi.Query(None)`.
|
|
|
|
extend-immutable-calls = [
|
|
|
|
"fastapi.Depends",
|
|
|
|
"fastapi.Query",
|
|
|
|
"fastapi.Body",
|
|
|
|
"lnbits.decorators.parse_filters"
|
|
|
|
]
|