Skip to content

Closes gh-1114 and gh-1116 #1123

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 5 commits into from
Mar 15, 2023
Merged

Closes gh-1114 and gh-1116 #1123

merged 5 commits into from
Mar 15, 2023

Conversation

oleksandr-pavlyk
Copy link
Contributor

Closes gh-1114 and closes gh-1116.

A pass through doc-strings of dpctl.tensor functions and classes to improve rendering of the documentation and to expand docstring.

  • 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?
  • If this PR is a work in progress, are you filing the PR as a draft?

A pass through doc-strings of dpctl.tensor functions and classes to
improve rendering of the documentation and to expand docstring.
@github-actions
Copy link

@coveralls
Copy link
Collaborator

coveralls commented Mar 14, 2023

Coverage Status

Coverage: 82.45% (+0.02%) from 82.427% when pulling 49c3a9c on tensor-docs-cleanup into 8f828f2 on master.

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.2=py310h76be34b_41 ran successfully.
Passed: 46
Failed: 788
Skipped: 280

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.2=py310h76be34b_42 ran successfully.
Passed: 46
Failed: 788
Skipped: 280

@ndgrigorian
Copy link
Collaborator

@oleksandr-pavlyk
Documentation for place doesn't seem to be rendering correctly. It cuts off after the first parameter.
validate_usm_type summary renders as "[FIXME]: <class ‘builtin_function_or_method’> has a docstring with no summary"

@diptorupd
Copy link
Contributor

@oleksandr-pavlyk Found few left over issues: reshape, from_dlpack still have the -> in the summary.

@diptorupd
Copy link
Contributor

@oleksandr-pavlyk Found few left over issues: reshape, from_dlpack still have the -> in the summary.

It is a Sphinx issue IMO. The header of the detail section looks so much better with the -> and it even auto links to the usm_ndarray doc. The summary is butchered up.

@diptorupd
Copy link
Contributor

diptorupd commented Mar 14, 2023

@oleksandr-pavlyk Can you please check the following function in our generate_rst.py:

def _get_doc_summary(obj):

Maybe we need to fix the logic here and the -> do not need to be removed from the signature in the docstring. Having the arrows generates much better detailed sections, and the butchered summary is in fact our doing.

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.2=py310h76be34b_44 ran successfully.
Passed: 46
Failed: 788
Skipped: 280

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.2=py310h76be34b_45 ran successfully.
Passed: 46
Failed: 788
Skipped: 280

@oleksandr-pavlyk
Copy link
Contributor Author

@oleksandr-pavlyk Can you please check the following function in our generate_rst.py:

def _get_doc_summary(obj):

Maybe we need to fix the logic here and the -> do not need to be removed from the signature in the docstring. Having the arrows generates much better detailed sections, and the butchered summary is in fact our doing.

I think we should be using Python's typing support in dpctl.tensor functions for IDE to pick up arrows and more details.
It does not belong to the docstrings.

@diptorupd diptorupd merged commit 742b603 into master Mar 15, 2023
@diptorupd diptorupd deleted the tensor-docs-cleanup branch March 15, 2023 18:43
@github-actions
Copy link

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.2=py310h76be34b_45 ran successfully.
Passed: 46
Failed: 788
Skipped: 280

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.

All tensor functions docstrings should provide a short description Improving the tensor API documentation
4 participants