You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Fix the CI trigger condition and narrow the Sphinx fallback before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This pull request fixes Sphinx documentation warnings and adds CI jobs for tests and documentation builds.
Changes:
Preserves and documents refinement type aliases.
Refines Sphinx cross-reference and warning handling.
Adds GitHub Actions test and documentation jobs.
File summaries
File
Review
src/powderline/schema.py
Documents RefinementParameter and enables postponed annotations.
docs/known_issues.md
Records the documentation-warning work.
docs/conf.py
Contains a typo and an overly broad cross-reference fallback that should be narrowed.
.github/workflows/ci.yaml
Same-repository pull requests can skip the test job due to the workflow condition.
Review details
Suppressed comments (2)
.github/workflows/ci.yaml:49
The docs job has the same condition as the test job, so same-repository PRs skip the docs build as well: the only configured push run is for main, while this excludes the PR event. Remove the same-repository exclusion (or trigger pushes for all branches) so internal PRs get the warning-free docs check promised by this workflow.
The fallback is broader than the type-alias case described in the docstring: every unresolved Python class or obj reference is retried with the generic obj role. A misspelled class reference can therefore resolve to an unrelated function/data object with the same name and suppress the intended nitpicky warning; restrict this to the known RefinementParameter alias (and py:class refs).
if node.get('refdomain') != 'py' or node.get('reftype') not in {'class', 'obj'}:
return None
py_domain = env.get_domain('py')
return py_domain.resolve_xref(
env, node['refdoc'], app.builder, 'obj', node['reftarget'], node, contnode
Robot B is fixing robot A's work.
It makes sense to allow the all-in-repo workflow.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Restrict unresolved class reference fallback to known aliases
docs/conf.py:97
This fallback is broader than the documented type-alias workaround: every unresolved Python class or obj reference is retried as obj. If a genuine class reference is misspelled or an ordinary class name collides with a function/data object, Sphinx can silently produce an incorrect link instead of retaining the nitpicky warning. Restrict the retry to the known RefinementParameter alias (or an explicit alias set).
Clarified behavior of the `missing-reference` hook in `docs/conf.py` regarding `RefinementParameter` references and type-hint rendering. Updated documentation to improve hyperlinking for known aliases and reduce warnings.
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
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.
This fixes some docs warnings in a cleaner way and sets up CI for both the docs build and the tests.