Skip to content

Add xtensor docs #1504

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

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

Add xtensor docs #1504

wants to merge 5 commits into from

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Jun 30, 2025

Closes #1502


📚 Documentation preview 📚: https://pytensor--1504.org.readthedocs.build/en/1504/

@ricardoV94 ricardoV94 force-pushed the xtensor_docs branch 3 times, most recently from a703ae4 to d472f62 Compare July 1, 2025 11:55
@ricardoV94 ricardoV94 requested a review from OriolAbril July 1, 2025 11:57
Copy link
Member

@OriolAbril OriolAbril left a comment

Choose a reason for hiding this comment

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

other than fixing the environment everything looks good, there are a couple other things that could be done but also feel free to merge with just fixing the environment

@ricardoV94
Copy link
Member Author

We get a lot of Warning: document isn't included in any toctree. Do we care?

@OriolAbril
Copy link
Member

We get a lot of Warning: document isn't included in any toctree. Do we care?

A lot of? For the pages we have added or other ones? This means those pages are not reachable through the navbar+sidebar navigation. Unless there are referenced in another page or the users magically know their url they won't be able to reach them. Ideally there wouldn't be toctree warnings, if we really want to have pages that are not on the toctree and are only referenced inline somewhere else they should include :orphan: in their frontmatter

@ricardoV94 ricardoV94 force-pushed the xtensor_docs branch 2 times, most recently from 6939ee0 to 158ee2a Compare July 2, 2025 15:04
@ricardoV94
Copy link
Member Author

ricardoV94 commented Jul 2, 2025

Okay not a lot:

/home/ricardo/Documents/pytensor/doc/README.md: WARNING: document isn't included in any toctree
/home/ricardo/Documents/pytensor/doc/library/misc/pkl_utils.rst: WARNING: document isn't included in any toctree
/home/ricardo/Documents/pytensor/doc/library/scalar/index.rst: WARNING: document isn't included in any toctree
/home/ricardo/Documents/pytensor/doc/library/sparse/sandbox.rst: WARNING: document isn't included in any toctree
/home/ricardo/Documents/pytensor/doc/library/tensor/random/distributions.rst: WARNING: document isn't included in any toctree
/home/ricardo/Documents/pytensor/doc/library/xtensor/generated/pytensor.xtensor.concat.rst: WARNING: document isn't included in any toctree
/home/ricardo/Documents/pytensor/doc/library/xtensor/generated/pytensor.xtensor.dot.rst: WARNING: document isn't included in any toctree
/home/ricardo/Documents/pytensor/doc/library/xtensor/generated/pytensor.xtensor.type.XTensorConstant.rst: WARNING: document isn't included in any toctree
/home/ricardo/Documents/pytensor/doc/library/xtensor/generated/pytensor.xtensor.type.XTensorType.rst: WARNING: document isn't included in any toctree
/home/ricardo/Documents/pytensor/doc/library/xtensor/generated/pytensor.xtensor.type.XTensorVariable.rst: WARNING: document isn't included in any toctree
/home/ricardo/Documents/pytensor/doc/library/xtensor/generated/pytensor.xtensor.type.as_xtensor.rst: WARNING: document isn't included in any toctree
/home/ricardo/Documents/pytensor/doc/library/xtensor/generated/pytensor.xtensor.type.xtensor.rst: WARNING: document isn't included in any toctree
/home/ricardo/Documents/pytensor/doc/library/xtensor/generated/pytensor.xtensor.type.xtensor_constant.rst: WARNING: document isn't included in any toctree

Some are the ones I removed that are tracked in #1512 the others are dot, concat which is odd, and the xtensor.type, that I mentioned is coming up blank

distributions.rst probably became an orphan earlier on. Mentioned on the issue

@OriolAbril
Copy link
Member

The ones in the generated folder is because they were automatically generated by autosummary at some point when :toctree: generated/ was set, now that it is not used these should be removed. The readme we probably want to exclude from conf.py. And the rest we can track in the issue

@ricardoV94
Copy link
Member Author

ricardoV94 commented Jul 2, 2025

If you are checking out the branch already feel free to push the removal of readme.md

@ricardoV94 ricardoV94 marked this pull request as ready for review July 2, 2025 15:34
Copy link

codecov bot commented Jul 2, 2025

Codecov Report

Attention: Patch coverage is 56.72131% with 132 lines in your changes missing coverage. Please review.

Project coverage is 81.82%. Comparing base (2ab60b3) to head (8ffa97e).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
pytensor/xtensor/math.py 56.38% 0 Missing and 99 partials ⚠️
pytensor/xtensor/random.py 57.89% 0 Missing and 32 partials ⚠️
pytensor/xtensor/type.py 50.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (56.72%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1504      +/-   ##
==========================================
- Coverage   81.98%   81.82%   -0.16%     
==========================================
  Files         231      231              
  Lines       52274    52467     +193     
  Branches     9206     9338     +132     
==========================================
+ Hits        42856    42931      +75     
+ Misses       7106     7095      -11     
- Partials     2312     2441     +129     
Files with missing lines Coverage Δ
pytensor/xtensor/linalg.py 86.66% <ø> (ø)
pytensor/xtensor/shape.py 77.85% <ø> (ø)
pytensor/xtensor/type.py 68.34% <50.00%> (ø)
pytensor/xtensor/random.py 66.66% <57.89%> (-23.21%) ⬇️
pytensor/xtensor/math.py 63.94% <56.38%> (-31.87%) ⬇️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@OriolAbril
Copy link
Member

xtensor.type page fixed and README excluded. I spent most of the time being gaslighted by automodule telling me no-index wasn't valid, re-reading the docs, trying different characters for the hyphen, doing :no-index: true instead. The docs seem clear on that:

image

It was :noindex: with no hyphen at all 🤦🏿

@ricardoV94
Copy link
Member Author

That seems like a very fun afternoon xD

OriolAbril and others added 5 commits July 3, 2025 18:41
Co-authored-by: Oriol Abril-Pla <oriol.abril.pla@gmail.com>
Co-authored-by: Oriol Abril-Pla <oriol.abril.pla@gmail.com>
Co-authored-by: Oriol Abril-Pla <oriol.abril.pla@gmail.com>
@ricardoV94
Copy link
Member Author

@OriolAbril do you want to take a last look before we merge?

@ricardoV94 ricardoV94 requested a review from OriolAbril July 3, 2025 16:42
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.

API docs for xtensor module
2 participants