chrome/pyproject.toml
Michał Kopeć ef35636694 Add a per-request page-context hook
homepage puts the same handful of things on every page - who is logged in,
whether the weather and system widgets are enabled, whether to show the
admin link. Flask did that with two context processors. There is no
equivalent here, and passing the same eight keys at every render site is
the kind of repetition that goes stale one call at a time.

`ui.page_context` is a callable taking a Request and returning a dict. It
runs per render rather than once at startup, because what it returns depends
on who is asking: which group a visitor is in decides whether a tile is even
mentioned. An explicit value at the render site still wins, which is what
the test pins down.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-04 19:26:32 +02:00

35 lines
895 B
TOML

[project]
name = "chrome"
version = "0.3.0"
description = "Shared page shell, design tokens and service helpers for the internal services."
requires-python = ">=3.13"
dependencies = [
"fastapi>=0.115",
"jinja2>=3.1",
]
[project.optional-dependencies]
dev = ["pytest>=8", "httpx>=0.27", "uvicorn[standard]>=0.30"]
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
include = ["chrome*"]
# The shell is useless without its templates and static tree, and a wheel
# carries only .py files unless told otherwise. scribe shipped a broken wheel
# this way once; the container worked only because uvicorn imported from the
# source tree.
[tool.setuptools.package-data]
chrome = [
"templates/*.html",
"static/*.css",
"static/*.js",
"static/vendor/*",
"static/wa/**/*",
]
[tool.pytest.ini_options]
testpaths = ["tests"]