From f917af678a5ee8779945ec006deb2a4675f53499 Mon Sep 17 00:00:00 2001 From: Ryan Malloy Date: Sun, 15 Feb 2026 18:20:21 -0700 Subject: [PATCH] Update CLAUDE.md with SWD subsystem, docs site, and deployment info --- CLAUDE.md | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index ed15177..9e6844c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -45,7 +45,7 @@ Entry points: ### Lazy Subsystem Initialization -Session properties (`target`, `memory`, `registers`, `flash`, `jtag`, `breakpoints`, `rtt`, `svd`, `transport`, `events`) are lazily instantiated on first access. Each subsystem holds a reference to the shared connection. +Session properties (`target`, `memory`, `registers`, `flash`, `jtag`, `swd`, `breakpoints`, `rtt`, `svd`, `transport`, `events`) are lazily instantiated on first access. Each subsystem holds a reference to the shared connection. ### Connection Layer @@ -88,3 +88,36 @@ Target: Python 3.11, 100-char lines. Rule sets: E, F, I, UP, B, SIM. - OpenOCD output varies between versions. Parsers must handle multiple formats; check existing regex patterns before assuming a single format. - The sync API must never be called from inside an already-running async event loop (guarded in `SyncSession._get_or_create_loop()`). - Date-based versioning: `YYYY.MM.DD` format. + +## Documentation Site + +Live docs are at **https://openocd-python.warehack.ing** (Starlight/Astro, 28 pages). + +Source repo: `git@git.supported.systems:warehack.ing/openocd-python-docs.git` + +Deployment (remote server): +```bash +ssh -A warehack-ing@openocd.warehack.ing "cd openocd-python-docs && git pull && make prod" +``` + +When adding or changing library API surface (new subsystems, types, exceptions, methods), update the corresponding docs pages: +- `guides/` -- usage guides with async/sync tabs +- `reference/types.mdx` -- frozen dataclass tables +- `reference/exceptions.mdx` -- error hierarchy +- `reference/method-index.mdx` -- method signatures +- `index.mdx` -- subsystem count on homepage +- `astro.config.mjs` -- sidebar entries + +## Publishing to PyPI + +```bash +uv build +uv publish dist/openocd_python-* --username __token__ --password "$(python3 -c "import configparser; c=configparser.ConfigParser(); c.read('$HOME/.pypirc'); print(c['pypi']['password'])")" +``` + +## Git Workflow + +This repo lives as a subtree inside the `mcjtag` monorepo. Push to the Gitea remote via: +```bash +cd ~/claude/mcjtag && git subtree push --prefix=openocd-python origin main +```