1 | # -*- coding: utf-8 -*- |
---|
2 | # |
---|
3 | # Configuration file for the Sphinx documentation builder. |
---|
4 | # |
---|
5 | # This file does only contain a selection of the most common options. For a |
---|
6 | # full list see the documentation: |
---|
7 | # http://www.sphinx-doc.org/en/master/config |
---|
8 | |
---|
9 | # -- Project information ----------------------------------------------------- |
---|
10 | |
---|
11 | project = 'NEMO' |
---|
12 | author = 'NEMO System Team' |
---|
13 | |
---|
14 | # The short X.Y version |
---|
15 | version = '4.0' |
---|
16 | # The full version, including alpha/beta/rc tags |
---|
17 | release = '4.0.1' |
---|
18 | |
---|
19 | |
---|
20 | # -- General configuration --------------------------------------------------- |
---|
21 | |
---|
22 | # Add any Sphinx extension module names here, as strings. They can be |
---|
23 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
---|
24 | # ones. |
---|
25 | extensions = ['sphinx.ext.extlinks', 'sphinxcontrib.bibtex'] |
---|
26 | |
---|
27 | # Add any paths that contain templates here, relative to this directory. |
---|
28 | templates_path = ['_templates'] |
---|
29 | |
---|
30 | # The master toctree document. |
---|
31 | master_doc = 'NEMO_guide' |
---|
32 | |
---|
33 | # List of patterns, relative to source directory, that match files and |
---|
34 | # directories to ignore when looking for source files. |
---|
35 | # This pattern also affects html_static_path and html_extra_path . |
---|
36 | exclude_patterns = ['global.rst', 'coarsening.rst'] |
---|
37 | |
---|
38 | # The name of the Pygments (syntax highlighting) style to use. |
---|
39 | pygments_style = 'sphinx' |
---|
40 | |
---|
41 | |
---|
42 | # -- Options for HTML output ------------------------------------------------- |
---|
43 | |
---|
44 | # The theme to use for HTML and HTML Help pages. See the documentation for |
---|
45 | # a list of builtin themes. |
---|
46 | # |
---|
47 | html_theme = 'sphinx_rtd_theme' |
---|
48 | |
---|
49 | # Theme options are theme-specific and customize the look and feel of a theme |
---|
50 | # further. For a list of options available for each theme, see the |
---|
51 | # documentation. |
---|
52 | # |
---|
53 | html_theme_options = {} |
---|
54 | |
---|
55 | # Add any paths that contain custom static files (such as style sheets) here, |
---|
56 | # relative to this directory. They are copied after the builtin static files, |
---|
57 | # so a file named "default.css" will overwrite the builtin "default.css". |
---|
58 | html_static_path = ['_static'] |
---|
59 | |
---|
60 | html_favicon = '_static/ORCA.ico' |
---|
61 | |
---|
62 | |
---|
63 | # -- Options for LaTeX output ------------------------------------------------ |
---|
64 | |
---|
65 | latex_elements = { |
---|
66 | # The paper size ('letterpaper' or 'a4paper'). |
---|
67 | # |
---|
68 | # 'papersize': 'letterpaper', |
---|
69 | |
---|
70 | # The font size ('10pt', '11pt' or '12pt'). |
---|
71 | # |
---|
72 | # 'pointsize': '10pt', |
---|
73 | |
---|
74 | # Additional stuff for the LaTeX preamble. |
---|
75 | # |
---|
76 | # 'preamble': '', |
---|
77 | |
---|
78 | # Latex figure (float) alignment |
---|
79 | # |
---|
80 | # 'figure_align': 'htbp', |
---|
81 | } |
---|
82 | |
---|
83 | # Grouping the document tree into LaTeX files. List of tuples |
---|
84 | # (source start file, target name, title, |
---|
85 | # author, documentclass [howto, manual, or own class]). |
---|
86 | latex_documents = [ |
---|
87 | (master_doc, 'NEMO_guide.tex', 'NEMO Quick Start Guide', |
---|
88 | 'NEMO System Team', 'howto'), |
---|
89 | ] |
---|
90 | |
---|
91 | |
---|
92 | # -- Customisation ----------------------------------------------------------- |
---|
93 | |
---|
94 | # Timestamping |
---|
95 | import datetime |
---|
96 | year = datetime.date.today().year |
---|
97 | copyright = '2008-' + str( year ) + ', NEMO Consortium' |
---|
98 | |
---|
99 | # Link aliases |
---|
100 | extlinks = { |
---|
101 | 'doi' : ('https://doi.org/%s' , None), |
---|
102 | 'forge' : ('https://forge.ipsl.jussieu.fr/nemo/%s' , None), |
---|
103 | 'github' : ('https://github.com/%s' , None), |
---|
104 | 'xios' : ('https://forge.ipsl.jussieu.fr/ioserver/%s', None), |
---|
105 | 'website': ('https://www.nemo-ocean.eu/%s' , None), |
---|
106 | 'zenodo' : ('https://zenodo.org/publication/%s' , None) |
---|
107 | } |
---|
108 | |
---|
109 | # Include common directives for every rst file |
---|
110 | rst_epilog = open('global.rst', 'r').read() |
---|
111 | |
---|
112 | # SVN revision |
---|
113 | import subprocess |
---|
114 | revision = subprocess.check_output("svnversion").decode("utf-8") |
---|
115 | rst_prolog = '.. |revision| replace:: %s' % revision |
---|