|
20 | 20 |
|
21 | 21 | # -- Project information -----------------------------------------------------
|
22 | 22 |
|
23 |
| -project = 'Common Workflow Language User Guide' |
24 |
| -copyright = '2013, CWL Project Team' |
25 |
| -author = 'CWL Project Team' |
| 23 | +project = "Common Workflow Language User Guide" |
| 24 | +copyright = "2013, CWL Project Team" |
| 25 | +author = "CWL Project Team" |
26 | 26 |
|
27 | 27 | # The full version, including alpha/beta/rc tags
|
28 |
| -release = '0.1' |
| 28 | +release = "0.1" |
29 | 29 |
|
30 | 30 | # Define the version we use for matching in the version switcher.
|
31 | 31 | version_match = os.environ.get("READTHEDOCS_VERSION")
|
|
37 | 37 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
38 | 38 | # ones.
|
39 | 39 | extensions = [
|
40 |
| - 'myst_parser', |
41 |
| - 'sphinx.ext.graphviz', |
42 |
| - 'sphinx_reredirects', |
43 |
| - 'cwl.sphinx.runcmd' |
| 40 | + "myst_parser", |
| 41 | + "sphinx.ext.graphviz", |
| 42 | + "sphinx_reredirects", |
| 43 | + "sphinx_favicon", |
| 44 | + "cwl.sphinx.runcmd", |
44 | 45 | ]
|
45 | 46 |
|
46 | 47 | # myst-parser settings
|
47 | 48 | myst_heading_anchors = 4
|
48 | 49 | myst_enable_extensions = [
|
49 |
| - 'colon_fence', |
50 |
| - 'deflist', |
51 |
| - 'substitution', |
52 |
| - 'replacements', |
| 50 | + "colon_fence", |
| 51 | + "deflist", |
| 52 | + "substitution", |
| 53 | + "replacements", |
53 | 54 | ]
|
54 |
| -CWL_VERSION = 'v1.2' |
| 55 | +CWL_VERSION = "v1.2" |
55 | 56 | myst_substitutions = {
|
56 |
| - 'repo_url': 'https://github.com/common-workflow-language/user_guide/', |
57 |
| - 'source_branch': 'main', |
58 |
| - 'cwl_version': f'`{CWL_VERSION}`', |
59 |
| - 'cwl_version_text': f'{CWL_VERSION}' |
| 57 | + "repo_url": "https://github.com/common-workflow-language/user_guide/", |
| 58 | + "source_branch": "main", |
| 59 | + "cwl_version": f"`{CWL_VERSION}`", |
| 60 | + "cwl_version_text": f"{CWL_VERSION}", |
60 | 61 | }
|
61 | 62 |
|
62 |
| -master_doc = 'index' |
| 63 | +master_doc = "index" |
63 | 64 |
|
64 | 65 | # Set the default role so we can use `foo` instead of ``foo``
|
65 |
| -default_role = 'literal' |
| 66 | +default_role = "literal" |
66 | 67 |
|
67 | 68 | # Add any paths that contain templates here, relative to this directory.
|
68 |
| -templates_path = ['_templates'] |
| 69 | +templates_path = ["_templates"] |
69 | 70 |
|
70 | 71 | # List of patterns, relative to source directory, that match files and
|
71 | 72 | # directories to ignore when looking for source files.
|
72 | 73 | # This pattern also affects html_static_path and html_extra_path.
|
73 | 74 | # CONTRIBUTING.md is referenced in the footer, but not linked via Sphinx
|
74 | 75 | # aio.md is also referenced in one page, but not directly via Sphinx, hence the exclusions here.
|
75 | 76 | exclude_patterns = [
|
76 |
| - '**/Thumbs.db', |
77 |
| - '**/.DS_Store', |
78 |
| - '**/.git', |
79 |
| - '.idea', |
80 |
| - '.github', |
81 |
| - '**/_build', |
82 |
| - '**/_includes', |
83 |
| - 'cwl', |
84 |
| - 'venv', |
85 |
| - 'README.md', |
86 |
| - 'CODE_OF_CONDUCT.md', |
87 |
| - 'CONTRIBUTING.md' |
| 77 | + "**/Thumbs.db", |
| 78 | + "**/.DS_Store", |
| 79 | + "**/.git", |
| 80 | + ".idea", |
| 81 | + ".github", |
| 82 | + "**/_build", |
| 83 | + "**/_includes", |
| 84 | + "cwl", |
| 85 | + "venv", |
| 86 | + "README.md", |
| 87 | + "CODE_OF_CONDUCT.md", |
| 88 | + "CONTRIBUTING.md", |
88 | 89 | ]
|
89 | 90 |
|
90 |
| -source_suffix = ['.rst', '.md'] |
| 91 | +source_suffix = [".rst", ".md"] |
91 | 92 |
|
92 | 93 | # -- Options for URL redirects -----------------------------------------------
|
93 | 94 |
|
94 | 95 | redirects = {
|
95 |
| - '01-introduction/index.md': '../introduction/quick-start.html', |
96 |
| - '02-1st-example/index.md': '../introduction/quick-start.html', |
97 |
| - '03-input/index.md': '../topics/inputs.html', |
98 |
| - '04-output/index.md': '../topics/outputs.html', |
99 |
| - '05-stdout/index.md': '../topics/outputs.html', |
100 |
| - '06-params/index.md': '../topics/parameter-references.html', |
101 |
| - '07-containers/index.md': '../topics/using-containers.html', |
102 |
| - '08-arguments/index.md': '../topics/additional-arguments-and-parameters.html', |
103 |
| - '09-array-inputs/index.md': '../topics/inputs.html', |
104 |
| - '10-array-outputs/index.md': '../topics/outputs.html', |
105 |
| - '11-records/index.md': '../topics/inputs.html', |
106 |
| - '12-env/index.md': '../topics/environment-variables.html', |
107 |
| - '13-expressions/index.md': '../topics/expressions.html', |
108 |
| - '14-runtime/index.md': '../topics/creating-files-at-runtime.html', |
109 |
| - '15-staging/index.md': '../topics/staging-input-files.html', |
110 |
| - '16-file-formats/index.md': '../topics/file-formats.html', |
111 |
| - '17-metadata/index.md': '../topics/metadata-and-authorship.html', |
112 |
| - '19-custom-types/index.md': '../topics/custom-types.html', |
113 |
| - '20-software-requirements/index.md': '../topics/specifying-software-requirements.html', |
114 |
| - '21-1st-workflow/index.md': '../topics/workflows.html', |
115 |
| - '22-nested-workflows/index.md': '../topics/workflows.html#nested-workflows', |
116 |
| - '23-scatter-workflow/index.md': '../topics/workflows.html#scattering-workflows', |
117 |
| - '24_conditional-workflow/index.md': '../topics/workflows.html#conditional-workflows', |
118 |
| - 'rec-practices/index.md': '../topics/best-practices.html', |
119 |
| - 'misc/index.md': '../faq.html', |
120 |
| - 'episodes.md': 'index.html#table-of-contents', |
121 |
| - 'setup.md': 'introduction/prerequisites.html', |
122 |
| - 'extras.md': '/index.html', |
123 |
| - 'yaml/index.md': '../topics/yaml-guide.html', |
124 |
| - 'CODE_OF_CONDUCT.html': 'https://github.com/common-workflow-language/user_guide/blob/main/CODE_OF_CONDUCT.md' |
| 96 | + "01-introduction/index.md": "../introduction/quick-start.html", |
| 97 | + "02-1st-example/index.md": "../introduction/quick-start.html", |
| 98 | + "03-input/index.md": "../topics/inputs.html", |
| 99 | + "04-output/index.md": "../topics/outputs.html", |
| 100 | + "05-stdout/index.md": "../topics/outputs.html", |
| 101 | + "06-params/index.md": "../topics/parameter-references.html", |
| 102 | + "07-containers/index.md": "../topics/using-containers.html", |
| 103 | + "08-arguments/index.md": "../topics/additional-arguments-and-parameters.html", |
| 104 | + "09-array-inputs/index.md": "../topics/inputs.html", |
| 105 | + "10-array-outputs/index.md": "../topics/outputs.html", |
| 106 | + "11-records/index.md": "../topics/inputs.html", |
| 107 | + "12-env/index.md": "../topics/environment-variables.html", |
| 108 | + "13-expressions/index.md": "../topics/expressions.html", |
| 109 | + "14-runtime/index.md": "../topics/creating-files-at-runtime.html", |
| 110 | + "15-staging/index.md": "../topics/staging-input-files.html", |
| 111 | + "16-file-formats/index.md": "../topics/file-formats.html", |
| 112 | + "17-metadata/index.md": "../topics/metadata-and-authorship.html", |
| 113 | + "19-custom-types/index.md": "../topics/custom-types.html", |
| 114 | + "20-software-requirements/index.md": "../topics/specifying-software-requirements.html", |
| 115 | + "21-1st-workflow/index.md": "../topics/workflows.html", |
| 116 | + "22-nested-workflows/index.md": "../topics/workflows.html#nested-workflows", |
| 117 | + "23-scatter-workflow/index.md": "../topics/workflows.html#scattering-workflows", |
| 118 | + "24_conditional-workflow/index.md": "../topics/workflows.html#conditional-workflows", |
| 119 | + "rec-practices/index.md": "../topics/best-practices.html", |
| 120 | + "misc/index.md": "../faq.html", |
| 121 | + "episodes.md": "index.html#table-of-contents", |
| 122 | + "setup.md": "introduction/prerequisites.html", |
| 123 | + "extras.md": "/index.html", |
| 124 | + "yaml/index.md": "../topics/yaml-guide.html", |
| 125 | + "CODE_OF_CONDUCT.html": "https://github.com/common-workflow-language/user_guide/blob/main/CODE_OF_CONDUCT.md", |
125 | 126 | }
|
126 | 127 |
|
127 | 128 | # -- Options for Pygments ----------------------------------------------------
|
128 | 129 |
|
129 |
| -pygments_style = 'default' |
| 130 | +pygments_style = "default" |
130 | 131 |
|
131 | 132 | # TODO: maybe write our own lexer to customize tokens, keywords, etc?
|
132 |
| -lexers['cwl'] = YamlLexer() |
| 133 | +lexers["cwl"] = YamlLexer() |
133 | 134 |
|
134 |
| -highlight_options = { |
135 |
| - 'default': { |
136 |
| - 'stripall': True |
137 |
| - } |
138 |
| -} |
| 135 | +highlight_options = {"default": {"stripall": True}} |
139 | 136 |
|
140 | 137 | # -- GraphViz configuration --------------------------------------------------
|
141 | 138 |
|
142 | 139 | from cwl.doc.graphs import create_processing_units_graph
|
143 | 140 |
|
144 |
| -graphviz_output_format = 'svg' |
| 141 | +graphviz_output_format = "svg" |
145 | 142 |
|
146 |
| -myst_substitutions['CWL_PROCESSING_UNITS_GRAPH'] = create_processing_units_graph() |
| 143 | +myst_substitutions["CWL_PROCESSING_UNITS_GRAPH"] = create_processing_units_graph() |
147 | 144 |
|
148 | 145 | # -- Options for HTML output -------------------------------------------------
|
149 | 146 |
|
150 | 147 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
151 | 148 | # a list of builtin themes.
|
152 | 149 | #
|
153 |
| -html_theme = 'pydata_sphinx_theme' |
| 150 | +html_theme = "pydata_sphinx_theme" |
154 | 151 |
|
155 | 152 | # Add any paths that contain custom static files (such as style sheets) here,
|
156 | 153 | # relative to this directory. They are copied after the builtin static files,
|
157 | 154 | # so a file named "default.css" will overwrite the builtin "default.css".
|
158 |
| -html_static_path = ['_static'] |
| 155 | +html_static_path = ["_static"] |
| 156 | +favicons = [ |
| 157 | + { |
| 158 | + "rel": "icon", |
| 159 | + "sizes": "16x16", |
| 160 | + "href": "images/favicons/cwl/favicon-16x16.png", |
| 161 | + }, |
| 162 | + { |
| 163 | + "rel": "icon", |
| 164 | + "sizes": "32x32", |
| 165 | + "href": "images/favicons/cwl/favicon-32x32.png", |
| 166 | + }, |
| 167 | + { |
| 168 | + "rel": "icon", |
| 169 | + "sizes": "96x96", |
| 170 | + "href": "images/favicons/cwl/favicon-96x96.png", |
| 171 | + }, |
| 172 | + { |
| 173 | + "rel": "icon", |
| 174 | + "sizes": "128x128", |
| 175 | + "href": "images/favicons/cwl/favicon-128.png", |
| 176 | + }, |
| 177 | + { |
| 178 | + "rel": "icon", |
| 179 | + "sizes": "196x196", |
| 180 | + "href": "images/favicons/cwl/favicon-196x196.png", |
| 181 | + }, |
| 182 | +] |
| 183 | + |
159 | 184 |
|
160 | 185 | html_css_files = [
|
161 |
| - 'css/custom.css', |
| 186 | + "css/custom.css", |
162 | 187 | ]
|
163 | 188 |
|
164 |
| -html_logo = '_static/images/logos/cwl/CWL-Logo-HD-cropped2.png' |
165 |
| -html_favicon = '_static/images/favicons/cwl/favicon.ico' |
| 189 | +html_logo = "_static/images/logos/cwl/CWL-Logo-HD-cropped2.png" |
| 190 | +html_favicon = "_static/images/favicons/cwl/favicon.ico" |
166 | 191 |
|
167 |
| -html_extra_path = [ |
168 |
| - 'browserconfig.xml', |
169 |
| - 'favicon.ico', |
170 |
| - 'manifest.json' |
171 |
| -] |
| 192 | +html_extra_path = ["browserconfig.xml", "favicon.ico", "manifest.json"] |
172 | 193 |
|
173 | 194 | html_theme_options = {
|
174 | 195 | "external_links": [
|
175 |
| - {"name": "Community", "url": "https://www.commonwl.org/community/"}, |
| 196 | + {"name": "Community", "url": "https://www.commonwl.org/community/"}, |
176 | 197 | ],
|
177 | 198 | "header_links_before_dropdown": 6,
|
178 | 199 | "icon_links": [
|
|
191 | 212 | "navbar_end": [
|
192 | 213 | # "version-switcher",
|
193 | 214 | "theme-switcher",
|
194 |
| - "navbar-icon-links" |
| 215 | + "navbar-icon-links", |
195 | 216 | ],
|
196 | 217 | "show_nav_level": 2,
|
197 | 218 | "navigation_depth": 2,
|
198 | 219 | "collapse_navigation": True,
|
199 | 220 | "show_prev_next": True,
|
200 |
| - "favicons": [ |
201 |
| - { |
202 |
| - "rel": "icon", |
203 |
| - "sizes": "16x16", |
204 |
| - "href": "images/favicons/cwl/favicon-16x16.png" |
205 |
| - }, |
206 |
| - { |
207 |
| - "rel": "icon", |
208 |
| - "sizes": "32x32", |
209 |
| - "href": "images/favicons/cwl/favicon-32x32.png" |
210 |
| - }, |
211 |
| - { |
212 |
| - "rel": "icon", |
213 |
| - "sizes": "96x96", |
214 |
| - "href": "images/favicons/cwl/favicon-96x96.png" |
215 |
| - }, |
216 |
| - { |
217 |
| - "rel": "icon", |
218 |
| - "sizes": "128x128", |
219 |
| - "href": "images/favicons/cwl/favicon-128.png" |
220 |
| - }, |
221 |
| - { |
222 |
| - "rel": "icon", |
223 |
| - "sizes": "196x196", |
224 |
| - "href": "images/favicons/cwl/favicon-196x196.png" |
225 |
| - } |
226 |
| - ], |
227 | 221 | "footer_items": ["copyright"],
|
228 | 222 | }
|
229 | 223 |
|
|
232 | 226 | "github_repo": "user_guide",
|
233 | 227 | "github_version": "main",
|
234 | 228 | "doc_path": "src",
|
235 |
| - "default_mode": "light" |
| 229 | + "default_mode": "light", |
236 | 230 | }
|
237 | 231 |
|
238 | 232 | gettext_uuid = True
|
239 | 233 | gettext_compact = "user_guide"
|
240 |
| -locale_dirs = ['../locales/'] |
| 234 | +locale_dirs = ["../locales/"] |
241 | 235 |
|
242 | 236 |
|
243 | 237 | # Patched MyST parser
|
|
260 | 254 |
|
261 | 255 | SPHINX_LOGGER = logging.getLogger(__name__)
|
262 | 256 |
|
| 257 | + |
263 | 258 | class MystParser(SphinxParser):
|
264 | 259 | """Sphinx parser for Markedly Structured Text (MyST)."""
|
265 | 260 |
|
@@ -309,7 +304,9 @@ def parse(self, inputstring: str, document: nodes.document) -> None:
|
309 | 304 | # gives you the translation without resolving the links. Here we just re-use the
|
310 | 305 | # ``md_env`` dictionary that contains the ``.references`` populated in the first
|
311 | 306 | # pass, fixing i18n with MyST Parser.
|
312 |
| - env = {} if not hasattr(document.settings, 'md_env') else document.settings.md_env |
| 307 | + env = ( |
| 308 | + {} if not hasattr(document.settings, "md_env") else document.settings.md_env |
| 309 | + ) |
313 | 310 | parser.options["document"] = document
|
314 | 311 | parser.render(inputstring, env)
|
315 | 312 | document.settings.md_env = parser.renderer.md_env
|
|
0 commit comments