File indexing completed on 2022-06-10 05:08:57 UTC
view on githubraw file Latest commit 7ab24328 on 2022-06-09 11:26:48 UTC
e7dabe8aa2 Ed D*0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 import os
0020 import sys
7621b5d564 Oliv*0021 sys.path.insert(0, os.path.abspath('_extensions'))
0022 sys.path.insert(0, os.path.abspath('../utils/python/MITgcmutils'))
e7dabe8aa2 Ed D*0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 extensions = ['sphinx.ext.autodoc',
7621b5d564 Oliv*0035 'sphinx.ext.napoleon',
e7dabe8aa2 Ed D*0036 'sphinx.ext.mathjax',
0037 'sphinx.ext.viewcode',
0038 'sphinxcontrib.bibtex',
7621b5d564 Oliv*0039 'sphinxcontrib.programoutput',
e7dabe8aa2 Ed D*0040 'mitgcm']
0041
7621b5d564 Oliv*0042 autodoc_mock_imports = ['matplotlib', 'mpl_toolkits']
0043
39fa6219cc Oliv*0044 bibtex_bibfiles = ['manual_references.bib']
0045
e7dabe8aa2 Ed D*0046
0047 templates_path = ['_templates']
0048
0049
0050
0051
0052
0053 source_suffix = '.rst'
0054
0055
0056 master_doc = 'index'
0057
0058
0059 project = u'MITgcm'
0060 copyright = u'1997-, MITgcm contributors'
0061
0062
0063 author = u'Alistair Adcroft, Jean-Michel Campin, Ed Doddridge, Stephanie Dutkiewicz, Constantinos Evangelinos, David Ferreira, Mick Follows, Gael Forget, Baylor Fox-Kemper, Patrick Heimbach, Chris Hill, Ed Hill, Helen Hill, Oliver Jahn, Jody Klymak, Martin Losch, John Marshall, Guillaume Maze, Matt Mazloff, Dimitris Menemenlis, Andrea Molod, and Jeff Scott'
0064
0065
0066
0067
0068
0069
96334bef14 Oliv*0070 from subprocess import check_output, CalledProcessError
e7dabe8aa2 Ed D*0071
0072 def get_version():
0073 """
96334bef14 Oliv*0074 Return the latest tag (checkpoint) and, if there have
0075 been commits since the version was tagged, the commit hash.
e7dabe8aa2 Ed D*0076
0077 To get just the release tag use:
0078 version = version.split('-')[0]
0079 """
0080
96334bef14 Oliv*0081 try:
0082 version = check_output(['git', 'describe', '--tags', '--always'],
0083 universal_newlines=True)
0084 except CalledProcessError:
0085 return 'unknown version'
e7dabe8aa2 Ed D*0086
96334bef14 Oliv*0087 return version.rstrip()
e7dabe8aa2 Ed D*0088
0089
96334bef14 Oliv*0090 version = get_version()
e7dabe8aa2 Ed D*0091
0092 release = version
0093
0094
0095
0096
0097
0098
0099
0100
0101
7ab24328b3 Oliv*0102 language = 'en'
e7dabe8aa2 Ed D*0103
0104
0105
0106
0107 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
0108
61c5cd3fdd Oliv*0109
0110 highlight_language = 'none'
0111
e7dabe8aa2 Ed D*0112
0113 pygments_style = 'sphinx'
0114
0115
0116 todo_include_todos = False
0117
0118
0119
0120
0121 numfig_format = {'figure': 'Figure %s',
0122 'table': 'Table %s',
0123 'code-block': 'Code %s',
0124 }
0125
0126 numfig = True
0127
0128
0129 numfig_secnum_depth = 1
0130
0131
0132
0133 numfig_format = {'figure': 'Figure %s', 'table': 'Table %s', 'code-block': 'Listing %s', 'section': 'Section %s'}
0134
0135
0136
0137
0138
0139
0140
0141
0142 import sphinx_rtd_theme
0143
0144 html_theme = "sphinx_rtd_theme"
0145
0146 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157 html_static_path = ['_static']
0158
4dc99f0888 Oliv*0159 html_css_files = [
0160 'css/custom.css',
0161 'css/wrap_tables.css',
0162 ]
0163
e7dabe8aa2 Ed D*0164
0165
0166
0167
0168 htmlhelp_basename = 'MITgcmdoc'
0169
0170
0171
0172
0173 latex_elements = {
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185 'preamble': r'''
0186 \setcounter{secnumdepth}{3}
0187 \newcommand{\p}[1]{\frac{\partial }{\partial #1}}
0188 \newcommand{\pp}[2]{\frac{\partial #1}{\partial #2}}
0189 \newcommand{\dd}[2]{\frac{d #1}{d #2}}
0190 \newcommand{\h}{\frac{1}{2}}
dcaaa42497 Jeff*0191 \setlength{\tymax}{0.5\textwidth}
e7dabe8aa2 Ed D*0192 ''',
0193
0194
0195
0196
0197 }
0198
0199
0200
0201
0202 latex_documents = [
0203 (master_doc, 'MITgcm.tex', u'MITgcm Documentation',
0204 u'Alistair Adcroft, Jean-Michel Campin, Ed Doddridge, \\and Stephanie Dutkiewicz, Constantinos Evangelinos, \\and David Ferreira, Mick Follows, Gael Forget, \\and Baylor Fox-Kemper, Patrick Heimbach, Chris Hill, Ed Hill, \\and Helen Hill, Oliver Jahn, Jody Klymak, Martin Losch, \\and John Marshall, Guillaume Maze, Matt Mazloff, \\and Dimitris Menemenlis, Andrea Molod, and Jeff Scott', 'manual'),
0205 ]
0206
0207
0208
0209
0210
0211
0212 man_pages = [
0213 (master_doc, 'mitgcm', u'MITgcm Documentation',
0214 [author], 1)
0215 ]
0216
0217
0218
0219
0220
0221
0222
0223 texinfo_documents = [
0224 (master_doc, 'MITgcm', u'MITgcm Documentation',
0225 author, 'MITgcm', 'A highly configurable general circulation model.',
0226 'Miscellaneous'),
0227 ]