Skip to content

Using sphinxcontrib.spelling as extension #1800

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

Merged
merged 19 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0d671d2
Using sphinxcontrib.spelling as extension
antonwolfy Apr 23, 2024
1edaf7c
Installing enchant package required by sphinxcontrib-spelling
antonwolfy Apr 23, 2024
7edf1ad
Run a spelling checker for docs
antonwolfy Apr 23, 2024
98e32a7
Installing pyenchant package
antonwolfy Apr 23, 2024
3c00b68
Aligned docstrings of elementwise functions with dpctl.tensor
antonwolfy Apr 24, 2024
526dad7
Aligned docstrings of returns in elementwise functions with dpctl.tensor
antonwolfy Apr 25, 2024
138a2a0
Install enchant apt package
antonwolfy Apr 25, 2024
97686cb
Extend dictionary with dpnp, dtype, ndarray, ufunc and ufuncs words
antonwolfy Apr 25, 2024
c5b72f0
Fixed spelling issues and added 15 new words to known list
antonwolfy Apr 25, 2024
0e058a0
Fixed spelling issues and added 7 new words to known list
antonwolfy Apr 25, 2024
f0bdc17
Fixed spelling issues and added 15 new words to known list
antonwolfy Apr 25, 2024
d991cfa
Fixed spelling issues and added 10 new words to known list
antonwolfy Apr 25, 2024
1c0a881
Fixed spelling issues and added 4 new words to known list
antonwolfy Apr 25, 2024
cf3159e
Fixed spelling issues and added 7 new words to known list
antonwolfy Apr 25, 2024
a4e9c04
Added missing docstrings to ndarray methods
antonwolfy Apr 26, 2024
12df230
Fixed building issue in ndarray.rst
antonwolfy Apr 26, 2024
f4412cc
Resolved a warning: term not in glossary: 'universal function'
antonwolfy Apr 26, 2024
cbd746e
Merge branch 'master' into add-sphinxcontrib.spelling-as-extension
antonwolfy Apr 29, 2024
573142f
Resolve a warning after rebase with master
antonwolfy Apr 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/build-sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ jobs:
intel-oneapi-mkl-devel \
intel-oneapi-compiler-dpcpp-cpp

# required by sphinxcontrib-spelling extension
- name: Install enchant package
run: |
sudo apt-get install enchant-2

# https://github.com/marketplace/actions/checkout
- name: Install nvidia-cuda support drivers
run: |
Expand All @@ -103,7 +108,8 @@ jobs:
- name: Install sphinx dependencies
run: |
conda install sphinx sphinx_rtd_theme
pip install sphinxcontrib-googleanalytics==0.4
pip install sphinxcontrib-googleanalytics==0.4 \
pyenchant sphinxcontrib-spelling

- name: Install dpnp dependencies
run: |
Expand All @@ -122,6 +128,10 @@ jobs:
- name: Build library
run: python scripts/build_locally.py

- name: Run a spelling checker for docs
run: make spelling
working-directory: doc

- name: Build docs
run: make html
working-directory: doc
Expand Down
7 changes: 7 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,18 @@
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinxcontrib.googleanalytics",
"sphinxcontrib.spelling",
]

googleanalytics_id = "G-554F8VNE28"
googleanalytics_enabled = True

# Enable a misspelling as a sphinx warning
spelling_warning = True

# Define a list of words known to be spelled correctly
spelling_word_list_filename = "known_words.txt"

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

Expand Down
68 changes: 68 additions & 0 deletions doc/known_words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
backend
bitwise
boolean
broadcastable
broadcasted
byteorder
Cholesky
conda
Decompositions
dimensionality
docstring
dpctl
dpnp
dtype
dtypes
einsum
endian
eps
epsneg
Extrema
finfo
finiteness
Fortran
Frobenius
Hypergeometric
iinfo
Infs
iterable
Lomax
Mersenne
meshgrid
Mises
multinomial
NaN
NaT
ndarray
ndarrays
ndim
normed
oneAPI
orthonormal
Penrose
Polyutils
prepend
prepending
representable
runtimes
scikit
signbit
signum
subarray
subarrays
subclasses
subtype
SyclDevice
SyclQueue
th
ufunc
ufuncs
Unary
unicode
usm
Vandermonde
vectorized
von
Weibull
whitespace
Zipf
2 changes: 1 addition & 1 deletion doc/quick_start_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ And to build dpnp package from the sources:

conda build conda-recipe -c intel -c conda-forge

Finanly, to install the result package:
Finally, to install the result package:

.. code-block:: bash

Expand Down
2 changes: 1 addition & 1 deletion doc/reference/binary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Binary Operations

.. https://docs.scipy.org/doc/numpy/reference/routines.bitwise.html

Elementwise bit operations
Element-wise bit operations
--------------------------

.. autosummary::
Expand Down
29 changes: 27 additions & 2 deletions doc/reference/ndarray.rst
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ Each of the arithmetic operations (``+``, ``-``, ``*``, ``/``, ``//``,
``%``, ``divmod()``, ``**`` or ``pow()``, ``<<``, ``>>``, ``&``,
``^``, ``|``, ``~``) and the comparisons (``==``, ``<``, ``>``,
``<=``, ``>=``, ``!=``) is equivalent to the corresponding
universal function (or **ufunc** for short) in DPNP. For
universal function (or :term:`ufunc` for short) in DPNP. For
more information, see the section on :ref:`Universal Functions
<ufunc>`.
<ufuncs>`.


Comparison operators:
Expand All @@ -249,6 +249,23 @@ Comparison operators:
dpnp.ndarray.__eq__
dpnp.ndarray.__ne__

Truth value of an array (:func:`bool()`):

.. autosummary::
:toctree: generated/

dpnp.ndarray.__bool__

.. note::

Truth-value testing of an array invokes
:meth:`dpnp.ndarray.__bool__`, which raises an error if the number of
elements in the array is larger than 1, because the truth value
of such arrays is ambiguous. Use :meth:`.any() <dpnp.ndarray.any>` and
:meth:`.all() <dpnp.ndarray.all>` instead to be clear about what is meant
in such cases. (If the number of elements is 0, the array evaluates
to ``False``.)


Unary operations:

Expand Down Expand Up @@ -303,6 +320,14 @@ Arithmetic, in-place:
dpnp.ndarray.__ixor__


Matrix Multiplication:

.. autosummary::
:toctree: generated/

dpnp.ndarray.__matmul__


Special methods
---------------

Expand Down
2 changes: 1 addition & 1 deletion doc/reference/ufunc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Universal Functions (ufunc)

.. https://docs.scipy.org/doc/numpy/reference/ufuncs.html

DPNP provides universal functions (a.k.a. ufuncs) to support various elementwise operations.
DPNP provides universal functions (a.k.a. ufuncs) to support various element-wise operations.

Available ufuncs
----------------
Expand Down
2 changes: 1 addition & 1 deletion dpnp/dparray.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ cdef class dparray:
Limitations
-----------
Input array is supported as :obj:`dpnp.ndarray`.
Input kth is supported as :obj:`int`.
Input `kth` is supported as :obj:`int`.
Parameters `axis`, `kind` and `order` are supported only with default values.

"""
Expand Down
Loading