-
Notifications
You must be signed in to change notification settings - Fork 132
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
Getting docs to a good starting point #197
Conversation
Also, @kylebarron, maybe there's some overlap with your #194 in terms of making sure the docstrings are properly formatted and match up with the type stubs. |
Codecov Report
@@ Coverage Diff @@
## master #197 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 9 9
Lines 213 213
=========================================
Hits 213 213
Continue to review full report at Codecov.
|
Also, there is some nice functionality with JupyerBook that lets you launch notebook examples directly into a live cloud service, which would be awesome for the examples repo. For example, check out the "Launch Notebook" button on this page: https://python.quantecon.org/geom_series.html |
Another idea: Juypter Book lets you output to multiple formats. It might be nice to publish a PDF version of the docs with each |
home_page_in_navbar: false | ||
use_edit_page_button: true | ||
use_repository_button: true | ||
baseurl: https://uber.github.io/h3-py/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if there's a way to include this on the h3geo.org domain too - maybe a subdomain (like py.h3geo.org?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'd be nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Cool! I've never used Jupyter Book for docs before (I've only used mkdocs, example)
- How does docstring generation work? Is it interpreting the docstring as Markdown? Why do you need double
``
instead of a single`
? - Judging from
.. code-block:: text
... this is using sphinx to generate the api docs? So it's kinda a mix of RST for docstrings, Markdown for prose? - I'd suggest checking out
pydocstyle
for CI if you plan to autogenerate docs from docstrings. Might make it simpler to verify docstrings are as expected (but I haven't used it myself). - Re types: I don't really understand the intersection between RST/sphinx/jupyter book in this docs setup, but I've gotten type inference to work in Sphinx docs generation before (3 years ago 😄) via https://github.com/agronholm/sphinx-autodoc-typehints. But I'm not sure if that works at all via stub files, or just using in-code type hints, and might be irrelevant if you're not using autodoc.
repository: | ||
url: https://github.com/uber/h3-py | ||
branch: master | ||
path_to_book: docs | ||
|
||
sphinx: | ||
extra_extensions: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see you are using autodoc
...
Took a quick look; I checked out your repo and added the def versions() -> Dict[str, str]: But
|
Thanks @kylebarron
JupyterBook uses the MyST Parser so that you can use markdown instead of RST, which I'll do almost anything to avoid :)
I'll check it out, thanks!
Since this doesn't seem to be straightforward, let's defer the typing stuff (at least for the docs) to later.
And I don't think we're ready to drop 2.7 just yet, as there is still a large user base. (I think) |
Here's a starting point for the docs (builds without failures due to incorrectly formatted docstrings).
Definitely more work to do. I'm not sure if we should just land this now and iterate on the docs (potentially in an async fashion), or if we should continue to polish up this PR.
You can see the docs built from this PR at: https://ajfriend.github.io/h3-py (I've been using this as sort of a docs staging area)
An older, very incomplete version is currently live at https://uber.github.io/h3-py