Skip to content

Commit 28c146e

Browse files
ayhammoudaclaude
andcommitted
docs(readme): widen PRE-PYPI markers to enclose full transient sections
Fixes C1+I1 from the PR #22 coherence review: previously the <!-- PRE-PYPI --> markers wrapped only code fences, leaving surrounding "Before/After PyPI publishing" headings and lead-in sentences (including line 74's lowercase "until the PyPI package is published") outside any marker. The committed cleanup regex missed line 74, so post-launch a mechanical block-delete would have left transient prose on the published README. Each PRE-PYPI block now encloses its full transient region. The RELEASE.md cleanup checklist references a perl one-liner for a single-pass mechanical cleanup. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent c642de9 commit 28c146e

2 files changed

Lines changed: 23 additions & 18 deletions

File tree

.github/RELEASE.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,9 @@ Complete these steps in order. Each step has a checkbox -- do not skip ahead.
158158
### Post-PyPI Launch Pack Cleanup
159159

160160
- [ ] Remove every temporary PyPI pre-release block from `README.md`:
161-
- Delete each `<!-- PRE-PYPI: ... -->` through `<!-- /PRE-PYPI -->` region,
162-
including the marker comments and GitHub-source replacement commands
163-
- Remove or rewrite stale "Before PyPI publishing" headings, "Until the first
164-
PyPI release is published" text, and "After PyPI publishing" qualifiers
161+
- Mechanical pass: delete every region from `<!-- PRE-PYPI:` to `<!-- /PRE-PYPI -->` (inclusive). Each block now encloses its surrounding heading + lead-in sentence + code, so a single pass produces a clean README.
162+
- Reference command:
163+
`perl -0777 -i -pe 's/<!-- PRE-PYPI:.*?<!-- \/PRE-PYPI -->\n*//gs' README.md`
165164
- Make the published package commands (`uvx python-docs-mcp-server ...`) the
166165
primary install, build-index, MCP client, `doctor`, and `validate-corpus`
167166
examples

README.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,27 +71,29 @@ matching section. Instead of generic web results or an entire docs page, it gets
7171
the official stdlib text for the requested Python version, trimmed to the useful
7272
section.
7373

74+
<!-- PRE-PYPI: replace this temporary GitHub-source smoke test after the first PyPI publish -->
7475
Local source smoke test until the PyPI package is published:
7576

76-
<!-- PRE-PYPI: replace this temporary GitHub source command after the first PyPI publish -->
7777
```bash
7878
uvx --from git+https://github.com/ayhammouda/python-docs-mcp-server.git python-docs-mcp-server --version
7979
```
8080
<!-- /PRE-PYPI -->
8181

8282
## Install
8383

84+
<!-- PRE-PYPI: remove this entire "Before PyPI publishing" block (heading + prose + code) after the first PyPI publish -->
8485
### Before PyPI publishing (install from GitHub source)
8586

8687
Until the first PyPI release is published, run from GitHub:
8788

88-
<!-- PRE-PYPI: replace this temporary GitHub source command after the first PyPI publish -->
8989
```bash
9090
uvx --from git+https://github.com/ayhammouda/python-docs-mcp-server.git python-docs-mcp-server --version
9191
```
9292
<!-- /PRE-PYPI -->
9393

94+
<!-- PRE-PYPI: after the first PyPI publish, drop this "After PyPI publishing" heading so the section reads simply as "## Install" -->
9495
### After PyPI publishing
96+
<!-- /PRE-PYPI -->
9597

9698
Run directly with `uvx`:
9799

@@ -114,13 +116,17 @@ shell or use `python -m uv ...` as a fallback for local contributor commands.
114116

115117
Build the local documentation index:
116118

117-
<!-- PRE-PYPI: replace this temporary GitHub source command after the first PyPI publish -->
119+
<!-- PRE-PYPI: remove the GitHub-source build-index command and the "After PyPI publishing" lead-in after the first PyPI publish; the post-PyPI code fence below survives -->
118120
```bash
119121
uvx --from git+https://github.com/ayhammouda/python-docs-mcp-server.git python-docs-mcp-server build-index --versions 3.10,3.11,3.12,3.13,3.14
120122
```
121-
<!-- /PRE-PYPI -->
122123

123124
After PyPI publishing, `uvx python-docs-mcp-server build-index ...` is enough.
125+
<!-- /PRE-PYPI -->
126+
127+
```bash
128+
uvx python-docs-mcp-server build-index --versions 3.10,3.11,3.12,3.13,3.14
129+
```
124130

