Skip to content

Commit e99c188

Browse files
authored
docs: Fix sphinx documentation failures (#219)
Our documentation file had a configuration issue, which emits a warning when building with sphinx. This caused the build process on readthedocs.org to fail because they treat warnings as errors. We didn't catch this because: 1. Warnings are treated like warnings when generating documentation locally. 2. We don't try to generate the documentation as part of our CI process. This commit should resolve both the underlying issue and the deficiencies that prevented us from catching this initially.
1 parent 13b5d98 commit e99c188

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

.circleci/config.yml

+11
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ workflows:
99
- test-linux:
1010
name: Python 3.7
1111
docker-image: cimg/python:3.7
12+
test-build-docs: true
1213
- test-linux:
1314
name: Python 3.8
1415
docker-image: cimg/python:3.8
@@ -33,6 +34,9 @@ jobs:
3334
test-packaging:
3435
type: boolean
3536
default: true
37+
test-build-docs:
38+
type: boolean
39+
default: false
3640
test-with-codeclimate:
3741
type: boolean
3842
default: false
@@ -95,6 +99,13 @@ jobs:
9599
command: |
96100
export PATH="/home/circleci/.local/bin:$PATH"
97101
make lint
102+
- when:
103+
condition: <<parameters.test-build-docs>>
104+
steps:
105+
- run:
106+
name: verify docs can be built successfully
107+
command: |
108+
make docs
98109
99110
- unless:
100111
condition: <<parameters.skip-sse-contract-tests>>

docs/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
.PHONY: help install html
55

6-
SPHINXOPTS =
6+
SPHINXOPTS = -W --keep-going
77
SPHINXBUILD = sphinx-build
88
SPHINXPROJ = launchdarkly-server-sdk
99
SOURCEDIR = .

docs/api-main.rst

-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ ldclient module
66

77
.. automodule:: ldclient
88
:members: Context,ContextBuilder,ContextMultiBuilder,get,set_config
9-
:special-members: __init__
109

1110
ldclient.client module
1211
----------------------
1312

1413
.. automodule:: ldclient.client
1514
:members: LDClient
16-
:special-members: __init__
1715

1816
ldclient.config module
1917
----------------------

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
#
6969
# This is also used if you do content translation via gettext catalogs.
7070
# Usually you set "language" from the command line for these cases.
71-
language = None
71+
language = 'en'
7272

7373
# List of patterns, relative to source directory, that match files and
7474
# directories to ignore when looking for source files.

0 commit comments

Comments
 (0)