Skip to content
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

GH-43352: [Docs][Python] Add all tensor classes documentation #45160

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ShaiviAgarwal2
Copy link

@ShaiviAgarwal2 ShaiviAgarwal2 commented Jan 3, 2025

Rationale for this change

We have added the missing documentation for various tensor classes in PyArrow, specifically SparseCOOTensor, SparseCSRMatrix, SparseCSCMatrix, and SparseCSFTensor. This documentation is necessary to provide users with reference information and examples on how to use these classes, as currently, there is no reference documentation or information in the PyArrow user guide regarding these tensor classes.

What changes are included in this PR?

  1. Added docstrings to the SparseCSRMatrix, SparseCSCMatrix, and SparseCSFTensor classes and their methods in the tensor.pxi file.
  2. Updated the tables.rst file to include documentation for SparseCSFTensor along with examples.

Are these changes tested?

No new tests are included in this PR as the changes are purely documentation updates. The existing tests for the tensor classes should cover the functionality.

Are there any user-facing changes?

Yes, the user-facing change is the addition of documentation for the tensor classes, which will help users understand and utilize these classes more effectively. There are no breaking changes to public APIs.

### Rationale for this change

We have added the missing documentation for various tensor classes in PyArrow, specifically `SparseCOOTensor`, `SparseCSRMatrix`, `SparseCSCMatrix`, and `SparseCSFTensor`. This documentation is necessary to provide users with reference information and examples on how to use these classes, as currently, there is no reference documentation or information in the PyArrow user guide regarding these tensor classes.

### What changes are included in this PR?

1. Added docstrings to the `SparseCSRMatrix`, `SparseCSCMatrix`, and `SparseCSFTensor` classes and their methods in the `tensor.pxi` file.
2. Updated the `tables.rst` file to include documentation for `SparseCSFTensor` along with examples.

### Are these changes tested?

No new tests are included in this PR as the changes are purely documentation updates. The existing tests for the tensor classes should cover the functionality.

### Are there any user-facing changes?

Yes, the user-facing change is the addition of documentation for the tensor classes, which will help users understand and utilize these classes more effectively. There are no breaking changes to public APIs.
Copy link

github-actions bot commented Jan 3, 2025

⚠️ GitHub issue #43352 has been automatically assigned in GitHub to PR creator.

docs/source/python/api/tables.rst Outdated Show resolved Hide resolved
docs/source/python/api/tables.rst Outdated Show resolved Hide resolved
@ShaiviAgarwal2
Copy link
Author

@kou @AlenkaF Could you please review the recent updates?

docs/source/index.rst Outdated Show resolved Hide resolved
docs/source/index.rst Outdated Show resolved Hide resolved
docs/source/python/api/tensors.rst Outdated Show resolved Hide resolved
docs/source/python/api/tensors.rst Outdated Show resolved Hide resolved
@kou
Copy link
Member

kou commented Jan 5, 2025

@github-actions crossbow submit preview-docs

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Jan 5, 2025
Copy link

github-actions bot commented Jan 5, 2025

Revision: 59e8197

Submitted crossbow builds: ursacomputing/crossbow @ actions-8a25ed4ca3

Task Status
preview-docs GitHub Actions

Copy link
Member

@AlenkaF AlenkaF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some style corrections needed - I think @kou added all but they are marked as resolved - maybe we are missing a commit?

I also added some comments regarding the code blocks and docstrings.

python/pyarrow/tensor.pxi Outdated Show resolved Hide resolved
docs/source/python/api/tensors.rst Outdated Show resolved Hide resolved
docs/source/python/api/tensors.rst Show resolved Hide resolved
@ShaiviAgarwal2
Copy link
Author

There are some style corrections needed - I think @kou added all but they are marked as resolved - maybe we are missing a commit?

I also added some comments regarding the code blocks and docstrings.

@AlenkaF Yes I marked as resolved but didn't submit the new commit as working on some checks that are failing
Will do the needful soon!!

@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jan 6, 2025
@ShaiviAgarwal2
Copy link
Author

@kou Could you please help me to resolve the conflicts caused!!

@kou
Copy link
Member

kou commented Jan 10, 2025

Hmm. What git commands did you use...? There are needless changes...

It may be better that you create a new branch and open a new PR from it.

@ShaiviAgarwal2
Copy link
Author

Hmm. What git commands did you use...? There are needless changes...

It may be better that you create a new branch and open a new PR from it.

I use these commands inorder to resolve the conflicts but they didn't work !!

git checkout master
git pull
git checkout
git merge master
[ ... resolve any conflicts ... ]
git add [files that were conflicted]
git commit
git push

@ShaiviAgarwal2
Copy link
Author

Hmm. What git commands did you use...? There are needless changes...

It may be better that you create a new branch and open a new PR from it.

Ok will now create a new branch and submit a new pr from it!

@kou
Copy link
Member

kou commented Jan 11, 2025

git checkout master

Is this correct? It seems that your fork doesn't have master: https://github.com/ShaiviAgarwal2/arrow/branches/all?query=master&lastTab=overview
Did you use main instead?

@ShaiviAgarwal2
Copy link
Author

ShaiviAgarwal2 commented Jan 12, 2025

git checkout master

Is this correct? It seems that your fork doesn't have master: https://github.com/ShaiviAgarwal2/arrow/branches/all?query=master&lastTab=overview Did you use main instead?

Yes i used main
Ohh so in-place of git checkout master, I have to use git checkout main ?

@kou
Copy link
Member

kou commented Jan 12, 2025

Yes. If master doesn't exit, git checkout master must be failed.

BTW, it seems that your main https://github.com/ShaiviAgarwal2/arrow is too old:

This branch is 1902 commits behind apache/arrow:main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants