From eb4f01d39b91b7f49410de4711e4bd8281818c01 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20N=C3=BA=C3=B1ez?= <david@nucypher.com>
Date: Sun, 22 Sep 2019 23:39:41 +0200
Subject: [PATCH] Fail docs build when warnings are raised. Fix warnings.

---
 docs/Makefile                                  |  2 +-
 docs/source/api/policy.rst                     |  2 +-
 docs/source/architecture/contracts.md          |  3 +++
 docs/source/guides/deployment_guide.rst        |  5 +++++
 docs/source/guides/federated_testnet_guide.rst |  5 +++++
 docs/source/guides/staking_guide.rst           | 15 ++++++++-------
 6 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/docs/Makefile b/docs/Makefile
index e2ce955f4..974c31d19 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -2,7 +2,7 @@
 #
 
 # You can set these variables from the command line.
-SPHINXOPTS    =
+SPHINXOPTS    = -W
 SPHINXBUILD   = python3 -m sphinx
 SOURCEDIR     = source
 BUILDDIR      = build
diff --git a/docs/source/api/policy.rst b/docs/source/api/policy.rst
index a0a313740..4065cb610 100644
--- a/docs/source/api/policy.rst
+++ b/docs/source/api/policy.rst
@@ -1,5 +1,5 @@
 Policy
 ======
 
-.. automodule:: nucypher.policy.models
+.. automodule:: nucypher.policy.policies
     :members:
diff --git a/docs/source/architecture/contracts.md b/docs/source/architecture/contracts.md
index 09c6e3eae..f98dd8e03 100644
--- a/docs/source/architecture/contracts.md
+++ b/docs/source/architecture/contracts.md
@@ -14,6 +14,9 @@
 
 ## Deployment Procedure
 
+This section describes how NuCypher contracts are deployed, step-by-step.
+For a guide of how to deploy these contracts automatically, see the [Deployment guide](/guides/deployment_guide).
+
 1. Deploy `NuCypherToken` with all future supply tokens
 2. Deploy `StakingEscrow` with a dispatcher targeting it
 3. Deploy `PolicyManager` with its own dispatcher, also targeting it
diff --git a/docs/source/guides/deployment_guide.rst b/docs/source/guides/deployment_guide.rst
index 103921e44..89130b4cb 100644
--- a/docs/source/guides/deployment_guide.rst
+++ b/docs/source/guides/deployment_guide.rst
@@ -1,3 +1,8 @@
+..
+   TODO: #1354 - Find a home for this guide
+
+:orphan:
+
 =================
 Deployment Guide
 =================
diff --git a/docs/source/guides/federated_testnet_guide.rst b/docs/source/guides/federated_testnet_guide.rst
index 11d563ea1..94d349fdf 100644
--- a/docs/source/guides/federated_testnet_guide.rst
+++ b/docs/source/guides/federated_testnet_guide.rst
@@ -1,3 +1,8 @@
+..
+   TODO: #1354 - Find a home for this guide
+
+:orphan:
+
 =============================================
 NuCypher Federated Testnet (NuFT) Setup Guide
 =============================================
diff --git a/docs/source/guides/staking_guide.rst b/docs/source/guides/staking_guide.rst
index bd7efcfce..d559cbdb9 100644
--- a/docs/source/guides/staking_guide.rst
+++ b/docs/source/guides/staking_guide.rst
@@ -43,7 +43,7 @@ All staking-related operations done by StakeHolder are performed through the ``n
 +----------------------+-------------------------------------------------------------------------------+
 |  ``divide``          | Create a new stake from part of an existing one                               |
 +----------------------+-------------------------------------------------------------------------------+
-|  ``restake``          | Manage automatic reward re-staking                                           |
+|  ``restake``         | Manage automatic reward re-staking                                            |
 +----------------------+-------------------------------------------------------------------------------+
 
 **Stake Command Options**
@@ -60,7 +60,7 @@ All staking-related operations done by StakeHolder are performed through the ``n
 | ``--hw-wallet`` | Use a hardware wallet                      |
 +-----------------+--------------------------------------------+
 
-**ReStake Command Options**
+**Re-stake Command Options**
 
 +-------------------------+---------------------------------------------+
 | Option                  |  Description                                |
@@ -79,7 +79,7 @@ Staking Overview
 
 Most stakers on the Goerli testnet will complete the following steps:
 
-1) Install ``nucypher`` on StakeHolder node https://docs.nucypher.com/en/latest/guides/installation_guide.html
+1) Install ``nucypher`` on StakeHolder node (See :doc:`/guides/installation_guide`)
 2) Install and run Geth, Parity or another ethereum node (can be used with software or hardware Ethereum wallet).
 3) Request testnet tokens from faucet
 4) Stake tokens (See Below)
@@ -242,6 +242,7 @@ in the address. However, geth shows addresses in the lower case. You can convert
 the address to checksum format in geth console:
 
 .. code:: bash
+
     $ geth attach ~/.ethereum/goerli/geth.ipc
     > eth.accounts
     ["0x287a817426dd1ae78ea23e9918e2273b6733a43d", "0xc080708026a3a280894365efd51bb64521c45147"]
@@ -262,22 +263,22 @@ to enable it run:
 
     (nucypher)$ nucypher stake restake --enable
 
-To disable restaking:
+To disable re-staking:
 
 .. code:: bash
 
     (nucypher)$ nucypher stake restake --disable
 
 
-Additionally, you can enable **restake locking**, an on-chain commitment to continue restaking
+Additionally, you can enable **re-stake locking**, an on-chain commitment to continue re-staking
 until a future period (`release_period`). Once enabled, the `StakingEscrow` contract will not
-allow **restaking** to be disabled until the release period begins, even if you are the stake owner.
+allow **re-staking** to be disabled until the release period begins, even if you are the stake owner.
 
 .. code:: bash
 
     (nucypher)$ nucypher stake restake --lock-until 12345
 
-No action is needed to release the restaking lock once the release period begins.
+No action is needed to release the re-staking lock once the release period begins.
 
 
 Collect rewards earned by the staker