Skip to content

Commit

Permalink
Applied review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
antonwolfy committed Jul 19, 2023
1 parent 2420ede commit 131a56d
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 11 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/build-sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
types: [opened, synchronize, reopened, closed]

permissions:
pull-requests: write

env:
PUBLISH_DIR: doc/_build/html/

Expand Down Expand Up @@ -122,7 +125,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.PUBLISH_DIR }}

- name: Deploy docs [PR]
- name: Publish pull-request docs
if: |
!github.event.pull_request.head.repo.fork && github.event.pull_request && github.event.action != 'closed'
uses: peaceiris/[email protected]
Expand All @@ -136,6 +139,17 @@ jobs:
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'

- name: Comment with URL to published pull-request docs
if: |
!github.event.pull_request.head.repo.fork && github.event.pull_request && github.event.action != 'closed'
env:
PR_NUM: ${{ github.event.number }}
uses: mshick/[email protected]
with:
message: |
View rendered docs @ https://intelpython.github.io/dpnp/pulls/${{ env.PR_NUM }}/index.html
allow-repeats: false

clean:
if: |
!github.event.pull_request.head.repo.fork && github.event.pull_request && github.event.action == 'closed'
Expand All @@ -162,3 +176,11 @@ jobs:
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git commit -m "Removing docs for closed pull request ${PR_NUM}"
git push tokened_docs gh-pages
- name: Modify the comment with URL to published pull-request docs
uses: mshick/[email protected]
with:
find: |
View rendered docs @.+
replace: |
View rendered docs @ https://intelpython.github.io/dpnp/index.html
2 changes: 1 addition & 1 deletion doc/dpnp_backend_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
C++ backend API Reference
*************************

`DPNP C++ backend <backend_doc/>`_
`C++ backend of Data Parallel Extension for NumPy* <backend_doc/>`_
2 changes: 1 addition & 1 deletion doc/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ functions and numerical data types.
The Data Parallel Extension for NumPy* is being developed as part of
`Intel AI Analytics Toolkit`_ and is distributed with the
`Intel Distribution for Python*`_. The dpnp package is also available
on Anaconda cloud. Please refer the :doc:`getting_started` page to learn more.
on Anaconda cloud. Please refer the :doc:`quick_start_guide` page to learn more.

Being drop-in replacement for `NumPy*`_ means that the usage is very similar:

Expand Down
4 changes: 2 additions & 2 deletions doc/quick_start_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ Install Package from Anaconda
It is recommended to use conda packages from the ``anaconda.org/intel``
channel. You will need one of the commands below:

* Conda: ``conda install dpnp``
* Conda: ``conda install dpnp -c intel -c conda-forge``

* Pip: ``pip install dpnp``
* Pip: ``pip install -i https://pypi.anaconda.org/intel/simple dpnp``

These commands install dpnp package along with its dependencies, including
``dpctl`` package with `Data Parallel Control Library`_ and all required
Expand Down
4 changes: 2 additions & 2 deletions doc/reference/difference.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Difference between DPNP and NumPy
=================================
Difference with NumPy*
======================

.. _Data types:

Expand Down
2 changes: 1 addition & 1 deletion dpnp/backend/doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ PROJECT_NUMBER = 0.12.1
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.

PROJECT_BRIEF = "NumPy-like API accelerated with SYCL"
PROJECT_BRIEF = "Data Parallel Extension for NumPy*"

# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55
Expand Down
10 changes: 7 additions & 3 deletions dpnp/dpnp_iface.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,15 @@ def get_dpnp_descriptor(


def get_include():
r"""Return the directory that contains the DPNP C++ backend \*.h header files."""
r"""
Return the directory that contains \*.h header files of dpnp C++ backend.
dpnp_path = os.path.join(os.path.dirname(__file__), "backend", "include")
An extension module that needs to be compiled against dpnp backend
should use this function to locate the appropriate include directory.
return dpnp_path
"""

return os.path.join(os.path.dirname(__file__), "backend", "include")


def get_normalized_queue_device(obj=None, device=None, sycl_queue=None):
Expand Down

0 comments on commit 131a56d

Please sign in to comment.