ifw-daq  1.0.0
IFW Data Acquisition modules
conf.py
Go to the documentation of this file.
1 import sphinx_eso_theme
2 import subprocess
3 
4 # Notes
5 # -----
6 #
7 # Raster images are assumed to be exported from Magicdraw in 288dpi png.
8 # To get a 1:1 size compared with what you see in Magicdraw the image must be scaled
9 # to 33%
10 
11 extensions = ['sphinx.ext.intersphinx',
12  'sphinx.ext.ifconfig',
13  'sphinx.ext.graphviz',
14  'sphinx.ext.mathjax',
15 # 'sphinxcontrib.plantuml',
16  'sphinx_eso_theme']
17 
18 source_suffix = '.rst'
19 
20 # The master toctree document.
21 master_doc = 'index'
22 exclude_patterns = ['src/dpm.rst']
23 # Use numbered figures
24 numfig = True
25 # General information about the project.
26 project = 'IFW Data Acquisition User Manual'
27 # note the leading space which is required to avoid SOURCE_DATE_EPOCH being used.
28 copyright = ' 2021 ESO - European Southern Observatory'
29 homepage = r'https://gitlab.eso.org/ifw/ifw-hl'
30 
31 
32 #############################################################################
33 
34 rst_prolog = """
35 .. |daq| replace:: *Data Acquisition*
36 .. |daqs| replace:: *Data Acquisitions*
37 .. |dp| replace:: *Data Product*
38 .. |ocm| replace:: :ref:`OCM<ocm>`
39 .. |dpm| replace:: *DPM*
40 .. |olas| replace:: :ref:`OLAS<def-olas>`
41 .. |configpath| replace:: :term:`Config Path`
42 .. |recif| replace:: :term:`recif`
43 .. |ocmserver| replace:: :ref:`ocmServer <ocmServer>`
44 .. |ocmserverctl| replace:: :ref:`ocmServerCtl <ocmServerCtl>`
45 """
46 
47 #############################################################################
48 # Update for each release:
49 author='Rosenquist, Calle'
50 latex_attrs = dict(
51  pdm_version='n',
52  release_date='2021-xx-xx',
53  owner=author,
54  validated_pm='Kornweibel, Nick',
55  validated_se='González Herrera, Juan Carlos',
56  validated_pe='Biancat Marchet, Fabio',
57  approved_pgm='Tamai, Roberto')
58 
59 # The version info for the project you're documenting, acts as replacement for
60 # |version| and |release|, also used in various other places throughout the
61 # built documents.
62 #
63 # The short X.Y version.
64 version = '1.0.0'
65 prerelease = False
66 # The full version, including alpha/beta/rc tags.
67 release = '1.0.0'
68 ifw_release = '3.0.0'
69 if prerelease:
70  try:
71  rev = subprocess.run(["git", "rev-parse", "--short=5", "HEAD"],
72  stdout=subprocess.PIPE).stdout.decode("utf-8")
73  suffix = "+git.%s" % rev
74  release += suffix
75  version += suffix
76  except Exception:
77  pass
78 #############################################################################
79 
80 
81 # The language for content autogenerated by Sphinx. Refer to documentation
82 # for a list of supported languages.
83 #
84 # This is also used if you do content translation via gettext catalogs.
85 # Usually you set "language" from the command line for these cases.
86 language = None
87 
88 # List of patterns, relative to source directory, that match files and
89 # directories to ignore when looking for source files.
90 # This patterns also effect to html_static_path and html_extra_path
91 exclude_patterns = []
92 
93 # The name of the Pygments (syntax highlighting) style to use.
94 pygments_style = 'default'
95 
96 # If true, `todo` and `todoList` produce output, else they produce nothing.
97 todo_include_todos = True
98 
99 plantuml_batch_size = 100
100 
101 # -- Options for HTML output ----------------------------------------------
102 
103 # The theme to use for HTML and HTML Help pages. See the documentation for
104 # a list of builtin themes.
105 #
106 html_theme = 'sphinx_eso_theme'
107 html_theme_path = ['_themes/', ]
108 html_show_sourcelink = False
109 html_copy_source = False
110 
111 # Theme options are theme-specific and customize the look and feel of a theme
112 # further. For a list of options available for each theme, see the
113 # documentation.
114 #
115 # html_theme_options = {}
116 
117 # Add any paths that contain custom static files (such as style sheets) here,
118 # relative to this directory. They are copied after the builtin static files,
119 # so a file named "default.css" will overwrite the builtin "default.css".
120 html_static_path = ['_static']
121 
122 #html_logo = '_static/eso_logo.png'
123 #html_favicon = '_static/eso-favicon.ico'
124 
125 # ESO customization of theme colors mostly.
126 html_context = {}
127 
128 
129 html_show_sphinx = False
130 
131 
132 # -- Options for LaTeX output ---------------------------------------------
133 # The ESO PDM style only supports the article class so we map manual to article class
134 # and set the top level sectioning to use 'section' as otherwise 'chapter' would be used, which is
135 # ignored for the article class.
136 latex_toplevel_sectioning = 'section'
137 latex_docclass = dict(manual='article')
138 latex_elements = {
139  # The paper size ('letterpaper' or 'a4paper').
140  #
141  'papersize': 'a4paper',
142 
143  # The font size ('10pt', '11pt' or '12pt').
144  #
145  'pointsize': '11pt',
146 
147  # Additional stuff for the LaTeX preamble.
148  #
149  'preamble':
150  r'''
151  \usepackage[public]{eso-pdm}
152  \pdmProgram{ELT}
153  \pdmProject{Instrumentation Framework}
154  \pdmTitle{ELT~ICS~Framework Data Acquisition\\User~Manual}
155  \pdmHeaderTitle{ELT~ICS~Framework - Data Acquisition - User~Manual}
156  \pdmDocId{ESO-396401}
157  \pdmDocVersion{%(pdm_version)s}
158  \pdmDocType{User Manual (MAN)}
159  \pdmDocDate{%(release_date)s}
160  \pdmSignatureList{
161  \pdmSignature{Owner}{%(owner)s}
162  \pdmSignature{Validated by PM}{%(validated_pm)s}
163  \pdmSignature{Validated by SE}{%(validated_se)s}
164  \pdmSignature{Validated by PE}{%(validated_pe)s}
165  \pdmSignature{Approved by PGM}{%(approved_pgm)s}
166  }
167  %% Disable pagestyle changes as it breaks ESO PDM style
168  \renewcommand{\pagestyle}[1]{}
169  ''' % latex_attrs,
170  # Latex figure (float) alignment
171  #
172  # 'figure_align': 'htbp',
173  'sphinxsetup': \
174  'hmargin={0.7in,0.7in}, vmargin={1in,1in}, \
175  verbatimwithframe=true, \
176  OuterLinkColor={rgb}{0,0,0.6}, \
177  InnerLinkColor={rgb}{0,0,0}, \
178  warningBorderColor={rgb}{0.8,0,0}, \
179  cautionBorderColor={rgb}{1,0.8,0}, \
180  TitleColor={rgb}{0,0,0}',
181  'printindex': r'\newpage',
182  'maketitle': r'''
183  \pdmmaketitle
184 
185  %% Scope redefinition of clearpage to relax to avoid new pages for each
186  \begingroup
187  \let\clearpage\relax
188 
189  \section*{Release}
190  This document corresponds to
191  \sphinxhref{%(homepage)s}{\texttt{ifw-hl}\footnote{\sphinxnolinkurl{%(homepage)s}}} v%(ifw_release)s.
192 
193  \section*{Authors}
194  \begin{tabularx}{\linewidth}{|p{0.25\linewidth}|X|}
195  \hline
196  \multicolumn{1}{|l|}{\textbf{Name}}\tbspa &
197  \multicolumn{1}{l|}{\textbf{Affiliation}} \tbspb\\
198  \hline
199  \tbspa %(author)s & ESO/DOE/CSE\tbspb\\ \hline
200  \end{tabularx}
201 
202  \section*{Change Record from previous Version}
203  \begin{tabularx}{\linewidth}{|p{0.25\linewidth}|X|}
204  \hline
205  \multicolumn{1}{|l|}{\textbf{Affected Section(s)}}\tbspa &
206  \multicolumn{1}{l|}{\textbf{Changes / Reason / Remarks}} \tbspb\\
207  \hline
208  \tbspa All & First version \tbspb\\ \hline
209  \end{tabularx}
210 
211  %% Restore \clearpage
212  \endgroup
213  \tymin=60pt
214  \tymax=\maxdimen
215  \hyphenation{Status-Topic}
216 
217  ''' % dict(release=release, ifw_release=ifw_release, author=author, homepage=homepage),
218  'tableofcontents': r'\tableofcontents\newpage',
219 }
220 
221 latex_show_urls = 'footnote'
222 
223 # Grouping the document tree into LaTeX files. List of tuples
224 # (source start file, target name, title,
225 # author, documentclass [howto, manual, or own class]).
226 latex_documents = [
227  ('index-latex', 'ELT_ICS_Framework_-_Data_Acquisition_-_User_Manual.tex',
228  'ELT ICS Framework - Data Acquisition - User Manual',
229  author, 'manual', False),
230 ]
231 
232 
233 def setup(app):
234  app.add_config_value('prerelease', False, 'env')
conf.setup
def setup(app)
Definition: conf.py:233