Skip to content

docs: convert Python API docs to Sphinx Material theme #5617

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

Merged
merged 25 commits into from
May 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
430a025
docs: Updating icons and logos, updated favicon
cwhite911 May 2, 2025
04dfe56
Updated logo
cwhite911 May 2, 2025
df4f883
upated GRASS icon
cwhite911 May 2, 2025
d07b04d
Merge remote-tracking branch 'upstream/main' into doc-update-brand-logo
cwhite911 May 2, 2025
e5b0730
Updated ps vector file formats eps and pdf
cwhite911 May 2, 2025
2822883
Merge remote-tracking branch 'upstream/main' into docs-python-api
cwhite911 May 5, 2025
6d1e7ec
Added assets
cwhite911 May 5, 2025
4b1f190
Formatting clean up
cwhite911 May 5, 2025
cfdb165
Added sphinx-material to workflow
cwhite911 May 5, 2025
b59a51c
Updated footer style
cwhite911 May 5, 2025
b90d895
Updated code font
cwhite911 May 5, 2025
327056a
Set navbar link title
cwhite911 May 5, 2025
aa5465a
updated sphinx-material
cwhite911 May 6, 2025
3199d41
Merge branch 'main' into docs-python-api
cwhite911 May 6, 2025
6300749
Change sphinx-apidoc package styling template to improve styling betw…
cwhite911 May 6, 2025
1ee9493
Merge branch 'main' into docs-python-api
cwhite911 May 9, 2025
98d3dd0
Merge branch 'main' into docs-python-api
cwhite911 May 13, 2025
0180489
Merge remote-tracking branch 'upstream/main' into docs-python-api
cwhite911 May 19, 2025
df49eeb
Added requirements.txt and pinned libs
cwhite911 May 19, 2025
aa6b875
Removed unused code
cwhite911 May 19, 2025
0ca72e4
Merge branch 'docs-python-api' of github.com:cwhite911/grass into doc…
cwhite911 May 19, 2025
d30c033
Removed extra flag from pip command
cwhite911 May 19, 2025
4791c3a
added docs
cwhite911 May 19, 2025
76cb805
Reorganized the top navigation
cwhite911 May 19, 2025
de0f217
Merge branch 'main' into docs-python-api
cwhite911 May 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ jobs:

- name: Build Sphinx documentation
run: |
pip install sphinx sphinx-sitemap
pip install -r "grass/python/grass/docs/requirements.txt"
cd grass
make sphinxdoclib
ARCH="$(grass --config arch)"
Expand Down
16 changes: 8 additions & 8 deletions python/grass/docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ libpythonclean:

libpythonapidoc:
@echo "SPHINXBUILD: Using <$(SPHINXBUILD)>"
$(call run_grass,$(SPHINXAPIDOC) -T -f -o src/ ../imaging/)
$(call run_grass,$(SPHINXAPIDOC) -T -f -o src/ ../exceptions/)
$(call run_grass,$(SPHINXAPIDOC) -T -f -o src/ ../gunittest/ ../gunittest/multireport.py ../gunittest/multirunner.py ../gunittest/main.py)
$(call run_grass,$(SPHINXAPIDOC) -T -f -o src/ ../pydispatch/)
$(call run_grass,$(SPHINXAPIDOC) -T -f -o src/ ../pygrass/)
$(call run_grass,$(SPHINXAPIDOC) -T -f -o src/ ../script/)
$(call run_grass,$(SPHINXAPIDOC) -T -f -o src/ ../temporal/)
$(call run_grass,$(SPHINXAPIDOC) --module-first -T -f -o src/ ../../grass)
$(call run_grass,$(SPHINXAPIDOC) -T -f -t _templates/sphinx/apidoc/ -o src/ ../imaging/)
$(call run_grass,$(SPHINXAPIDOC) -T -f -t _templates/sphinx/apidoc/ -o src/ ../exceptions/)
$(call run_grass,$(SPHINXAPIDOC) -T -f -t _templates/sphinx/apidoc/ -o src/ ../gunittest/ ../gunittest/multireport.py ../gunittest/multirunner.py ../gunittest/main.py)
$(call run_grass,$(SPHINXAPIDOC) -T -f -t _templates/sphinx/apidoc/ -o src/ ../pydispatch/)
$(call run_grass,$(SPHINXAPIDOC) -T -f -t _templates/sphinx/apidoc/ -o src/ ../pygrass/)
$(call run_grass,$(SPHINXAPIDOC) -T -f -t _templates/sphinx/apidoc/ -o src/ ../script/)
$(call run_grass,$(SPHINXAPIDOC) -T -f -t _templates/sphinx/apidoc/ -o src/ ../temporal/)
$(call run_grass,$(SPHINXAPIDOC) --module-first -T -f -t _templates/sphinx/apidoc/ -o src/ ../../grass)

libpythonhtml: checksphinx
@echo "SPHINXBUILD: Using <$(SPHINXBUILD)>"
Expand Down
38 changes: 38 additions & 0 deletions python/grass/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# GRASS Python Docs

## Local Development

### Prerequisites

Install the following dependencies from the `requirements.txt` file: in
`python/grass/docs` directory.

* [sphinx (v8.1.3)](https://www.sphinx-doc.org/en/master/changes/8.1.html)
* [sphinx-material (v0.0.36)](https://bashtage.github.io/sphinx-material/)
* [sphinx-sitemap (v2.6.0)](https://sphinx-sitemap.readthedocs.io/en/latest/)

```bash
pip install -r python/grass/docs/requirements.txt
```

### Build the Documentation

To build the documentation, run the following command in the `python/grass/docs`
directory:

```bash
make sphinxdoclib
```

This will generate the documentation in the `dist` directory.

### View the Documentation

To view the documentation, open the `index.html` file in the
`dist/docs/html/libpython`
directory with a local web server.

## CI/CD

The documentation is built and deployed automatically using GitHub Actions.
The workflow is triggered on every push to the `main` branch `.github/workflows/documentation.yml`.
Binary file added python/grass/docs/_static/favicon.ico
Binary file not shown.
Binary file added python/grass/docs/_static/grass_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
206 changes: 23 additions & 183 deletions python/grass/docs/_static/grass_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading