From 8766c19481828ed104b0599879f6be430e58da8c Mon Sep 17 00:00:00 2001 From: Darshan M U Date: Wed, 21 Oct 2026 10:42:55 +0530 Subject: [PATCH 1/2] Add a by-hand real-model release check for Linux, Windows and macOS packaging/release_check/release_check.py installs nc-codewiki from PyPI or a local wheel into a fresh venv, sets config from a key = value file (in an isolated home, so the real ~/.codewiki and keyring are untouched), validates it, generates docs at main~10, updates them at main, and asks questions through the MCP server and the CLI. Logs, zipped docs and a PASS/FAIL summary land in one folder per run. Stdlib only; not run by CI (pytest collects tests/ only). If uv rejects the install it records the failure and retries with pip: on Python 3.14, uv refuses pythonmonkey 1.4.1 (pulled in by mermaid-parser-py) because its wheel has no Wheel-Version. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NPESxdUcusPErYqA1Jzn9J --- .gitignore | 3 + packaging/release_check/README.md | 44 +++ packaging/release_check/config.example.env | 24 ++ packaging/release_check/release_check.py | 432 +++++++++++++++++++++ 4 files changed, 503 insertions(+) create mode 100644 packaging/release_check/README.md create mode 100644 packaging/release_check/config.example.env create mode 100644 packaging/release_check/release_check.py diff --git a/.gitignore b/.gitignore index b11e8fb8..8683a02a 100644 --- a/.gitignore +++ b/.gitignore @@ -104,3 +104,6 @@ _wheel/ dist-linux/ wheelhouse/ *.pyd + +# Release check (packaging/release_check) +release-check-*/ diff --git a/packaging/release_check/README.md b/packaging/release_check/README.md new file mode 100644 index 00000000..f4baf399 --- /dev/null +++ b/packaging/release_check/README.md @@ -0,0 +1,44 @@ +# Release check (real model, by hand) + +One end-to-end run against a real LLM. Run it once per OS (Linux, Windows, macOS), each with a +different Python version, before or after publishing to PyPI. CI's `test_wheel.sh` already +covers each compiled wheel without a key. + +Needs Python 3.12+ and git. Each run makes one full `generate` and one `--update` on the repo, +so use a small repo or a cheap model. + +```bash +cp config.example.env config.env # fill in api-key and models + +# pre-publish: a wheel file, or a folder of wheels (e.g. an unzipped CI artifact) +python release_check.py --repo https://github.com/you/project.git --config config.env --wheel ./wheels + +# post-publish: from PyPI +python release_check.py --repo https://github.com/you/project.git --config config.env --package nc-codewiki==2.0.2 + +# no --wheel/--package: asks which one +python release_check.py --repo https://github.com/you/project.git --config config.env +``` + +Windows: `py -3.12 release_check.py ...`. The Python you run it with is the one tested. + +Options: `--branch main`, `--behind 10`, `--question "..."`, `--out DIR`. + +Steps: venv, uv, install, `codewiki --version`, `config set` from the file, `config validate`, +clone, `generate --verbose --github-pages` at `~10`, `generate --update` at ``, +then `codewiki_status`, `codewiki_search` and `codewiki_ask` through the MCP server, and `codewiki ask` +from the CLI. + +Config is written to `/home`, never to your real `~/.codewiki` or keyring. + +Output folder `release-check--py-