Skip to content

Refresh documentation styling with Furo theme#2934

Open
vlad-perevezentsev wants to merge 18 commits into
masterfrom
update_dpnp_docs
Open

Refresh documentation styling with Furo theme#2934
vlad-perevezentsev wants to merge 18 commits into
masterfrom
update_dpnp_docs

Conversation

@vlad-perevezentsev

Copy link
Copy Markdown
Contributor

This PR proposes a refresh of dpnp documentation styling and layout by migrating to the furo theme and improving the overall API documentation appearance

  • Replace sphinx_rtd_theme with furo
  • Update documentation dependencies in pyproject.toml, building_docs.yml and base_build_docs.txt
  • Redesign the landing page using sphinx-design cards
  • Add custom CSS/JS for cleaner NumPy-style API formatting
  • Improve tables, section headers, parameter formatting and function signatures

dpnp logo (dpnp.svg) will be added in the future

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

@github-actions

Copy link
Copy Markdown
Contributor

View rendered docs @ https://intelpython.github.io/dpnp/pull/2934/index.html

@coveralls

coveralls commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 78.067% (-0.002%) from 78.069% — update_dpnp_docs into master

@github-actions

github-actions Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

Array API standard conformance tests for dpnp=0.21.0dev1=py313h509198e_40 ran successfully.
Passed: 1356
Failed: 4
Skipped: 16

Comment thread doc/_static/dpnp-custom.css
Comment thread doc/_static/dpnp-custom.css
Comment thread doc/index.rst Outdated
Comment thread doc/index.rst
Comment thread doc/index.rst
}

/* Dark mode */
@media (prefers-color-scheme: dark) {

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.

The dark-mode blocks only override table colors. The hardcoded background-color: #f5f5f5 on dd p.rubric / .admonition-title (line 40) is not overridden in dark mode → light text on a near-white background = unreadable section headers and admonition titles.

An an option we can either add matching dark-mode overrides, or better, use furo CSS variables (e.g. --color-background-secondary) which auto-adapt and would let you delete the duplicated dark-mode block entirely.

Comment thread doc/conf.py
"sphinxcontrib.spelling",
]

copybutton_prompt_text = ">>> "

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.

copybutton_prompt_text = ">>> " handles only >>>. Multi-line doctest blocks with ... continuation lines (see dpnp.where for an example) will copy with the ... prompts left in.
It would be better to cover ... also, as an option through:

Suggested change
copybutton_prompt_text = ">>> "
copybutton_prompt_text = r">>> |\.\.\. "
copybutton_prompt_is_regexp = True

return;

var firstP = paragraphs[0];
var idx = firstP.innerHTML.indexOf(separator);

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.

If the separator appears inside an HTML tag/attribute (e.g. a title= with an en dash), substring splits mid-tag and corrupts markup. Locating the boundary via textContent (or DOM walking) might be safer.

}

/* Dark mode */
@media (prefers-color-scheme: dark) {

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.

@media (prefers-color-scheme: dark) table rules (lines 77–84) still apply if the OS is dark but the user toggles furo to light. Furo's own CSS gates these with body:not([data-theme="light"]).

Comment thread doc/conf.py
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

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.

Seems dumplicating

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