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

Diagrams_in_doc #257

Merged
merged 6 commits into from
Sep 15, 2023
Merged

Conversation

philippemiron
Copy link
Contributor

I will let you add some text and/or move those around. But here is a good start for #251.

Copy link
Member

@selipot selipot left a comment

Choose a reason for hiding this comment

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

@philippemiron How can I see the rendering of these changes?

@philippemiron
Copy link
Contributor Author

philippemiron commented Sep 13, 2023

You need to build the docs locally, the instructions are also here.

cd clouddrift/docs

conda install sphinx
pip install sphinx_book_theme
pip install sphinx-copybutton

make html

Then you can open clouddrift/docs/_build/html/index.html in a browser.

@selipot
Copy link
Member

selipot commented Sep 13, 2023

Thanks @philippemiron I feel you told me that before

@philippemiron
Copy link
Contributor Author

No worries.

docs/api.rst Outdated Show resolved Hide resolved
Copy link
Member

@milancurcic milancurcic left a comment

Choose a reason for hiding this comment

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

Thanks for this PR, great addition.

@philippemiron philippemiron added the documentation Improvements or additions to documentation label Sep 14, 2023
@milancurcic
Copy link
Member

It has not occurred to me that, as @selipot just pointed out on our call, that having the RST code to insert an image in the Python docstring itself is unfriendly to users reading the docstring from the Python prompt. This is probably why Philippe attempted to place them in api.rst, though that didn't render the images for me. Let's find a way to include graphics in the function docs without polluting the docstring itself, perhaps by looking at how other projects do this (maybe Xarray? not sure).

@philippemiron
Copy link
Contributor Author

I'm not sure why it's not rendering on your end, but it's working fine for me. See,

image

@philippemiron
Copy link
Contributor Author

and I agree (I missed the previous commits) that we don't want to have this in the docstrings of the functions itself.

@milancurcic
Copy link
Member

milancurcic commented Sep 15, 2023

I'm not sure why it's not rendering on your end, but it's working fine for me. See,

I either initially did something wrong or I didn't scroll down enough to see them because they appear at the bottom of the chunk docs. All good, I reverted, this is the way to go.

@milancurcic milancurcic merged commit ac0bdd4 into Cloud-Drift:main Sep 15, 2023
philippemiron added a commit to philippemiron/clouddrift that referenced this pull request Nov 16, 2023
* add diagram to doc

* remove warnings

* Move Sphinx code for chunk illustrations into the code docstrings

* Add a hook for the ragged-array illustration

* Revert to chunk diagrams via api.rst

---------

Co-authored-by: Philippe Miron <philippe.miron@dtn.com>
Co-authored-by: milancurcic <caomaco@gmail.com>
@philippemiron philippemiron deleted the diagrams_in_doc branch December 16, 2023 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants