-
Notifications
You must be signed in to change notification settings - Fork 26
Refresh documentation styling with Furo theme #2934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
00371ce
2a2b216
3ff2adf
7530aa9
1e5dfe6
4355506
b5464e3
bb95bb0
b748d2e
bacc702
48f18ff
bf5dcd1
0f1f80c
7bc144a
0bdc775
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| /* Autosummary tables: left-aligned */ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| .longtable.docutils { | ||
| margin-left: 0; | ||
| margin-right: auto; | ||
| } | ||
|
|
||
| /* Admonitions: normal font size, no left accent bar */ | ||
| div.admonition { | ||
| font-size: inherit !important; | ||
| border-left: 0 !important; | ||
| } | ||
|
|
||
| /* Table borders and alternating row backgrounds */ | ||
| body table.docutils tbody tr.row-odd, | ||
| body table.docutils tbody tr.row-even { | ||
| background: transparent !important; | ||
| } | ||
|
|
||
| body table.docutils td, | ||
| body table.docutils th { | ||
| border: 1px solid var(--color-foreground-border) !important; | ||
| padding: 8px 12px; | ||
| } | ||
|
|
||
| body table.docutils thead th { | ||
| background-color: #e8edf2 !important; | ||
| } | ||
|
|
||
| body table.docutils tbody tr.row-odd { | ||
| background-color: #f5f5f5 !important; | ||
| } | ||
|
|
||
| /* Docstring section titles: normal case, bold, gray background */ | ||
| dd p.rubric, | ||
| dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list > dt, | ||
| .admonition > .admonition-title { | ||
| text-transform: none !important; | ||
| font-size: inherit !important; | ||
| font-weight: 700 !important; | ||
| background-color: #f5f5f5; | ||
| padding: 4px 8px; | ||
| } | ||
|
|
||
| /* Constants page: lighter section headers */ | ||
| #constants dd p.rubric { | ||
| background-color: transparent; | ||
| padding: 0; | ||
| border-bottom: 1px solid #ccc; | ||
| } | ||
|
|
||
| /* Function signatures: normal weight, bold only for name and param names */ | ||
| dt.sig.sig-object, | ||
| dt.sig.sig-object * { | ||
| font-weight: 400 !important; | ||
| } | ||
|
|
||
| dt.sig.sig-object .sig-name, | ||
| dt.sig.sig-object .sig-name *, | ||
| dt.sig.sig-object .sig-param > .n, | ||
| dt.sig.sig-object .sig-param > .n * { | ||
| font-weight: 700 !important; | ||
| } | ||
|
|
||
| /* Parameter/return descriptions: indented on new line (via custom.js) */ | ||
| dl.field-list dd .param-desc { | ||
| display: inline-block; | ||
| padding-left: 1.5em; | ||
| } | ||
|
|
||
| /* Parameter lists: no bullets, keep indentation */ | ||
| dl.field-list dd ul.simple { | ||
| list-style: none !important; | ||
| padding-left: 1.2em !important; | ||
| } | ||
|
|
||
| /* Dark mode */ | ||
| @media (prefers-color-scheme: dark) { | ||
| body table.docutils thead th { | ||
| background-color: #2a2e33 !important; | ||
| } | ||
| body table.docutils tbody tr.row-odd { | ||
| background-color: #1e2227 !important; | ||
| } | ||
| } | ||
|
|
||
| body[data-theme="dark"] table.docutils thead th { | ||
| background-color: #2a2e33 !important; | ||
| } | ||
| body[data-theme="dark"] table.docutils tbody tr.row-odd { | ||
| background-color: #1e2227 !important; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| (function() { | ||
| var separator = " – "; | ||
| var separatorAlt = " -- "; | ||
|
|
||
| function reformatEntry(container) | ||
| { | ||
| var paragraphs = container.querySelectorAll(":scope > p"); | ||
| if (!paragraphs.length) | ||
| return; | ||
|
|
||
| var firstP = paragraphs[0]; | ||
| var idx = firstP.innerHTML.indexOf(separator); | ||
| var sep = separator; | ||
| if (idx === -1) { | ||
| idx = firstP.innerHTML.indexOf(separatorAlt); | ||
| sep = separatorAlt; | ||
| } | ||
| if (idx === -1) | ||
| return; | ||
|
|
||
| var before = firstP.innerHTML.substring(0, idx); | ||
| var after = firstP.innerHTML.substring(idx + sep.length); | ||
|
|
||
| var extra = []; | ||
| for (var i = 1; i < paragraphs.length; i++) { | ||
| extra.push(paragraphs[i].innerHTML); | ||
| paragraphs[i].remove(); | ||
| } | ||
| if (extra.length) | ||
| after += (after ? "<br>" : "") + extra.join("<br>"); | ||
|
|
||
| firstP.innerHTML = | ||
| before + '<br><span class="param-desc">' + after + "</span>"; | ||
| } | ||
|
|
||
| document.querySelectorAll("dl.field-list dd ul.simple li") | ||
| .forEach(reformatEntry); | ||
| document.querySelectorAll("dl.field-list dd").forEach(function(dd) { | ||
| if (!dd.querySelector("ul.simple")) | ||
| reformatEntry(dd); | ||
| }); | ||
| })(); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,87 @@ | ||
| .. _index: | ||
| .. include:: ./ext_links.txt | ||
|
|
||
| =================================== | ||
| Data Parallel Extension for NumPy* | ||
| ================================== | ||
| =================================== | ||
|
|
||
| .. module:: dpnp | ||
| :no-index: | ||
|
|
||
| Python package :py:mod:`dpnp` implements a subset of `NumPy*`_ that can be | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be better to rephrase something like: I wonder about using the word
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also we started to add implementation for some SciPy-relating function and so probably need to highlight that as well. |
||
| executed on any data parallel device. The subset is a drop-in replacement of | ||
| core `NumPy*`_ functions and numerical data types. | ||
|
|
||
| .. grid:: 2 | ||
| :gutter: 3 | ||
|
|
||
| .. grid-item-card:: Overview | ||
|
|
||
| Learn about the Data Parallel Extension for NumPy*, its design | ||
| principles, and what it provides. | ||
|
|
||
| +++ | ||
|
|
||
| .. button-ref:: overview | ||
| :ref-type: doc | ||
| :expand: | ||
| :color: secondary | ||
| :click-parent: | ||
|
|
||
| To the overview | ||
|
|
||
| .. grid-item-card:: Quick Start Guide | ||
|
|
||
| Get started with installation, setup, and your first dpnp program. | ||
|
|
||
| +++ | ||
|
|
||
| .. button-ref:: quick_start_guide | ||
| :ref-type: doc | ||
| :expand: | ||
| :color: secondary | ||
| :click-parent: | ||
|
|
||
| To the quick start guide | ||
|
|
||
| .. grid-item-card:: API Reference | ||
|
|
||
| Detailed documentation of all supported NumPy functions and classes | ||
| in :py:mod:`dpnp`. | ||
|
|
||
| +++ | ||
|
|
||
| .. button-ref:: dpnp_reference | ||
| :ref-type: ref | ||
| :expand: | ||
| :color: secondary | ||
| :click-parent: | ||
|
|
||
| Access API Reference | ||
|
|
||
| .. grid-item-card:: Tensor (dpnp.tensor) | ||
|
|
||
| The underlying Array API-compliant implementation based on | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to place a link to dpctl documentaion? |
||
| data-parallel algorithms for accelerators. | ||
|
|
||
| +++ | ||
|
|
||
| .. button-ref:: tensor | ||
| :ref-type: doc | ||
| :expand: | ||
| :color: secondary | ||
| :click-parent: | ||
|
|
||
| To the tensor documentation | ||
|
|
||
|
|
||
| .. toctree:: | ||
| :maxdepth: 2 | ||
| :hidden: | ||
| :caption: Contents: | ||
|
|
||
| overview | ||
| quick_start_guide | ||
| reference/index | ||
| tensor | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 1 | ||
| :caption: Development information | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to have that on the main page as well with some description? |
||
|
|
||
| dpnp_backend_api | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| pyenchant==3.2.2 | ||
| sphinx-copybutton==0.5.2 | ||
| sphinx-design==0.6.1 | ||
| sphinxcontrib-googleanalytics==0.4 | ||
| sphinxcontrib-spelling==8.0.1 |

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tab with rendered documentation is currently named as:
dpnpData Parallel ...- without any space or separator.It might be better to do as dpctl:
Data Parallel Control (dpctl)