Support :project: in comma-separated REPL package lists#26
Draft
chrizzFTD wants to merge 3 commits into
Draft
Conversation
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>
Documentation build overview
|
Co-authored-by: chrizzftd <chrizzFTD@users.noreply.github.com>
Co-authored-by: chrizzftd <chrizzFTD@users.noreply.github.com>
6 tasks
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
Fixes
:project:resolution so it works as one entry in a comma-separated package spec for bothpyrepl_autodoc_packagesand.. 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):
Changes
sphinx_pyrepl_web/_packages.py(private):parse_packages,format_packages,is_project_entry,packages_include_project,substitute_project,resolve_packagesapp._pyrepl_project_wheel_hrefreplacesapp._pyrepl_resolved_autodoc_packages(caches only the built wheel path, not the full spec)is_project_sentinel()helper (undocumented; superseded by per-entry detection)resolve_packages()into_autodoc_packages()andPyRepl.run()for:packages:pyrepl_autodoc_packagesnow acceptsstr | list0.4.1Test plan
tests/unit/test_packages.py— parse, substitute, dedupe, mixed specstests/unit/test_config.py—_autodoc_packagesresolves:project:, numpytests/unit/test_wheel.py—project_wheel_hrefcache behaviortests/integration/test_project_wheel.py— mixed autodoc spec builds wheel + emits extra packagetests/integration/test_directive_project.py— directive:packages: :project:builds wheel