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

docs: function autodocs embedded in docs #527

Merged
merged 12 commits into from
Jun 13, 2024

Conversation

jnumainville
Copy link
Collaborator

@jnumainville jnumainville commented Jun 6, 2024

Fixes #501

No github action in this pr, but this allows a local build of docs as a starting point

directions to test - from README.md in plotly-express folder

Docs can be built locally from the plotle-express folder

Install the necessary dependencies:

pip install -r requirements.txt
pip install ../dist/deephaven_plugin_plotly_express-*.whl

then run the docs make script:

python make_docs.py

@jnumainville jnumainville requested review from dsmmcken and mofojed June 6, 2024 18:16
@dsmmcken
Copy link
Contributor

dsmmcken commented Jun 6, 2024

Can we not scatter additional files in the docs folder? Those files aren't docs.

@@ -0,0 +1,6 @@

Copy link
Contributor

Choose a reason for hiding this comment

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

whats this file for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sphinx complains if documents are not in a toctree for some reason

@mofojed
Copy link
Member

mofojed commented Jun 7, 2024

Getting an error when trying to run locally:

Building markdown
Running Sphinx v7.2.6
1 compiler directives added
# Starting io.deephaven.python.server.EmbeddedServer
deephaven.cacheDir=/home/bender/.cache/deephaven
deephaven.configDir=/home/bender/.config/deephaven
deephaven.dataDir=/home/bender/.local/share/deephaven
# io.deephaven.internal.log.LoggerFactoryServiceLoaderImpl: searching for 'io.deephaven.internal.log.LoggerFactory'...
# io.deephaven.internal.log.LoggerFactoryServiceLoaderImpl: found 'io.deephaven.internal.log.LoggerFactorySlf4j'
Server started on port 10075

Extension error:
Could not import extension sphinx_autodoc_typehints (exception: No module named 'sphinx_autodoc_typehints')
make: *** [Makefile:20: markdown] Error 2
Copying assets
cp: cannot create directory 'docs/build/markdown/_assets': No such file or directory
cp: cannot create regular file 'docs/build/markdown/sidebar.json': No such file or directory
rm: cannot remove 'docs/build/markdown/index.md': No such file or directory

python make_docs.py
```

Note that these built files should not be committed to the repository.
Copy link
Member

Choose a reason for hiding this comment

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

Where do the built files get outputted? Should include that info here.

I'm getting an error right now when building locally:

Building markdown
Running Sphinx v7.2.6
1 compiler directives added
# Starting io.deephaven.python.server.EmbeddedServer
deephaven.cacheDir=/home/bender/.cache/deephaven
deephaven.configDir=/home/bender/.config/deephaven
deephaven.dataDir=/home/bender/.local/share/deephaven
# io.deephaven.internal.log.LoggerFactoryServiceLoaderImpl: searching for 'io.deephaven.internal.log.LoggerFactory'...
# io.deephaven.internal.log.LoggerFactoryServiceLoaderImpl: found 'io.deephaven.internal.log.LoggerFactorySlf4j'
Server started on port 10075

Extension error:
Could not import extension sphinx_autodoc_typehints (exception: No module named 'sphinx_autodoc_typehints')
make: *** [Makefile:20: markdown] Error 2
Copying assets
cp: cannot create directory 'docs/build/markdown/_assets': No such file or directory
cp: cannot create regular file 'docs/build/markdown/sidebar.json': No such file or directory
rm: cannot remove 'docs/build/markdown/index.md': No such file or directory

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure why... double checked and works for me. Are you using 3.8? Looks like sphinx_autodoc_typehints will require 3.9. Should be fine since we only need it for building the docs.

Copy link
Member

Choose a reason for hiding this comment

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

Weird, I just tried again and all good. For ref I'm on python 3.10.12

@jnumainville jnumainville requested review from dsmmcken and mofojed June 12, 2024 15:15
@jnumainville jnumainville merged commit 6977a33 into deephaven:main Jun 13, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autodoc for autogenerating Plotly-express reference docs
3 participants