Fix: book build — configure mkdocstrings paths=[src] (no editable install) - #556
Merged
Conversation
…itable install The v0.19.3 sync dropped `--with-editable .` from the book command (the Rhiza smoke test test_default_book_command_does_not_use_editable_install forbids it). But the book's API reference is generated by mkdocstrings, which then could no longer import the src-layout `basanos` package from the uvx-isolated build env: mkdocstrings: accessing 'basanos' raises ModuleNotFoundError: No module named 'basanos' PluginError: Could not collect 'basanos.BasanosError' Set `paths: [src]` on the python handler so griffe resolves the package by source path — the canonical src-layout configuration. The book now builds with the API docs fully collected and no editable install, satisfying both the book and the Rhiza no-editable smoke test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the docs “book” build failure introduced after the Rhiza v0.19.3 sync by making mkdocstrings/griffe resolve the basanos package via source-path discovery (src-layout) instead of requiring an editable install in the isolated build environment.
Changes:
- Configure the mkdocstrings Python handler with
paths: [src]so API reference generation works without installing the package (and without--with-editable .).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After the v0.19.3 Rhiza sync (#555), the book build broke:
```
mkdocstrings: accessing 'basanos' raises ModuleNotFoundError: No module named 'basanos'
PluginError: Could not collect 'basanos.BasanosError'
make: *** [.rhiza/make.d/book.mk:52: book] Error 1
```
Root cause
The sync dropped `--with-editable .` from `MKDOCS_EXTRA_PACKAGES` because the Rhiza smoke test `test_default_book_command_does_not_use_editable_install` forbids it. The book's API reference is generated by mkdocstrings, which then could no longer import the src-layout `basanos` package from the `uvx`-isolated build environment — the editable install was the only thing making it importable.
Fix
Set `paths: [src]` on the mkdocstrings python handler in `mkdocs.yml`. This is the canonical src-layout configuration: griffe resolves the package by source path (static analysis, no import/install needed). Satisfies both constraints — the book builds and the no-editable-install smoke test stays green.
Verification
🤖 Generated with Claude Code