Browse Source

Merge "Add pdf-docs env to tox.ini"

changes/30/681130/1
Zuul 1 week ago
parent
commit
41b45f9e89
5 changed files with 40 additions and 22 deletions
  1. 5
    7
      doc/ext/support_matrix.py
  2. 9
    2
      doc/source/admin/samples/config.rst
  3. 13
    9
      doc/source/conf.py
  4. 4
    4
      doc/source/contributor/gmr.rst
  5. 9
    0
      tox.ini

+ 5
- 7
doc/ext/support_matrix.py View File

@@ -271,11 +271,10 @@ class SupportMatrixDirective(rst.Directive):
271 271
     def _build_backend_detail(self, matrix, content):
272 272
 
273 273
         detailstitle = nodes.subtitle(text="Backend Details")
274
-
275 274
         content.append(detailstitle)
275
+        content.append(nodes.paragraph())
276 276
 
277 277
         for key in six.iterkeys(matrix.backends):
278
-
279 278
             content.append(
280 279
                 nodes.subtitle(text=matrix.backends[key].title))
281 280
             content.append(
@@ -283,7 +282,7 @@ class SupportMatrixDirective(rst.Directive):
283 282
                     matrix.backends[key],
284 283
                     matrix))
285 284
 
286
-            content.append(nodes.line())
285
+            content.append(nodes.paragraph())
287 286
 
288 287
         return content
289 288
 
@@ -343,13 +342,11 @@ class SupportMatrixDirective(rst.Directive):
343 342
         summary = nodes.table()
344 343
         summary.set_class("table")
345 344
         summary.set_class("table-condensed")
346
-        cols = len(list(six.iterkeys(matrix.backends)))
347
-        cols += 2
348
-        summarygroup = nodes.tgroup(cols=cols)
345
+        summarygroup = nodes.tgroup(cols=5)
349 346
         summarybody = nodes.tbody()
350 347
         summaryhead = nodes.thead()
351 348
 
352
-        for i in range(cols):
349
+        for i in range(5):
353 350
             summarygroup.append(nodes.colspec(colwidth=1))
354 351
         summarygroup.append(summaryhead)
355 352
         summarygroup.append(summarybody)
@@ -377,6 +374,7 @@ class SupportMatrixDirective(rst.Directive):
377 374
         blank = nodes.entry()
378 375
         blank.append(nodes.strong(text="Notes"))
379 376
         header.append(blank)
377
+
380 378
         summaryhead.append(header)
381 379
 
382 380
         grades = matrix.grades

+ 9
- 2
doc/source/admin/samples/config.rst View File

@@ -2,5 +2,12 @@
2 2
 designate.conf
3 3
 ==============
4 4
 
5
-.. literalinclude:: ../../_static/designate.conf.sample
6
-    :language: ini
5
+.. only:: html
6
+
7
+   .. literalinclude:: ../../_static/designate.conf.sample
8
+      :language: ini
9
+
10
+.. only:: latex
11
+
12
+   Please refer to the online version of this documentation for a full
13
+   config file example.

+ 13
- 9
doc/source/conf.py View File

@@ -201,21 +201,23 @@ htmlhelp_basename = 'designatedoc'
201 201
 # -- Options for LaTeX output --------------------------------------------------
202 202
 
203 203
 latex_elements = {
204
-# The paper size ('letterpaper' or 'a4paper').
205
-#'papersize': 'letterpaper',
204
+    # The paper size ('letterpaper' or 'a4paper').
205
+    #'papersize': 'letterpaper',
206 206
 
207
-# The font size ('10pt', '11pt' or '12pt').
208
-#'pointsize': '10pt',
207
+    # The font size ('10pt', '11pt' or '12pt').
208
+    #'pointsize': '10pt',
209 209
 
210
-# Additional stuff for the LaTeX preamble.
211
-#'preamble': '',
210
+    # Additional stuff for the LaTeX preamble.
211
+    #'preamble': '',
212
+
213
+    'preamble': r'\setcounter{tocdepth}{3}',
212 214
 }
213 215
 
214 216
 # Grouping the document tree into LaTeX files. List of tuples
215 217
 # (source start file, target name, title, author, documentclass [howto/manual]).
216 218
 latex_documents = [
217
-  ('index', 'designate.tex', u'Designate Documentation',
218
-   u'Managed I.T.', 'manual'),
219
+  ('index', 'doc-designate.tex', u'Designate Documentation',
220
+   u'Designate Developers', 'manual'),
219 221
 ]
220 222
 
221 223
 # The name of an image file (relative to this directory) to place at the top of
@@ -236,8 +238,10 @@ latex_documents = [
236 238
 #latex_appendices = []
237 239
 
238 240
 # If false, no module index is generated.
239
-#latex_domain_indices = True
241
+latex_domain_indices = False
240 242
 
243
+# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664
244
+latex_use_xindy = False
241 245
 
242 246
 # -- Options for manual page output --------------------------------------------
243 247
 

+ 4
- 4
doc/source/contributor/gmr.rst View File

@@ -333,10 +333,10 @@ GMR Example
333 333
       log-dir = /opt/stack/logs/designate
334 334
       log-file = None
335 335
       log-format = None
336
-      logging_context_format_string = %(asctime)s.%(msecs)03d %(color)s%(levelname)s %(name)s [%(request_id)s %(user)s %(tenant)s%(color)s] %(instance)s%(color)s%(message)s
337
-      logging_debug_format_suffix = from (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d
338
-      logging_default_format_string = %(asctime)s.%(msecs)03d %(color)s%(levelname)s %(name)s [-%(color)s] %(instance)s%(color)s%(message)s
339
-      logging_exception_prefix = %(color)s%(asctime)s.%(msecs)03d TRACE %(name)s %(instance)s
336
+      logging_context_format_string = %(asctime)s.%(msecs)03d %(color)s%(levelname)s %(name)s [[01;36m%(request_id)s [00;36m%(user)s %(tenant)s%(color)s] [01;35m%(instance)s%(color)s%(message)s[00m
337
+      logging_debug_format_suffix = [00;33mfrom (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d[00m
338
+      logging_default_format_string = %(asctime)s.%(msecs)03d %(color)s%(levelname)s %(name)s [[00;36m-%(color)s] [01;35m%(instance)s%(color)s%(message)s[00m
339
+      logging_exception_prefix = %(color)s%(asctime)s.%(msecs)03d TRACE %(name)s [01;35m%(instance)s[00m
340 340
       mdns-topic = mdns
341 341
       network_api = neutron
342 342
       notification_driver =

+ 9
- 0
tox.ini View File

@@ -65,6 +65,15 @@ commands =
65 65
     rm -rf doc/build
66 66
     sphinx-build -W -b html doc/source doc/build/html
67 67
 
68
+[testenv:pdf-docs]
69
+basepython = python3
70
+deps = {[testenv:docs]deps}
71
+whitelist_externals =
72
+  make
73
+commands =
74
+  sphinx-build -W -b latex doc/source doc/build/pdf
75
+  make -C doc/build/pdf
76
+
68 77
 [testenv:cover]
69 78
 basepython = python3
70 79
 setenv =

Loading…
Cancel
Save