125131
If you installed the package persistently, you can drop the `uvx` prefix:
126132

@@ -144,7 +150,7 @@ Add this to your Claude Desktop configuration file:
144150

145151
**Windows:** `%APPDATA%\\Claude\\claude_desktop_config.json`
146152

147-
<!-- PRE-PYPI: replace this temporary GitHub source command after the first PyPI publish -->
153+
<!-- PRE-PYPI: remove the GitHub-source config and the "After PyPI publishing, use:" lead-in after the first PyPI publish; the post-PyPI config fence below survives -->
148154
```json
149155
{
150156
"mcpServers": {
@@ -159,9 +165,9 @@ Add this to your Claude Desktop configuration file:
159165
}
160166
}
161167
```
162-
<!-- /PRE-PYPI -->
163168

164169
After PyPI publishing, use:
170+
<!-- /PRE-PYPI -->
165171

166172
```json
167173
{
@@ -181,7 +187,7 @@ Restart Claude Desktop after editing the config file.
181187
Add this to your Cursor MCP settings (`.cursor/mcp.json` in your project or
182188
global settings):
183189

184-
<!-- PRE-PYPI: replace this temporary GitHub source command after the first PyPI publish -->
190+
<!-- PRE-PYPI: remove the GitHub-source config and the "After PyPI publishing, use:" lead-in after the first PyPI publish; the post-PyPI config fence below survives -->
185191
```json
186192
{
187193
"mcpServers": {
@@ -196,9 +202,9 @@ global settings):
196202
}
197203
}
198204
```
199-
<!-- /PRE-PYPI -->
200205

201206
After PyPI publishing, use:
207+
<!-- /PRE-PYPI -->
202208

203209
```json
204210
{
@@ -215,15 +221,15 @@ After PyPI publishing, use:
215221

216222
Add this to `.codex/config.toml`:
217223

218-
<!-- PRE-PYPI: replace this temporary GitHub source command after the first PyPI publish -->
224+
<!-- PRE-PYPI: remove the GitHub-source config and the "After PyPI publishing, use:" lead-in after the first PyPI publish; the post-PyPI config fence below survives -->
219225
```toml
220226
[mcp_servers.python-docs]
221227
command = "uvx"
222228
args = ["--from", "git+https://github.com/ayhammouda/python-docs-mcp-server.git", "python-docs-mcp-server"]
223229
```
224-
<!-- /PRE-PYPI -->
225230

226231
After PyPI publishing, use:
232+
<!-- /PRE-PYPI -->
227233

228234
```toml
229235
[mcp_servers.python-docs]
@@ -313,15 +319,15 @@ search, or silently fall back to unofficial community mirrors.
313319

314320
## Diagnostics
315321

322+
<!-- PRE-PYPI: remove the GitHub-source doctor invocation and "After PyPI publishing:" lead-in after the first PyPI publish; the post-PyPI code fence below survives -->
316323
Before PyPI publishing, run `doctor` from the GitHub source package:
317324

318-
<!-- PRE-PYPI: replace this temporary GitHub source command after the first PyPI publish -->
319325
```bash
320326
uvx --from git+https://github.com/ayhammouda/python-docs-mcp-server.git python-docs-mcp-server doctor
321327
```
322-
<!-- /PRE-PYPI -->
323328

324329
After PyPI publishing:
330+
<!-- /PRE-PYPI -->
325331

326332
```bash
327333
uvx python-docs-mcp-server doctor
@@ -331,16 +337,16 @@ This checks the runtime Python version, SQLite FTS5, cache/index paths, disk
331337
space, and whether the current interpreter has the `venv`/`ensurepip` support
332338
needed by `build-index`.
333339

340+
<!-- PRE-PYPI: remove the GitHub-source validate-corpus invocation and "After PyPI publishing:" lead-in after the first PyPI publish; the post-PyPI code fence below survives -->
334341
Before PyPI publishing, validate an existing index from the GitHub source
335342
package:
336343

337-
<!-- PRE-PYPI: replace this temporary GitHub source command after the first PyPI publish -->
338344
```bash
339345
uvx --from git+https://github.com/ayhammouda/python-docs-mcp-server.git python-docs-mcp-server validate-corpus
340346
```
341-
<!-- /PRE-PYPI -->
342347

343348
After PyPI publishing:
349+
<!-- /PRE-PYPI -->
344350

345351
```bash
346352
uvx python-docs-mcp-server validate-corpus

0 commit comments

Comments
 (0)