|
1 | 1 | # If extensions (or modules to document with autodoc) are in another directory, |
2 | 2 | # add these directories to sys.path here. If the directory is relative to the |
3 | 3 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
4 | | -from importlib.util import find_spec |
5 | 4 | from sys import path as sys_path |
6 | 5 | from os.path import abspath |
7 | 6 | from pathlib import Path |
8 | 7 | from json import loads |
9 | 8 |
|
10 | 9 | from pyTooling.Packaging import extractVersionInformation |
11 | 10 |
|
| 11 | +# ============================================================================== |
| 12 | +# Project configuration |
| 13 | +# ============================================================================== |
| 14 | +githubNamespace = "VHDL" |
| 15 | +project = "pyVHDLModel" |
| 16 | +directoryName = project.replace('.', '/') |
| 17 | + |
| 18 | + |
| 19 | +# ============================================================================== |
| 20 | +# Project paths |
| 21 | +# ============================================================================== |
12 | 22 | ROOT = Path(__file__).resolve().parent |
13 | 23 |
|
14 | 24 | sys_path.insert(0, abspath(".")) |
15 | 25 | sys_path.insert(0, abspath("..")) |
16 | | -sys_path.insert(0, abspath("../pyVHDLModel")) |
17 | | -# sys_path.insert(0, abspath("_extensions")) |
| 26 | +sys_path.insert(0, abspath(f"../{directoryName}")) |
18 | 27 |
|
19 | 28 |
|
20 | 29 | # ============================================================================== |
|
23 | 32 | # The version info for the project you're documenting, acts as replacement for |
24 | 33 | # |version| and |release|, also used in various other places throughout the |
25 | 34 | # built documents. |
26 | | -project = "pyVHDLModel" |
27 | | - |
28 | 35 | packageInformationFile = Path(f"../{project.replace('.', '/')}/__init__.py") |
29 | 36 | versionInformation = extractVersionInformation(packageInformationFile) |
30 | 37 |
|
|
100 | 107 | html_favicon = str(Path(html_static_path[0]) / "favicon.svg") |
101 | 108 |
|
102 | 109 | # Output file base name for HTML help builder. |
103 | | -htmlhelp_basename = "pyVHDLModelDoc" |
| 110 | +htmlhelp_basename = f"{project}Doc" |
104 | 111 |
|
105 | 112 | # If not None, a 'Last updated on:' timestamp is inserted at every page |
106 | 113 | # bottom, using the given strftime format. |
|
153 | 160 | # author, documentclass [howto, manual, or own class]). |
154 | 161 | latex_documents = [ |
155 | 162 | ( master_doc, |
156 | | - "pyVHDLModel.tex", |
157 | | - "The pyVHDLModel Documentation", |
158 | | - "Patrick Lehmann", |
159 | | - "manual" |
| 163 | + f"{project}.tex", |
| 164 | + f"The {project} Documentation", |
| 165 | + f"Patrick Lehmann", |
| 166 | + f"manual" |
160 | 167 | ), |
161 | 168 | ] |
162 | 169 |
|
|
192 | 199 | # ============================================================================== |
193 | 200 | intersphinx_mapping = { |
194 | 201 | "python": ("https://docs.python.org/3", None), |
195 | | - "vasg": ("https://IEEE-P1076.gitlab.io/", None), |
196 | 202 | "pyTool": ("https://pyTooling.github.io/pyTooling/", None), |
| 203 | + "vasg": ("https://IEEE-P1076.gitlab.io/", None), |
197 | 204 | "ghdl": ("https://GHDL.github.io/ghdl/", None), |
198 | 205 | } |
199 | 206 |
|
|
218 | 225 | # Sphinx.Ext.ExtLinks |
219 | 226 | # ============================================================================== |
220 | 227 | extlinks = { |
221 | | - "gh": ("https://GitHub.com/%s", "gh:%s"), |
222 | | - "ghissue": ("https://GitHub.com/VHDL/pyVHDLModel/issues/%s", "issue #%s"), |
223 | | - "ghpull": ("https://GitHub.com/VHDL/pyVHDLModel/pull/%s", "pull request #%s"), |
224 | | - "ghsrc": ("https://GitHub.com/VHDL/pyVHDLModel/blob/main/%s", None), |
225 | | - "wiki": ("https://en.wikipedia.org/wiki/%s", None), |
| 228 | + "gh": (f"https://GitHub.com/%s", "%s"), |
| 229 | + "ghissue": (f"https://GitHub.com/{githubNamespace}/{project}/issues/%s", "issue #%s"), |
| 230 | + "ghpull": (f"https://GitHub.com/{githubNamespace}/{project}/pull/%s", "pull request #%s"), |
| 231 | + "ghsrc": (f"https://GitHub.com/{githubNamespace}/{project}/blob/main/%s", None), |
| 232 | + "pypi": ("https://PyPI.org/project/%s", "%s"), |
| 233 | + "wiki": (f"https://en.wikipedia.org/wiki/%s", None), |
226 | 234 | } |
227 | 235 |
|
228 | 236 |
|
|
275 | 283 | report_unittest_testsuites = { |
276 | 284 | "src": { |
277 | 285 | "name": f"{project}", |
278 | | - "xml_report": "../report/unit/TestReportSummary.xml", |
| 286 | + "xml_report": "../report/unit/unittest.xml", |
279 | 287 | } |
280 | 288 | } |
281 | 289 | report_codecov_packages = { |
|
289 | 297 | report_doccov_packages = { |
290 | 298 | "src": { |
291 | 299 | "name": f"{project}", |
292 | | - "directory": f"../{project.replace('.', '/')}", |
| 300 | + "directory": f"../{directoryName}", |
293 | 301 | "fail_below": 80, |
294 | 302 | "levels": "default" |
295 | 303 | } |
|
0 commit comments