Skip to content

Commit

Permalink
Change python docs to pydata theme (#1785)
Browse files Browse the repository at this point in the history
This PR changes docs theme from sphinx_rtd_theme to use pydata-theme: https://pydata-sphinx-theme.readthedocs.io/en/latest/

Authors:
  - GALI PREM SAGAR (https://github.com/galipremsagar)
  - Brad Rees (https://github.com/BradReesWork)

Approvers:
  - Brad Rees (https://github.com/BradReesWork)
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #1785
  • Loading branch information
galipremsagar authored Aug 23, 2021
1 parent 59f6fdd commit fc0aef7
Show file tree
Hide file tree
Showing 35 changed files with 531 additions and 526 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,6 @@ python/_external_repositories/

# created by Dask tests
python/dask-worker-space

# Sphinx docs & build artifacts
docs/cugraph/source/api_docs/api/*
4 changes: 4 additions & 0 deletions SOURCEBUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ conda env create --name cugraph_dev --file conda/environments/cugraph_dev_cuda11
# for CUDA 11.2
conda env create --name cugraph_dev --file conda/environments/cugraph_dev_cuda11.2.yml

# for CUDA 11.4
conda env create --name cugraph_dev --file conda/environments/cugraph_dev_cuda11.4.yml


# activate the environment
conda activate cugraph_dev

Expand Down
2 changes: 1 addition & 1 deletion conda/environments/cugraph_dev_cuda11.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies:
- faiss-proc=*=cuda
- scikit-learn>=0.23.1
- sphinx
- sphinx_rtd_theme
- pydata-sphinx-theme
- sphinxcontrib-websupport
- sphinx-markdown-tables
- sphinx-copybutton
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/cugraph_dev_cuda11.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies:
- faiss-proc=*=cuda
- scikit-learn>=0.23.1
- sphinx
- sphinx_rtd_theme
- pydata-sphinx-theme
- sphinxcontrib-websupport
- sphinx-markdown-tables
- sphinx-copybutton
Expand Down
5 changes: 2 additions & 3 deletions docs/cugraph/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = cuGraph
SPHINXPROJ = cugraph
SOURCEDIR = source
BUILDDIR = build
IMGDIR = images
Expand All @@ -18,5 +18,4 @@ help:
# 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)
cp -r $(SOURCEDIR)/$(IMGDIR) $(BUILDDIR)/html
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21 changes: 12 additions & 9 deletions docs/cugraph/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
# Building Documentation

A basic python environment with packages listed in `./requirement.txt` is
enough to build the docs. Doc generation does not get run by default
All prerequisite for building docs are in the cugraph development conda environment.
[See build instructions](../../SOURCEBUILD.md) on how to create the development conda environment

## Get additional dependency
## Steps to follow:

```bash
pip install -r requirement.txt
```
In order to build the docs, we need the conda dev environment from cugraph and we need to build cugraph from source.

1. Create a conda env and build cugraph from source. The dependencies to build rapids from source are installed in that conda environment, and then rapids is built and installed into the same environment.

2. Once cugraph is built from source, navigate to `../docs/cugraph/`. If you have your documentation written and want to turn it into HTML, run makefile:

## Run makefile:

```bash
# most be in the /docs/cugraph directory
make html
```

Outputs to `build/html/index.html`
This should run Sphinx in your shell, and outputs to `build/html/index.html`


## View docs web page by opening HTML in browser:

First navigate to `/build/html/` folder, i.e., `cd build/html` and then run the following command:
First navigate to `/build/html/` folder, and then run the following command:

```bash
python -m http.server
Expand Down
4 changes: 0 additions & 4 deletions docs/cugraph/requirement.txt

This file was deleted.

42 changes: 0 additions & 42 deletions docs/cugraph/source/_static/copybutton.css

This file was deleted.

65 changes: 0 additions & 65 deletions docs/cugraph/source/_static/copybutton_pydocs.js

This file was deleted.

61 changes: 0 additions & 61 deletions docs/cugraph/source/_static/example_mod.js

This file was deleted.

21 changes: 21 additions & 0 deletions docs/cugraph/source/_static/params.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,24 @@
margin: 0.5em;
content: ":";
}

:root {

--pst-color-active-navigation: 114, 83, 237;
--pst-color-navbar-link: 77, 77, 77;
--pst-color-navbar-link-hover: var(--pst-color-active-navigation);
--pst-color-navbar-link-active: var(--pst-color-active-navigation);
--pst-color-sidebar-link: 77, 77, 77;
--pst-color-sidebar-link-hover: var(--pst-color-active-navigation);
--pst-color-sidebar-link-active: var(--pst-color-active-navigation);
--pst-color-sidebar-expander-background-hover: 244, 244, 244;
--pst-color-sidebar-caption: 77, 77, 77;
--pst-color-toc-link: 119, 117, 122;
--pst-color-toc-link-hover: var(--pst-color-active-navigation);
--pst-color-toc-link-active: var(--pst-color-active-navigation);

}

.special-table td, .special-table th {
border: 1px solid #dee2e6;
}
Loading

0 comments on commit fc0aef7

Please sign in to comment.