Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

Rework API docs #1476

Merged
merged 8 commits into from
Feb 10, 2022
Merged

Rework API docs #1476

merged 8 commits into from
Feb 10, 2022

Conversation

astrojuanlu
Copy link
Member

Fixes #1183. I used some Sphinx and sphinx-autoapi hackery to make the API index more useful, by hopefully addressing the most common use cases and making the toctrees more shallow. I think this strikes a good balance between manually written docs and automatically generated ones.

This made me think about what should we consider public API though. We have plenty of high level modules and probably we should communicate to users which ones they should use and which ones they can ignore. However, making submodules private would be a breaking change, and since I plan to backport this pull request to 0.16.1, I will deal with that separately.

I also used this opportunity to trim most of the cruft from conf.py. Modern versions of sphinx-quickstart don't include so much stuff, but this wasn't the case 8 years ago 🙃 Folks willing to change our docs config should read the documentation.

Requesting a review from @jorgepiloto, who did the original work here.

@astrojuanlu
Copy link
Member Author

@codecov
Copy link

codecov bot commented Feb 10, 2022

Codecov Report

Merging #1476 (364536b) into main (ccf7249) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1476   +/-   ##
=======================================
  Coverage   91.83%   91.83%           
=======================================
  Files          97       97           
  Lines        4459     4459           
  Branches      426      426           
=======================================
  Hits         4095     4095           
  Misses        274      274           
  Partials       90       90           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ccf7249...364536b. Read the comment docs.

maxdepth: 1
glob:
---
/autoapi/poliastro/[!c_]*/index
Copy link
Member

Choose a reason for hiding this comment

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

Sadly, it looks like this is the best approach to exclude the core at this moment. Let us keep an eye on the Sphinx issue you linked.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep 😢 no way around that for now unfortunately

Copy link
Member

@jorgepiloto jorgepiloto left a comment

Choose a reason for hiding this comment

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

Very clean work, @astrojuanlu! Having the Orbit, Maneuver and Ephem objects in the main API section is so nice. Approving this 👍🏽

@astrojuanlu
Copy link
Member Author

Thanks a lot @jorgepiloto ! Merging 🚀

@astrojuanlu astrojuanlu merged commit 9049e4f into poliastro:main Feb 10, 2022
@astrojuanlu astrojuanlu deleted the fix-api-docs branch February 10, 2022 11:49
@astrojuanlu astrojuanlu mentioned this pull request Feb 10, 2022
19 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split API documentation into "safe" and "core"
2 participants