Skip to content

Commit 4e1c0db

Browse files
Clean up stale documentation and references (#3106)
This PR cleans up stale documentation and references, one commit per change: 1. **Quick start guide.** The testing section suggested `pytest -s tests`, but there is no top-level `tests` directory; it now gives `python -m pytest dpnp/tests` for the source tree and `python -m pytest --pyargs dpnp.tests` for an installed package. The scikit-build recipes now pass `--no-build-isolation` to `pip install -e .`, as `scripts/build_locally.py` does, so pip doesn't rebuild the package in an isolated environment with build dependencies from PyPI. The guide now says the driver script works on Linux and Windows, and a `code-block` that didn't render because it had no blank line before its content is fixed. 2. **API reference toctree.** `doc/reference/index.rst` listed 14 pages that don't exist (`special`, `sparse`, `ndimage`, `generic`, `memory`, `cuda`, `memoize`, `kernel`, `optimize`, `interoperability`, `testing`, `prof`, `environment`, `misc`); they are removed. `doc/reference/polynomials.rst`, a placeholder whose entries are all commented out and which `routines.rst` leaves out on purpose, is marked `:orphan:`. Both produced Sphinx warnings. 3. **Stale files and references.** - `.github/workflows/Windows-IntelLLVM_3.22.cmake` is removed: nothing uses it, and `conda-recipe/bld.bat` applies only the 3.26 copy. - `doc/docstring_template.py` described a fallback to NumPy and an array printing format that no longer exist; it now shows the docstring layout dpnp uses. - The 110 `dpctl.tensor` references left in `dpnp/tensor` docstrings and comments now say `dpnp.tensor`. Every referenced name exists in `dpnp.tensor`; on the same lines, `:module:` is fixed to `:mod:` and a misspelled `usm_ndarrays` to `usm_ndarray`. 30b894b
1 parent 9ffa423 commit 4e1c0db

6 files changed

Lines changed: 32 additions & 28 deletions

File tree

‎_sources/quick_start_guide.rst.txt‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,16 @@ To build and install the package on Linux OS, run:
113113
.. code-block:: bash
114114
115115
python setup.py build_ext --inplace -- -G Ninja -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icpx
116-
python -m pip install -e .
116+
python -m pip install -e . --no-build-isolation
117117
118118
To build and install the package on Windows OS, run:
119119

120120
.. code-block:: bash
121121
122122
python setup.py build_ext --inplace -- -G Ninja -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx
123-
python -m pip install -e .
123+
python -m pip install -e . --no-build-isolation
124124
125-
Alternatively, to develop on Linux OS, you can use the driver script:
125+
Alternatively, to develop on Linux or Windows OS, you can use the driver script:
126126

127127
.. code-block:: bash
128128
@@ -200,6 +200,7 @@ You can then use one of them as the argument to ``--target-hip``.
200200
For example:
201201

202202
.. code-block:: bash
203+
203204
python scripts/build_locally.py --target-hip=gfx90a
204205
205206
Multi-target build
@@ -235,12 +236,18 @@ These options are useful when building pybind11 extensions that use
235236
Testing
236237
=======
237238

238-
If you want to execute the scope of Python test suites which are available
239-
by the source, you will need to run a command as below:
239+
To run the test suite from the source tree, after building the package as
240+
described above, run:
241+
242+
.. code-block:: bash
243+
244+
python -m pytest dpnp/tests
245+
246+
To run the tests of an installed ``dpnp`` package, run:
240247

241248
.. code-block:: bash
242249
243-
pytest -s tests
250+
python -m pytest --pyargs dpnp.tests
244251
245252
Examples
246253
========

‎_sources/reference/index.rst.txt‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,7 @@ API reference of the Data Parallel Extension for NumPy*
1616
ndarray
1717
ufunc
1818
routines
19-
special
2019
scipy
21-
sparse
22-
ndimage
23-
generic
24-
memory
25-
cuda
26-
memoize
27-
kernel
28-
optimize
29-
interoperability
30-
testing
31-
prof
32-
environment
3320
dtypes_table
3421
comparison
35-
misc
3622
array_api

‎_sources/reference/polynomials.rst.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
:orphan:
2+
3+
.. Not in any toctree until dpnp implements the polynomial routines.
4+
15
.. currentmodule:: dpnp
26

37
Polynomials

‎quick_start_guide.html‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,15 +1148,15 @@ <h3>Build and Install with scikit-build<a class="headerlink" href="#build-and-in
11481148
</div>
11491149
<p>To build and install the package on Linux OS, run:</p>
11501150
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>setup.py<span class="w"> </span>build_ext<span class="w"> </span>--inplace<span class="w"> </span>--<span class="w"> </span>-G<span class="w"> </span>Ninja<span class="w"> </span>-DCMAKE_C_COMPILER:PATH<span class="o">=</span>icx<span class="w"> </span>-DCMAKE_CXX_COMPILER:PATH<span class="o">=</span>icpx
1151-
python<span class="w"> </span>-m<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>-e<span class="w"> </span>.
1151+
python<span class="w"> </span>-m<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>-e<span class="w"> </span>.<span class="w"> </span>--no-build-isolation
11521152
</pre></div>
11531153
</div>
11541154
<p>To build and install the package on Windows OS, run:</p>
11551155
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>setup.py<span class="w"> </span>build_ext<span class="w"> </span>--inplace<span class="w"> </span>--<span class="w"> </span>-G<span class="w"> </span>Ninja<span class="w"> </span>-DCMAKE_C_COMPILER:PATH<span class="o">=</span>icx<span class="w"> </span>-DCMAKE_CXX_COMPILER:PATH<span class="o">=</span>icx
1156-
python<span class="w"> </span>-m<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>-e<span class="w"> </span>.
1156+
python<span class="w"> </span>-m<span class="w"> </span>pip<span class="w"> </span>install<span class="w"> </span>-e<span class="w"> </span>.<span class="w"> </span>--no-build-isolation
11571157
</pre></div>
11581158
</div>
1159-
<p>Alternatively, to develop on Linux OS, you can use the driver script:</p>
1159+
<p>Alternatively, to develop on Linux or Windows OS, you can use the driver script:</p>
11601160
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>scripts/build_locally.py
11611161
</pre></div>
11621162
</div>
@@ -1212,6 +1212,9 @@ <h4>AMD build<a class="headerlink" href="#amd-build" title="Link to this heading
12121212
<p>This will print names like <code class="docutils literal notranslate"><span class="pre">gfx90a</span></code>, <code class="docutils literal notranslate"><span class="pre">gfx1030</span></code>, etc.
12131213
You can then use one of them as the argument to <code class="docutils literal notranslate"><span class="pre">--target-hip</span></code>.</p>
12141214
<p>For example:</p>
1215+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>scripts/build_locally.py<span class="w"> </span>--target-hip<span class="o">=</span>gfx90a
1216+
</pre></div>
1217+
</div>
12151218
</section>
12161219
<section id="multi-target-build">
12171220
<h4>Multi-target build<a class="headerlink" href="#multi-target-build" title="Link to this heading"></a></h4>
@@ -1240,9 +1243,13 @@ <h2>Command-Line Interface<a class="headerlink" href="#command-line-interface" t
12401243
</section>
12411244
<section id="testing">
12421245
<h2>Testing<a class="headerlink" href="#testing" title="Link to this heading"></a></h2>
1243-
<p>If you want to execute the scope of Python test suites which are available
1244-
by the source, you will need to run a command as below:</p>
1245-
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>pytest<span class="w"> </span>-s<span class="w"> </span>tests
1246+
<p>To run the test suite from the source tree, after building the package as
1247+
described above, run:</p>
1248+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>-m<span class="w"> </span>pytest<span class="w"> </span>dpnp/tests
1249+
</pre></div>
1250+
</div>
1251+
<p>To run the tests of an installed <code class="docutils literal notranslate"><span class="pre">dpnp</span></code> package, run:</p>
1252+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python<span class="w"> </span>-m<span class="w"> </span>pytest<span class="w"> </span>--pyargs<span class="w"> </span>dpnp.tests
12461253
</pre></div>
12471254
</div>
12481255
</section>

‎reference/comparison.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@
10681068
<h1>Comparison Table NumPy/ DPNP/ CuPy<a class="headerlink" href="#comparison-table-numpy-dpnp-cupy" title="Link to this heading">¶</a></h1>
10691069
<p>Here is a list of NumPy and CuPy APIs and its corresponding DPNP implementations.</p>
10701070
<p><code class="docutils literal notranslate"><span class="pre">-</span></code> in DPNP column means that DPNP implementation is not provided yet.</p>
1071-
<p><strong>NumPy(v2.5.4) / DPNP(v0.21.0dev15+1.g674bc14fdfa) / CuPy(v14.2.0) APIs</strong></p>
1071+
<p><strong>NumPy(v2.5.4) / DPNP(v0.21.0dev15+2.g30b894bdbc8) / CuPy(v14.2.0) APIs</strong></p>
10721072
<section id="summary">
10731073
<h2>Summary<a class="headerlink" href="#summary" title="Link to this heading">¶</a></h2>
10741074
<div class="table-wrapper docutils container">

‎searchindex.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)