summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Gordon <jogo@pinterest.com>2022-07-22 10:05:48 -0700
committerJoe Gordon <jogo@pinterest.com>2022-07-22 10:21:34 -0700
commitf7db8bb8c6d1db081859805de0c9d571276b5dd7 (patch)
treef2fdbad2fcfeb5768e32e18cc1983973ef957db9
parentb86bb741884b19266596c5c10159f588ec9b8b77 (diff)
downloadpymemcache-f7db8bb8c6d1db081859805de0c9d571276b5dd7.tar.gz
Fix docs
* autodoc wasn't generating docs correnctly * add pytest so sphinx can render test docs, excluding them from docs for now though (so generated, but no link to them) * Update version info in docs/conf.py * Fix a few sphinx warnings * Add in changelog into docs and switch to toctree depth of 1, as the changelog has a lat of H2 headers. * Add docs to CI
-rw-r--r--.github/workflows/ci.yml4
-rw-r--r--docs-requirements.txt1
-rw-r--r--docs/changelog.rst1
-rw-r--r--docs/conf.py8
-rw-r--r--docs/getting_started.rst4
-rw-r--r--docs/index.rst3
6 files changed, 14 insertions, 7 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 330d2db..08c3fa1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -35,6 +35,10 @@ jobs:
if: matrix.python-version == '3.10'
run: |
tox -e lint,mypy
+ - name: Docs
+ if: matrix.python-version == '3.10'
+ run: |
+ tox -e docs
- name: Disable IPv6 localhost
run: |
sudo sed -i '/::1/d' /etc/hosts
diff --git a/docs-requirements.txt b/docs-requirements.txt
index 7989985..f586f16 100644
--- a/docs-requirements.txt
+++ b/docs-requirements.txt
@@ -2,3 +2,4 @@ sphinx==5.0.0
sphinx_rtd_theme==1.0.0
sphinxcontrib-apidoc==0.3.0
sphinxcontrib-napoleon==0.7
+pytest
diff --git a/docs/changelog.rst b/docs/changelog.rst
new file mode 100644
index 0000000..91bdab9
--- /dev/null
+++ b/docs/changelog.rst
@@ -0,0 +1 @@
+.. include:: ../ChangeLog.rst
diff --git a/docs/conf.py b/docs/conf.py
index b781a5a..c78990a 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -20,7 +20,7 @@ import os
import sys
import subprocess
-sys.path.insert(0, os.path.abspath("."))
+sys.path.insert(0, os.path.abspath(".."))
# -- General configuration ------------------------------------------------
@@ -65,9 +65,9 @@ author = "Charles Gordon, Jon Parise, Joe Gordon"
# built documents.
#
# The short X.Y version.
-version = "3.2"
+version = "3.5"
# The full version, including alpha/beta/rc tags.
-release = "3.2.0"
+release = "3.5.2"
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -358,5 +358,5 @@ intersphinx_mapping = {"https://docs.python.org/": None}
# Automate building apidoc when building with readthedocs
apidoc_module_dir = os.path.join("..", "pymemcache")
apidoc_output_dir = "apidoc"
+apidoc_excluded_paths = ["test", "setup.py"]
apidoc_separate_modules = True
-apidoc_extra_args = ["--force"]
diff --git a/docs/getting_started.rst b/docs/getting_started.rst
index 0107af7..a88e1be 100644
--- a/docs/getting_started.rst
+++ b/docs/getting_started.rst
@@ -99,7 +99,7 @@ follows:
- ``key4`` -> ``node1``
- ``key5`` -> ``node2``
-3. Subsequent ``get``s will hash to the correct server and requests are routed
+3. Subsequent ``get`` calls will hash to the correct server and requests are routed
accordingly.
4. ``node3`` goes down.
5. The hashclient tries to ``get("key2")`` but detects the node as down. This
@@ -253,7 +253,7 @@ One main advantage of using `tox` to interact with `pymemcache` is that it
comes with it's own virtual environments. It will automatically install
pymemcache and fetch all the needed requirements at run. See the example below:
-.. code-block:: shell
+.. code-block::
$ podman run --publish 11211:11211 -it --rm --name memcached memcached
$ tox -e venv -- python
diff --git a/docs/index.rst b/docs/index.rst
index 9d3b828..9bb44dc 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -9,10 +9,11 @@ Welcome to pymemcache's documentation!
Contents:
.. toctree::
- :maxdepth: 2
+ :maxdepth: 1
Getting Started </getting_started>
Source Code </apidoc/modules>
+ ChangeLog </changelog>