Skip to content

Fix documentation build warnings#1648

Open
brianhelba wants to merge 1 commit intodjango-oauth:masterfrom
brianhelba:doc-warning
Open

Fix documentation build warnings#1648
brianhelba wants to merge 1 commit intodjango-oauth:masterfrom
brianhelba:doc-warning

Conversation

@brianhelba
Copy link
Copy Markdown
Contributor

@brianhelba brianhelba commented Feb 3, 2026

Fixes as many Sphinx warnings as possible.

Checklist

  • PR only contains one change (considered splitting up PR)
  • unit-test added
  • documentation updated
  • CHANGELOG.md updated (only for user relevant changes)
  • author name in AUTHORS
  • tests/app/idp updated to demonstrate new features
  • tests/app/rp updated to demonstrate new features

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@brianhelba brianhelba force-pushed the doc-warning branch 2 times, most recently from b98ac8f to 890f2cb Compare February 3, 2026 03:14
@brianhelba
Copy link
Copy Markdown
Contributor Author

@dopry Please take a look.

@dopry dopry requested a review from Copilot March 12, 2026 20:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Reduces Sphinx documentation build warnings by cleaning up references, headings, and code-block directives across the docs.

Changes:

  • Replaced/updated a model docstring reference to a concrete OpenID Connect spec URL.
  • Removed the standalone mixins views doc and adjusted views documentation structure/links.
  • Fixed multiple reStructuredText formatting issues (headings, blank lines, code-block language).

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
oauth2_provider/models.py Updates the ID Token docstring to link directly to the OIDC specification section.
docs/views/views.rst Removes mixins from the views toctree.
docs/views/mixins.rst Deletes the dedicated mixins page.
docs/views/details.rst Adds an explicit mixins reference label before the Mixins section.
docs/views/class_based.rst Updates the mixins cross-reference to use :ref:.
docs/settings.rst Fixes heading underline lengths for multiple OIDC settings.
docs/oidc.rst Adds blank lines before literal blocks to satisfy rst/Sphinx formatting.
docs/management_commands.rst Uses a more appropriate code-block:: console directive and trims trailing whitespace.
docs/contributing.rst Adds blank lines around code blocks/lists to satisfy rst/Sphinx formatting.
docs/conf.py Updates Django intersphinx URL to the current HTTPS docs domain.

@brianhelba
Copy link
Copy Markdown
Contributor Author

Just applied suggestions from Copilot. Both were valid.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

:maxdepth: 2

function_based
class_based
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@brianhelba it would be nice to preserve those links. Can you look into that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Resolved.

@brianhelba brianhelba force-pushed the doc-warning branch 2 times, most recently from 0a3fc49 to 4d23437 Compare March 17, 2026 06:31
@brianhelba
Copy link
Copy Markdown
Contributor Author

I've just rebased this on top of #1620, which fixed a number of the issues originally in this PR. However, there are still some improvements remaining in this PR.

@dopry I've responded to the feedback by moving and consolidating the mixins docs, but preserving the old page as a stub. Please take a look.

@brianhelba
Copy link
Copy Markdown
Contributor Author

@dopry Ping. This one is ready for final review and merge.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

.. automodule:: oauth2_provider.views.mixins
:members:
The mixins documentation has moved to the :ref:`mixins` section in
:doc:`details`.
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

:doc:details`` likely points to a non-existent document (Sphinx :doc: expects a docname from the docs root). Since the target file is `docs/views/details.rst` (docname `views/details`), update this link to reference `views/details` (optionally with custom link text) so the stub page doesn’t introduce an `unknown document` warning.

Suggested change
:doc:`details`.
:doc:`views/details`.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@brianhelba can you confirm whether this is valid feedback or not?

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