-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add Python documentation [Sphinx-Hatch] #32
Conversation
8c3e4c4
to
4f9ee70
Compare
70c0dd6
to
0ba03af
Compare
|
||
html_theme = 'sphinx_rtd_theme' | ||
html_static_path = ['_static'] | ||
html_logo = "https://upload.wikimedia.org/wikipedia/commons/1/12/Bluerobotics-logo.svg" |
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.
Can we use this https://github.com/sphinx-toolbox/sphinx-pyproject to move mostly this configuration to pyproject ?
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.
we can, no stronger feelings on this, we still need a conf.py, just the content is moved to pyproject.toml file.
docs/requirements.txt
Outdated
maturin | ||
sphinx | ||
sphinx-rtd-theme | ||
sphinxcontrib-napoleon |
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.
This could be moved to pyproject as well
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.
yes it becames unnecessary if we use poetry to setup the enviroment. please check new commits.
docs/Makefile
Outdated
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
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.
We could move it to [tool.poetry.scripts] as well
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.
not have sucess on this yet.
but this is currently working like this:
6709 poetry install
6711 poetry shell
6713 maturin build && env pip install --force-reinstall target/wheels/*.whl && cd docs && make clean html
4a0be8c
to
6877a5a
Compare
6877a5a
to
0760bd8
Compare
removed makefile and requirements.txt. Now we have hatch hatch run dev:build-doc |
0760bd8
to
ca436cd
Compare
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.
@RaulTrombin CI is failing, needs rebase
ca436cd
to
9738ab6
Compare
9738ab6
to
500e180
Compare
rebased |
This PR add the sphinx source folder to autogenerate the documentation for Python module.
This current project uses the napoleon module, sphinx.ext.napoleon – Support for NumPy and Google style docstrings¶
It uses the upgrades made on cpy-binder 3.0, which now support comments.
This PR also create an action for page deployment.
To test it locally:
pip install -r docs/requirements.txt && maturin build && env pip install --force-reinstall target/wheels/*.whl && cd docs && make clean html
Deployments:
You can test it on a raspberry with navigator:
pip install br-navigator
https://pypi.org/project/br-navigator/
https://raultrombin.github.io/navigator-lib/
ps.: here I'm using the br-navigator name for a preview.
Previews: