Skip to content

Commit 80a98f6

Browse files
committed
Add .readthedocs.yml
1 parent 06fe95c commit 80a98f6

File tree

5 files changed

+12
-52
lines changed

5 files changed

+12
-52
lines changed

docs/client/overview.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ For example, to run a new job for a given spider with custom parameters::
145145

146146

147147
Getting job information
148-
^^^^^^^^^^^^^^^^^^^^^^
148+
^^^^^^^^^^^^^^^^^^^^^^^
149149

150150
To select a specific job for a project, use ``.jobs.get(<jobKey>)``::
151151

docs/conf.py

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
import sys
2121
from datetime import datetime
2222

23-
from docutils import nodes
24-
from sphinx.util.docfields import TypedField
25-
from sphinx import addnodes
26-
2723

2824
sys.path.insert(0, os.path.abspath('..'))
2925

@@ -76,7 +72,7 @@
7672
#
7773
# This is also used if you do content translation via gettext catalogs.
7874
# Usually you set "language" from the command line for these cases.
79-
language = None
75+
language = "en"
8076

8177
# List of patterns, relative to source directory, that match files and
8278
# directories to ignore when looking for source files.
@@ -94,8 +90,7 @@
9490

9591
# The theme to use for HTML and HTML Help pages. See the documentation for
9692
# a list of builtin themes.
97-
#
98-
html_theme = 'alabaster'
93+
html_theme = "sphinx_rtd_theme"
9994

10095
# Theme options are theme-specific and customize the look and feel of a theme
10196
# further. For a list of options available for each theme, see the
@@ -171,44 +166,3 @@
171166

172167
html_theme = 'sphinx_rtd_theme'
173168
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
174-
175-
176-
# disable cross-reference for ivar
177-
# patch taken from http://stackoverflow.com/a/41184353/1932023
178-
def patched_make_field(self, types, domain, items, env=None):
179-
# type: (List, unicode, Tuple) -> nodes.field
180-
def handle_item(fieldarg, content):
181-
par = nodes.paragraph()
182-
par += addnodes.literal_strong('', fieldarg) # Patch: this line added
183-
# par.extend(self.make_xrefs(self.rolename, domain, fieldarg,
184-
# addnodes.literal_strong))
185-
if fieldarg in types:
186-
par += nodes.Text(' (')
187-
# NOTE: using .pop() here to prevent a single type node to be
188-
# inserted twice into the doctree, which leads to
189-
# inconsistencies later when references are resolved
190-
fieldtype = types.pop(fieldarg)
191-
if len(fieldtype) == 1 and isinstance(fieldtype[0], nodes.Text):
192-
typename = u''.join(n.astext() for n in fieldtype)
193-
par.extend(self.make_xrefs(self.typerolename, domain, typename,
194-
addnodes.literal_emphasis))
195-
else:
196-
par += fieldtype
197-
par += nodes.Text(')')
198-
par += nodes.Text(' -- ')
199-
par += content
200-
return par
201-
202-
fieldname = nodes.field_name('', self.label)
203-
if len(items) == 1 and self.can_collapse:
204-
fieldarg, content = items[0]
205-
bodynode = handle_item(fieldarg, content)
206-
else:
207-
bodynode = self.list_type()
208-
for fieldarg, content in items:
209-
bodynode += nodes.list_item('', handle_item(fieldarg, content))
210-
fieldbody = nodes.field_body('', bodynode)
211-
return nodes.field('', fieldname, fieldbody)
212-
213-
214-
TypedField.make_field = patched_make_field

docs/index.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
Client interface for Scrapinghub API
33
====================================
44

5-
.. image:: https://secure.travis-ci.org/scrapinghub/python-scrapinghub.svg?branch=master
6-
:target: https://travis-ci.org/scrapinghub/python-scrapinghub
7-
85
The ``scrapinghub`` is a Python library for communicating with the `Scrapinghub API`_.
96

107
.. _Scrapinghub API: https://doc.scrapinghub.com/scrapy-cloud.html#scrapycloud

docs/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sphinx==7.2.6
2+
sphinx-rtd-theme==2.0.0

tox.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,10 @@ deps =
1313
msgpack: -r{toxinidir}/requirements.txt
1414
pypy-msgpack: -r{toxinidir}/requirements-pypy.txt
1515
commands = py.test --cov=scrapinghub --cov-report=xml {posargs: scrapinghub tests}
16+
17+
[testenv:docs]
18+
changedir = docs
19+
deps =
20+
-r docs/requirements.txt
21+
commands =
22+
sphinx-build -W -b html . {envtmpdir}/html

0 commit comments

Comments
 (0)