Files
news/pyproject.toml
T
connor 5f4bc8d890 Browser feedback uses the signed public endpoint; add the config page
Connor pointed out he may use the site from a laptop away from home. The gated
/ui/feedback/ path was worse than just inconvenient: fetch() follows redirects,
so an expired Authelia session would go 302 -> login page -> HTTP 200, and the
UI would mark the card labelled having recorded nothing. Silent data loss on the
one signal the system learns from.

Both surfaces now post to the same HMAC-signed public endpoint, with
`redirect: 'error'` so a redirect fails loudly instead of looking like success.
The gated route is gone -- one mechanism, not two.

/config shows what every block actually matches right now, and a box to try a
filter before saving it: describe what you want caught, see what it catches and
what sits just below the line, move the threshold, then save it as a veto or a
demote. That boundary view is the point -- a crypto filter at 0.55 catches 131
clusters including "Security updates for Monday", and at 0.62 catches 4, which
you can only know by looking.

Saves use tomlkit rather than tomllib plus a dump, because profile.toml carries
the reasoning behind every constant and a comment-stripping round-trip would
quietly destroy the record of why each number is what it is. Verified: 97
top-level comment lines in, 97 out.

The config mount had to stop being :ro, and ~/config/news2 is now owned
10001:1000 group-writable so the container can save while hand-editing still
works. `:U` would have fixed the container and locked the user out.
2026-09-08 17:26:21 -04:00

31 lines
864 B
TOML

[project]
name = "news"
version = "0.1.0"
description = "Personal news aggregator with an embedding-based model of taste"
requires-python = ">=3.12"
dependencies = [
"httpx>=0.27", # conditional GET, async polling
"feedparser>=6.0", # RSS/Atom incl. RSS 1.0/RDF, which the old hand-rolled quick-xml parser could not read
"fastembed>=0.4", # bge-small-en-v1.5 via ONNX on CPU; deliberately not torch/sentence-transformers
"numpy>=1.26",
"starlette>=0.37",
"jinja2>=3.1",
"uvicorn>=0.30",
"python-multipart>=0.0.9",
"tomlkit>=0.15.1",
]
[project.scripts]
news = "news.cli:main"
[dependency-groups]
dev = ["pytest>=8.0", "pytest-asyncio>=0.23", "respx>=0.21"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"