Merge ~lgp171188/rutabaga:add-readthedocs-yaml into rutabaga:master

Proposed by Guruprasad
Status: Merged
Approved by: Guruprasad
Approved revision: 75bd6ed751ce6feee5eb118f1a5e6f36e498fc1e
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~lgp171188/rutabaga:add-readthedocs-yaml
Merge into: rutabaga:master
Diff against target: 115 lines (+45/-8)
4 files modified
.readthedocs.yaml (+17/-0)
docs/conf.py (+3/-3)
setup.py (+14/-5)
tox.ini (+11/-0)
Reviewer Review Type Date Requested Status
Jürgen Gmach Approve
Review via email: mp+452819@code.launchpad.net

Commit message

Add a .readthedocs.yaml configuration file

And add tox.ini to build the docs using tox

To post a comment you must log in.
Revision history for this message
Guruprasad (lgp171188) :
Revision history for this message
Jürgen Gmach (jugmac00) wrote :

Thanks for working on this!

I feel slightly uneasy to pin to a very outdated Sphinx version, which even is possibly vulnerable to a couple of security issues, which I have not checked in detail:
https://security.snyk.io/package/pip/sphinx

Could you elaborate what the issue was with building docs with a recent version?
If this is related to an upstream package, we need to report the issue there and think about what to do.

Even if we agree upon merging this as is, we should add a task to our Jira board, and put in an upcoming pulse.

Revision history for this message
Jürgen Gmach (jugmac00) wrote :

Guruprasad proposed a fix in the upstream package, see https://github.com/Cornices/cornice.ext.sphinx/pull/26

Revision history for this message
Guruprasad (lgp171188) wrote :

Jürgen, the upstream PR has been merged and the maintainer published a new release, 0.4, which allows us to upgrade Sphinx and remove all the pins. Can you re-review?

Revision history for this message
Jürgen Gmach (jugmac00) wrote :

Thank you, looks great!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.readthedocs.yaml b/.readthedocs.yaml
2new file mode 100644
3index 0000000..126cfe1
4--- /dev/null
5+++ b/.readthedocs.yaml
6@@ -0,0 +1,17 @@
7+version: 2
8+
9+build:
10+ os: ubuntu-22.04
11+ tools:
12+ python: "3.11"
13+
14+python:
15+ install:
16+ - method: pip
17+ path: .
18+ extra_requirements:
19+ - docs
20+
21+sphinx:
22+ configuration: docs/conf.py
23+ fail_on_warning: true
24diff --git a/docs/conf.py b/docs/conf.py
25index bb6d11e..0da1f7a 100644
26--- a/docs/conf.py
27+++ b/docs/conf.py
28@@ -30,7 +30,7 @@ sys.path.insert(0, os.path.abspath('../'))
29 # Add any Sphinx extension module names here, as strings. They can be
30 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
31 # ones.
32-extensions = ['sphinx.ext.autodoc', 'cornice.ext.sphinxext']
33+extensions = ['sphinx.ext.autodoc', 'cornice_sphinx']
34
35 # Add any paths that contain templates here, relative to this directory.
36 templates_path = ['_templates']
37@@ -59,7 +59,7 @@ release = '0.1'
38
39 # The language for content autogenerated by Sphinx. Refer to documentation
40 # for a list of supported languages.
41-#language = None
42+language = "en"
43
44 # There are two options for replacing |today|: either, you set today to some
45 # non-false value, then it is used:
46@@ -129,7 +129,7 @@ html_theme = 'alabaster'
47 # Add any paths that contain custom static files (such as style sheets) here,
48 # relative to this directory. They are copied after the builtin static files,
49 # so a file named "default.css" will overwrite the builtin "default.css".
50-html_static_path = ['_static']
51+html_static_path = []
52
53 # Add any extra paths that contain custom files (such as robots.txt or
54 # .htaccess) here, relative to this directory. These files are copied
55diff --git a/setup.py b/setup.py
56index da1216e..c27f108 100644
57--- a/setup.py
58+++ b/setup.py
59@@ -20,16 +20,23 @@ requires = [
60 'PyYAML',
61 'waitress',
62 ]
63+docs_requires = [
64+ 'cornice',
65+ 'cornice-sphinx',
66+ 'Jinja2',
67+ 'PyYAML',
68+ 'Sphinx',
69+]
70+deploy_requires = [
71+ 'envdir',
72+ 'gunicorn',
73+ ]
74 test_requires = [
75 'fixtures',
76 'flake8',
77 'testtools',
78 'webtest',
79 ]
80-deploy_requires = [
81- 'envdir',
82- 'gunicorn',
83- ]
84
85 setup(
86 name='rutabaga',
87@@ -58,8 +65,10 @@ setup(
88 install_requires=requires,
89 tests_require=test_requires,
90 extras_require=dict(
91+ deploy=deploy_requires,
92+ docs=docs_requires,
93 test=test_requires,
94- deploy=deploy_requires),
95+ ),
96 test_suite='rutabaga',
97 entry_points="""\
98 [paste.app_factory]
99diff --git a/tox.ini b/tox.ini
100new file mode 100644
101index 0000000..8a2d6e0
102--- /dev/null
103+++ b/tox.ini
104@@ -0,0 +1,11 @@
105+[tox]
106+envlist =
107+ docs
108+
109+[testenv:docs]
110+basepython =
111+ python3.11
112+commands =
113+ sphinx-build -b html -d docs/_build/doctrees docs/ docs/_build/html
114+deps =
115+ .[docs]

Subscribers

People subscribed via source and target branches