Skip to content

Doc/fix more warnings - #7

Merged
Adam Corrao (AdamCorrao) merged 9 commits into
NSLS2:mainfrom
tacaswell:doc/fix_more_warnings
Sep 22, 2026
Merged

Adam Corrao (AdamCorrao) merged 9 commits into
NSLS2:mainfrom
tacaswell:doc/fix_more_warnings

Conversation

@tacaswell

Copy link
Copy Markdown
Contributor

This fixes some docs warnings in a cleaner way and sets up CI for both the docs build and the tests.

Assisted-by: opencode:claude-sonnet-5
Assisted-by: opencode:claude-sonnet-5
Copilot AI lite review requested due to automatic review settings September 11, 2026 02:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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.
    if: >-
      github.repository == 'NSLS2/PowderLine' &&
      (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository)

docs/conf.py:100

  • 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
  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/ci.yaml Outdated
Comment thread docs/conf.py Outdated
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>
Copilot AI review requested due to automatic review settings September 11, 2026 13:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Correct the docs CI condition so documentation builds run for internal pull requests.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread .github/workflows/ci.yaml
Clarified conditions for running docs job in CI.
Copilot AI review requested due to automatic review settings September 22, 2026 20:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Restrict the docs/conf.py fallback to known aliases to avoid silently mislinking references.

Review effort: Lite
Findings: None

Resolved since last review (1)
Previously missed (1)

In code that hasn't changed since last review

Medium severity 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).

Add workaround for Sphinx type-hint rendering of type aliases.
Copilot AI review requested due to automatic review settings September 22, 2026 21:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Fix the invalid docs/conf.py hook before approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)

Comment thread docs/conf.py Outdated
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.
Copilot AI review requested due to automatic review settings September 22, 2026 21:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

docs/conf.py contains syntax errors that prevent documentation builds.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 3 High severity · 1 Low severity

Open (4)

Comment thread docs/conf.py Outdated
Comment thread docs/conf.py
Comment thread docs/known_issues.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 22, 2026 21:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Fix the syntax error in docs/conf.py and correct the inaccurate duplicate documentation entry.

Review effort: Lite
Findings: 1 High severity · 1 Low severity

Open (2)
Resolved since last review (2)

Copilot AI review requested due to automatic review settings September 22, 2026 21:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Correct the contradictory hook-scope statement in docs/known_issues.md.

Review effort: Lite
Findings: None

Resolved since last review (2)

Copilot AI review requested due to automatic review settings September 22, 2026 21:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified.

Review effort: Lite
Findings: None

@AdamCorrao Adam Corrao (AdamCorrao) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR approved to merge.

@AdamCorrao
Adam Corrao (AdamCorrao) merged commit cd28181 into NSLS2:main Sep 22, 2026
3 checks passed
@tacaswell
Thomas A Caswell (tacaswell) deleted the doc/fix_more_warnings branch September 23, 2026 13:52
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.

3 participants