diff --git a/docs/README.md b/docs/README.md index 3214c8fd..abcc3eb1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,12 +1,14 @@ # Building MyGrad's Docs -Install the the following: +Install the following: ```shell pip install sphinx pip install sphinx_rtd_theme pip install nbsphinx pip install numpydoc +pip install matplotlib +pip install pydata_sphinx_theme ``` To build the docs for the first time, navigate to `mygrad/docs/source/` @@ -16,6 +18,12 @@ and generate the proper `.rst` files via: sphinx-autogen -o generated/ *.rst ``` +In the case of Windows, Powershell might have trouble with the wildcard, so use: + +```shell +Get-ChildItem -Filter "*.rst" | ForEach-Object { sphinx-autogen -o generated/ $_.FullName } +``` + Then navigate to `mygrad/docs/` and run: ```shell diff --git a/docs/requirements.txt b/docs/requirements.txt index 9891226a..ae0d68f3 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -4,4 +4,5 @@ numba==0.60.0 sphinx==7.0.1 numpydoc==1.5.0 pydata-sphinx-theme==0.13.3 -matplotlib==3.6.3 \ No newline at end of file +matplotlib==3.6.3 +sphinx-copybutton==0.5.2 \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 9460ab0f..a42b1981 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -51,6 +51,7 @@ "sphinx.ext.viewcode", "sphinx.ext.githubpages", "sphinx.ext.autosummary", + "sphinx_copybutton", "matplotlib.sphinxext.plot_directive", "numpydoc", ] @@ -221,4 +222,4 @@ def setup(app): # -- Options for intersphinx extension --------------------------------------- # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {"https://docs.python.org/": None} +intersphinx_mapping = {"python": ("https://docs.python.org/", None)} \ No newline at end of file