|
41 | 41 | 'sphinx_automodapi.automodapi',
|
42 | 42 | 'sphinx_automodapi.smart_resolver',
|
43 | 43 | 'sphinxcontrib.bibtex',
|
| 44 | + 'sphinx_design', |
44 | 45 | ]
|
45 | 46 |
|
46 | 47 | # Add any paths that contain templates here, relative to this directory.
|
|
91 | 92 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
92 | 93 | # a list of builtin themes.
|
93 | 94 |
|
94 |
| -html_theme = 'sphinx_book_theme' |
| 95 | +html_theme = 'pydata_sphinx_theme' |
95 | 96 |
|
96 | 97 | # -- Sphinx Book Theme Options -----------------------------------------------------
|
97 | 98 | html_theme_options = {
|
98 |
| - "repository_url": 'https://github.com/wtbarnes/fiasco', |
99 |
| - "use_repository_button": True, |
100 |
| - "use_issues_button": True, |
| 99 | + "use_edit_page_button": True, |
| 100 | + "icon_links": [ |
| 101 | + { |
| 102 | + "name": "GitHub", |
| 103 | + "url": "https://github.com/wtbarnes/fiasco", |
| 104 | + "icon": "fa-brands fa-github", |
| 105 | + }, |
| 106 | + { |
| 107 | + "name": "PyPI", |
| 108 | + "url": "https://pypi.org/project/fiasco/", |
| 109 | + "icon": "fa-brands fa-python", |
| 110 | + }, |
| 111 | + { |
| 112 | + "name": "CHIANTI", |
| 113 | + "url": "http://chiantidatabase.org/", |
| 114 | + "icon": "fa-solid fa-wine-glass", |
| 115 | + } |
| 116 | + ], |
| 117 | + #"secondary_sidebar_items": { |
| 118 | + # "index": [] # Remove secondary sidebar on landing page |
| 119 | + #}, |
| 120 | + "announcement": "fiasco currently only supports version 8 of the CHIANTI database.", |
| 121 | +} |
| 122 | +html_context = { |
| 123 | + "github_user": "wtbarnes", |
| 124 | + "github_repo": "fiasco", |
| 125 | + "github_version": "main", |
| 126 | + "doc_path": "docs", |
101 | 127 | }
|
102 | 128 | html_logo = '_static/fiasco-logo.png'
|
103 | 129 |
|
|
127 | 153 |
|
128 | 154 | # On Read the Docs and CI, download the database and build a minimal HDF5 version
|
129 | 155 | if ON_RTD or ON_GHA:
|
130 |
| - from fiasco.util import build_hdf5_dbase, download_dbase |
| 156 | + from fiasco.util import build_hdf5_dbase, download_dbase, get_test_file_list |
131 | 157 | from fiasco.util.setup_db import CHIANTI_URL, LATEST_VERSION
|
132 | 158 | FIASCO_HOME = pathlib.Path.home() / '.fiasco'
|
133 | 159 | FIASCO_HOME.mkdir(exist_ok=True, parents=True)
|
|
137 | 163 | build_hdf5_dbase(
|
138 | 164 | ascii_dbase_root,
|
139 | 165 | hdf5_dbase_root,
|
140 |
| - files=[ |
141 |
| - 'chianti.ip', |
142 |
| - 'chianti.ioneq', |
143 |
| - 'sun_coronal_1992_feldman_ext.abund', |
144 |
| - 'sun_coronal_1992_feldman.abund', |
145 |
| - 'c_1.diparams', |
146 |
| - 'c_2.diparams', |
147 |
| - 'c_2.drparams', |
148 |
| - 'c_2.rrparams', |
149 |
| - 'c_3.diparams', |
150 |
| - 'c_3.drparams', |
151 |
| - 'c_3.easplups', |
152 |
| - 'c_3.rrparams', |
153 |
| - 'c_4.diparams', |
154 |
| - 'c_4.drparams', |
155 |
| - 'c_4.easplups', |
156 |
| - 'c_4.rrparams', |
157 |
| - 'c_5.diparams', |
158 |
| - 'c_5.drparams', |
159 |
| - 'c_5.rrparams', |
160 |
| - 'c_6.diparams', |
161 |
| - 'c_6.drparams', |
162 |
| - 'c_6.rrparams', |
163 |
| - 'c_7.rrparams', |
164 |
| - 'fe_5.elvlc', |
165 |
| - 'fe_15.elvlc', |
166 |
| - 'fe_16.diparams', |
167 |
| - 'fe_16.drparams', |
168 |
| - 'fe_16.easplups', |
169 |
| - 'fe_16.rrparams', |
170 |
| - 'fe_18.elvlc', |
171 |
| - 'fe_18.wgfa', |
172 |
| - 'fe_18.scups', |
173 |
| - 'o_6.scups', |
174 |
| - 'o_6.elvlc', |
175 |
| - 'o_6.wgfa', |
176 |
| - ] |
| 166 | + files=get_test_file_list(), |
177 | 167 | )
|
178 | 168 | with (FIASCO_HOME / 'fiascorc').open('w') as f:
|
179 | 169 | c = configparser.ConfigParser()
|
|
183 | 173 | c.write(f)
|
184 | 174 |
|
185 | 175 | # -- Sphinx gallery -----------------------------------------------------------
|
| 176 | +from sphinx_gallery.sorting import ExampleTitleSortKey, ExplicitOrder # NOQA: E402 |
| 177 | + |
186 | 178 | extensions += ['sphinx_gallery.gen_gallery']
|
187 | 179 | sphinx_gallery_conf = {
|
188 |
| - 'examples_dirs': '../examples', # path to your example scripts |
189 |
| - 'gallery_dirs': 'generated/gallery', # path to where to save gallery generated output |
190 |
| - 'filename_pattern': '^((?!skip_).)*$', |
191 |
| - 'default_thumb_file': '_static/fiasco-logo.png' |
| 180 | + 'subsection_order': ExplicitOrder([ |
| 181 | + '../examples/user_guide/', |
| 182 | + '../examples/idl_comparisons/', |
| 183 | + ]), |
| 184 | + 'within_subsection_order': ExampleTitleSortKey, |
| 185 | + 'examples_dirs': '../examples', # path to your example scripts |
| 186 | + 'gallery_dirs': 'generated/gallery', # path to where to save gallery generated output |
| 187 | + 'filename_pattern': '^((?!skip_).)*$', |
| 188 | + 'default_thumb_file': '_static/fiasco-logo.png' |
192 | 189 | }
|
0 commit comments