Skip to content

Support :project: in comma-separated REPL package lists#26

Draft
chrizzFTD wants to merge 3 commits into
mainfrom
cursor/project-package-lists-370c
Draft

Support :project: in comma-separated REPL package lists#26
chrizzFTD wants to merge 3 commits into
mainfrom
cursor/project-package-lists-370c

Conversation

@chrizzFTD

@chrizzFTD chrizzFTD commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes :project: resolution so it works as one entry in a comma-separated package spec for both pyrepl_autodoc_packages and .. py-repl:: :packages:. Comma-separated lists were already supported at the HTML/micropip layer; this closes the gap where :project: required an exact whole-value match and could not be combined with other packages.

Example (Grill-style):

pyrepl_autodoc_packages = ":project:,grill-usd-core==26.8,grill-names>=2.6.0"
pyrepl_project_root = "../.."

Changes

  • New sphinx_pyrepl_web/_packages.py (private): parse_packages, format_packages, is_project_entry, packages_include_project, substitute_project, resolve_packages
  • Refactor wheel caching: app._pyrepl_project_wheel_href replaces app._pyrepl_resolved_autodoc_packages (caches only the built wheel path, not the full spec)
  • Remove internal is_project_sentinel() helper (undocumented; superseded by per-entry detection)
  • Wire resolve_packages() into _autodoc_packages() and PyRepl.run() for :packages:
  • Config pyrepl_autodoc_packages now accepts str | list
  • Docs updated with combined-list examples for autodoc config and directive options
  • Version bump to 0.4.1

Test plan

  • tests/unit/test_packages.py — parse, substitute, dedupe, mixed specs
  • tests/unit/test_config.py_autodoc_packages resolves :project:, numpy
  • tests/unit/test_wheel.pyproject_wheel_href cache behavior
  • tests/integration/test_project_wheel.py — mixed autodoc spec builds wheel + emits extra package
  • tests/integration/test_directive_project.py — directive :packages: :project: builds wheel
  • Full suite: 86 passed
Open in Web Open in Cursor 

Introduce sphinx_pyrepl_web.packages with parse/format/substitute helpers
and resolve_packages() so :project: can appear alongside PyPI names or
wheel paths in pyrepl_autodoc_packages and .. py-repl:: :packages:.

Replace the all-or-nothing _pyrepl_resolved_autodoc_packages override with
a cached _pyrepl_project_wheel_href. Remove is_project_sentinel().

Bump version to 0.5.0. Add unit and integration tests plus docs for Grill-style
combined specs.

Co-authored-by: chrizzftd <chrizzFTD@users.noreply.github.com>
@read-the-docs-community

read-the-docs-community Bot commented Jul 7, 2026

Copy link
Copy Markdown

Documentation build overview

📚 sphinx-pyrepl-web | 🛠️ Build #33486544 | 📁 Comparing 2b1ca30 against latest (8bc36f7)

  🔍 Preview build  

2 files changed
± development.html
± index.html

cursoragent and others added 2 commits July 7, 2026 21:51
Co-authored-by: chrizzftd <chrizzFTD@users.noreply.github.com>
Co-authored-by: chrizzftd <chrizzFTD@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants