Every Gitea Actions run failed in actions/checkout: the stpvm runner is registered against http://localhost:3000, which an ubuntu-latest job container can't reach. Add .gitea/workflows/ci.yml, which Gitea uses in place of the GitHub workflow, following web_server's pattern: host mode, a plain git fetch over Gitea's SSH port, and ruff + pytest inside python:<version>-slim containers. That surfaced a real failure: test_serve_refuses_without_token imports uvicorn, which only the web extra installed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
57 lines
1.3 KiB
TOML
57 lines
1.3 KiB
TOML
[project]
|
|
name = "receipt-maker"
|
|
version = "1.0.0"
|
|
description = "Print images and text notes to an Epson TM-T20II thermal receipt printer"
|
|
requires-python = ">=3.10"
|
|
dependencies = [
|
|
"python-escpos>=3.0",
|
|
"Pillow>=10.0",
|
|
"requests>=2.31",
|
|
"pyusb>=1.2", # printer.Usb backend for --usb
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
tui = [
|
|
"textual>=1.0",
|
|
"rich>=13.0", # imported directly by receipt_tui
|
|
]
|
|
web = [
|
|
"fastapi>=0.110",
|
|
"uvicorn>=0.29",
|
|
"python-multipart>=0.0.9", # FastAPI's form/upload parsing
|
|
]
|
|
dev = [
|
|
"pytest>=8.0",
|
|
"ruff>=0.4",
|
|
"textual>=1.0",
|
|
"rich>=13.0",
|
|
"fastapi>=0.110",
|
|
"uvicorn>=0.29", # imported by receipt_web.serve(), which the tests call
|
|
"python-multipart>=0.0.9",
|
|
"httpx>=0.27", # FastAPI's TestClient
|
|
]
|
|
|
|
[project.scripts]
|
|
receipt = "receipt:main"
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=68"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.setuptools]
|
|
py-modules = ["receipt", "receipt_tui", "receipt_web"]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py310"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "W", "I", "UP", "B", "SIM", "S"]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"tests/*" = ["S101"] # asserts are the point
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
pythonpath = ["."] # tests import receipt/receipt_tui without an editable install
|