port matrix-ops-bot to uv and nix flake module

This commit is contained in:
Abel Luck 2026-03-05 15:55:47 +01:00
parent c13d5fc536
commit 3a042155af
17 changed files with 2402 additions and 3476 deletions

View file

@ -1,57 +1,69 @@
[tool.poetry]
name = "ops_bot"
[project]
name = "matrix-ops-bot"
version = "0.1.0"
description = ""
authors = ["Abel Luck <abel@guardianproject.info>"]
description = "A bot for ops in Matrix"
readme = "README.md"
authors = [{ name = "Abel Luck", email = "abel@guardianproject.info" }]
requires-python = ">=3.11"
dependencies = [
"matrix-nio[e2e]>=0.22.1,<0.23.0",
"fastapi>=0.104.1,<0.105.0",
"uvicorn>=0.24.0,<0.25.0",
"termcolor>=1.1.0,<2.0.0",
"Markdown>=3.4.1,<4.0.0",
"commonmark>=0.9.1,<0.10.0",
"Jinja2>=3.1.2,<4.0.0",
"mautrix>=0.20.2,<0.21.0",
"click>=8.1.3,<9.0.0",
"json-logging>=1.3.0,<2.0.0",
"pydantic-settings>=2.0.3,<3.0.0",
"prometheus-client>=0.18.0,<0.19.0",
"prometheus-fastapi-instrumentator>=6.1.0,<7.0.0",
"python-olm>=3.2.16,<4.0.0",
]
[tool.poetry.dependencies]
python = "^3.11"
matrix-nio = {extras = ["e2e"], version = "^0.22.1"}
fastapi = "^0.104.1"
uvicorn = "^0.24.0"
termcolor = "^1.1.0"
Markdown = "^3.4.1"
commonmark = "^0.9.1"
Jinja2 = "^3.1.2"
mautrix = "^0.20.2"
click = "^8.1.3"
json-logging = "^1.3.0"
pydantic-settings = "^2.0.3"
prometheus-client = "^0.18.0"
prometheus-fastapi-instrumentator = "^6.1.0"
python-olm = {version = "^3.2.16", source = "python-olm"}
[tool.poetry.dev-dependencies]
pytest = "^7.2.0"
black = "^22.10.0"
isort = "^5.10.1"
mypy = "^1.2.0"
bandit = "^1.7.4"
flake8 = "^6.0.0"
flake8-black = "^0.3.5"
types-Markdown = "^3.4.0"
types-termcolor = "^1.1.5"
pytest-asyncio = "^0.20.2"
types-commonmark = "^0.9.2"
[[tool.poetry.source]]
name = "python-olm"
url = "https://gitlab.matrix.org/api/v4/projects/27/packages/pypi/simple"
default = false
secondary = false
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
[project.scripts]
start = "ops_bot.main:start_dev"
config = "ops_bot.cli:cli"
matrix-ops-bot = "ops_bot.main:main"
[dependency-groups]
dev = [
"pytest>=7.2.0,<8.0.0",
"black>=22.10.0,<23.0.0",
"isort>=5.10.1,<6.0.0",
"mypy>=1.2.0,<2.0.0",
"bandit>=1.7.4,<2.0.0",
"flake8>=6.0.0,<7.0.0",
"flake8-black>=0.3.5,<0.4.0",
"types-Markdown>=3.4.0,<4.0.0",
"types-termcolor>=1.1.5,<2.0.0",
"pytest-asyncio>=0.20.2,<0.21.0",
"types-commonmark>=0.9.2,<0.10.0",
]
[tool.uv.sources]
python-olm = { index = "python-olm" }
[[tool.uv.index]]
name = "python-olm"
url = "https://gitlab.matrix.org/api/v4/projects/27/packages/pypi/simple"
explicit = true
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
where = ["."]
include = ["ops_bot*"]
[tool.black]
line-length = 88
target-version = ['py39']
target-version = ['py311']
[tool.mypy]
files = "ops_bot,tests"