2026-05-10 09:08:12 +02:00
|
|
|
[project]
|
|
|
|
|
name = "devplacepy"
|
|
|
|
|
version = "1.0.0"
|
|
|
|
|
description = "DevPlace - The Developer Social Network"
|
feat: add api key auth, devii agent, openai gateway, and admin service management
This commit introduces a comprehensive set of new features including API key authentication with CLI management commands (get, reset, backfill), a Devii agentic assistant with WebSocket terminal and session bootstrap, an OpenAI-compatible LLM gateway service, and an admin service management panel. It also adds Playwright browser automation for bot support, configures internal gateway URLs, refactors content editing/deletion to support JSON API responses, and updates documentation across AGENTS.md, README.md, and the developer docs site.
2026-06-08 17:38:33 +02:00
|
|
|
requires-python = ">=3.12"
|
2026-05-10 09:08:12 +02:00
|
|
|
dependencies = [
|
|
|
|
|
"fastapi",
|
|
|
|
|
"uvicorn[standard]",
|
|
|
|
|
"jinja2",
|
|
|
|
|
"python-multipart",
|
|
|
|
|
"dataset",
|
|
|
|
|
"passlib[bcrypt]",
|
|
|
|
|
"python-dotenv",
|
|
|
|
|
"aiofiles",
|
2026-06-14 09:48:10 +02:00
|
|
|
"httpx[http2]",
|
|
|
|
|
"curl_cffi",
|
|
|
|
|
"brotli",
|
|
|
|
|
"zstandard",
|
2026-05-23 10:03:27 +02:00
|
|
|
"cryptography",
|
|
|
|
|
"PyJWT",
|
2026-05-11 03:14:43 +02:00
|
|
|
"multiavatar",
|
|
|
|
|
"locust",
|
2026-05-12 15:07:34 +02:00
|
|
|
"Pillow",
|
feat: add featured/locked columns and auto-rotation logic to news pipeline
- Add `ai_grade`, `featured`, `featured_locked`, `landing_locked`, `author`, `article_published`, `image_url`, `has_unique_image` columns to news table
- Extend `news_images` schema with `alt_text`, `phash`, `width`, `height`, `is_placeholder` columns
- Create `idx_news_featured` index for efficient featured queries
- Update admin toggle endpoints to set `featured_locked`/`landing_locked` when manually toggling
- Propagate `featured` and `image_url` fields through landing page, news list, and detail page rendering
- Update `get_featured_news` to return `featured` and `image_url` fields
- Document in AGENTS.md the full zero-maintenance pipeline: image perceptual hashing, placeholder detection, AI grading on cleaned text, reliability gate, effective score computation, and post-loop landing rotation
- Update README.md service description to reflect automatic image comparison and landing rotation capabilities
- Clarify docs_api.py summaries that toggling featured/landing now locks articles from auto-rotation
2026-06-19 00:08:41 +02:00
|
|
|
"imagehash",
|
2026-06-05 10:14:40 +02:00
|
|
|
"uuid_utils",
|
2026-06-08 22:56:59 +02:00
|
|
|
"mistune",
|
2026-06-19 10:06:09 +02:00
|
|
|
"emoji",
|
2026-06-14 09:48:10 +02:00
|
|
|
"pypdf",
|
2026-06-14 02:16:22 +02:00
|
|
|
"playwright",
|
2026-07-06 05:57:47 +02:00
|
|
|
"playwright-stealth",
|
2026-06-14 03:34:21 +02:00
|
|
|
"chromadb",
|
|
|
|
|
"weasyprint",
|
2026-06-14 09:48:10 +02:00
|
|
|
"cairosvg",
|
feat: add admin/internal database API with CRUD, read-only query, and natural-language SQL endpoints
Add a new `/dbapi` router package providing a generic database API over `dataset`, restricted to admin sessions, admin API keys, and the internal gateway key. Includes:
- `tables.py`: list all tables and inspect table schemas
- `crud.py`: full CRUD operations (GET, POST, PATCH, DELETE) with soft-delete awareness, born-live inserts, `?include_deleted`, `.../restore`, and `?hard=true` purge
- `query.py`: validated read-only SELECT execution via sqlglot parsing, classification, and EXPLAIN dry-run; async query jobs with WebSocket streaming via `DbApiJobService`
- `nl.py`: natural-language-to-SQL conversion using the platform AI gateway with re-prompting until validation passes
Also register `DbApiJobService` and `PubSubService` in the service manager, add `DBAPI_DIR` to config data paths, and force cleartext `http://` connections to HTTP/1.1 in `curl_transport` to fix large request failures against uvicorn's HTTP/1.1-only internal gateway.
2026-06-15 01:00:30 +02:00
|
|
|
"sqlglot",
|
|
|
|
|
"curl_cffi",
|
2026-06-20 00:36:11 +02:00
|
|
|
"faker",
|
2026-06-21 18:46:27 +02:00
|
|
|
"defusedxml",
|
2026-05-10 09:08:12 +02:00
|
|
|
]
|
|
|
|
|
|
2026-05-11 05:30:51 +02:00
|
|
|
[project.scripts]
|
|
|
|
|
devplace = "devplacepy.cli:main"
|
feat: add api key auth, devii agent, openai gateway, and admin service management
This commit introduces a comprehensive set of new features including API key authentication with CLI management commands (get, reset, backfill), a Devii agentic assistant with WebSocket terminal and session bootstrap, an OpenAI-compatible LLM gateway service, and an admin service management panel. It also adds Playwright browser automation for bot support, configures internal gateway URLs, refactors content editing/deletion to support JSON API responses, and updates documentation across AGENTS.md, README.md, and the developer docs site.
2026-06-08 17:38:33 +02:00
|
|
|
devii = "devplacepy.services.devii.cli:main"
|
2026-06-14 09:48:10 +02:00
|
|
|
devplace-xmlrpc = "devplacepy.services.xmlrpc.server:main"
|
2026-05-11 05:30:51 +02:00
|
|
|
|
2026-05-23 03:21:55 +02:00
|
|
|
[project.optional-dependencies]
|
2026-06-12 07:43:33 +02:00
|
|
|
dev = ["pytest", "playwright", "requests", "coverage"]
|
feat: add api key auth, devii agent, openai gateway, and admin service management
This commit introduces a comprehensive set of new features including API key authentication with CLI management commands (get, reset, backfill), a Devii agentic assistant with WebSocket terminal and session bootstrap, an OpenAI-compatible LLM gateway service, and an admin service management panel. It also adds Playwright browser automation for bot support, configures internal gateway URLs, refactors content editing/deletion to support JSON API responses, and updates documentation across AGENTS.md, README.md, and the developer docs site.
2026-06-08 17:38:33 +02:00
|
|
|
bots = ["playwright", "faker"]
|
2026-05-23 03:21:55 +02:00
|
|
|
|
2026-05-10 09:08:12 +02:00
|
|
|
[build-system]
|
|
|
|
|
requires = ["hatchling"]
|
|
|
|
|
build-backend = "hatchling.build"
|
2026-06-12 07:43:33 +02:00
|
|
|
|
|
|
|
|
[tool.pytest.ini_options]
|
2026-06-13 16:32:33 +02:00
|
|
|
testpaths = ["tests/unit", "tests/api", "tests/e2e"]
|
|
|
|
|
python_files = ["*.py"]
|
Report every test failure in one pass and fix the whole suite
The suite ran with -x, so a run stopped at the first failure and finding N
failures cost N full runs. Move -rf into the pytest addopts so every run
lists each failure, and add the triage targets test-fast (unit + api, no
browser), test-failed (--last-failed), test-first-failure (the old -x),
test-slowest and test-cache-clean. A stale .pytest_cache holding node ids
from deleted files made --last-failed select everything; make clean and
test-cache-clean drop it.
Fix the fifteen failures this surfaced.
DeepSearch crawling raised AttributeError in its finally block on every run:
async_playwright().__aenter__() returns a Playwright, which has no __aexit__.
Use start()/stop() at both call sites.
Update the tests left behind by changed signatures: VectorStore is async now,
fetch_page takes a browser, _summary_payload takes dom_evidence, and the
messages/notifications page compounds take a user_uid.
Close four real flakes that fail-fast had been hiding, all of them late in
the run. Harvest assertions pinned crop.reward_coins while is_golden pays
five times on about five percent of harvests, so they now assert through
realizable_harvest_coins with the observed golden flag. Market saturation
fixtures assumed a single active farm and landed two tiers milder once the
api and e2e tiers had created farms, so they scale by active_farms(). The
primary-administrator container test raced the one second cross-worker cache
version window and now waits for the server to agree. The isslop tools test
matched the collapsed nav dropdown link instead of the tools grid card.
Stop burning ninety seconds waiting out server-side display caches:
DEVPLACE_RANKING_TTL and DEVPLACE_MARKET_SATURATION_TTL follow the existing
sitemap and home cache precedent and are zero for the suite, taking the
leaderboard test from 60.6s to 4.4s and the saturation test from 30.1s to
under a second.
2881 passed, 1 skipped in 15:13.
2026-07-26 16:02:36 +02:00
|
|
|
addopts = "--tb=line -rf -p no:xdist"
|
2026-06-15 12:57:09 +02:00
|
|
|
filterwarnings = [
|
|
|
|
|
"ignore:'crypt' is deprecated",
|
|
|
|
|
"ignore:Using `httpx` with `starlette.testclient` is deprecated",
|
|
|
|
|
"ignore:invalid escape sequence",
|
|
|
|
|
]
|