furtka/pyproject.toml

47 lines
872 B
TOML
Raw Normal View History

[project]
name = "furtka"
feat(install): async background install with progress polling POST /api/apps/install now returns 202 Accepted after the synchronous pre-validation (resolve source, copy files, write .env, check for placeholder secrets, validate path-type settings). The docker-facing phases (compose pull → ensure volumes → compose up) are dispatched as a background systemd-run unit (furtka-install-<app>) that writes stage transitions to /var/lib/furtka/install-state.json. The UI polls GET /api/apps/install/status every 1.5s and re-labels the modal submit button — "Image wird heruntergeladen…" → "Speicherbereiche werden erstellt…" → "Container wird gestartet…" — instead of sitting dead on "Installing…" for 30+ seconds on large images like Jellyfin. Mirrors the exact shape of /api/catalog/sync/apply and /api/furtka/update/apply: same fcntl lock, same atomic state-file writes, same terminal-state poll loop ("done" | "error"). New CLI subcommand `furtka app install-bg <name>` is what systemd-run invokes; it's hidden from --help because regular CLI users still want the synchronous `furtka app install <name>`. Reinstall button on the app list polls too — after dispatch, its text reflects the background stage until terminal, matching the modal flow. Tests: - tests/test_install_runner.py (new, 9 cases): state roundtrip, lock contention, happy-path phase ordering, error writes on pull/up failure, lock release on both terminal outcomes. - tests/test_api.py: new no_systemd_run fixture stubs subprocess.run; existing install tests adapted to 202 response; new tests for 409 lock contention and the status endpoint. - tests/test_cli.py: install-bg dispatches correctly and returns 1 on failure with journald-friendly stderr. 256 tests pass, ruff check + format clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 15:50:49 +02:00
version = "26.12-alpha"
description = "Open-source home server OS — simple enough for everyone."
requires-python = ">=3.11"
readme = "README.md"
license = { text = "AGPL-3.0-or-later" }
authors = [
{ name = "Daniel Syrnicki" },
{ name = "Robert Syrnicki" },
]
dependencies = [
"flask>=3.0",
]
[project.optional-dependencies]
dev = [
"ruff>=0.6",
"pytest>=8.0",
]
[tool.ruff]
line-length = 100
target-version = "py311"
extend-exclude = [".venv", "*.venv"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"W", # pycodestyle warnings
"B", # flake8-bugbear
"UP", # pyupgrade
]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["webinstaller", "."]
[project.scripts]
furtka = "furtka.cli:main"
[tool.setuptools]
packages = ["furtka"]