|
5 | 5 | import os |
6 | 6 | import sys |
7 | 7 | from sphinx_gallery.sorting import FileNameSortKey |
| 8 | +from importlib.metadata import version as get_version |
8 | 9 |
|
9 | 10 | sys.path.insert(0, os.path.abspath("..")) |
10 | 11 |
|
|
16 | 17 | project = "floatCSEP" |
17 | 18 | copyright = "2024, Pablo Iturrieta" |
18 | 19 | author = "Pablo Iturrieta" |
19 | | -release = "v0.2.0" |
| 20 | +release = get_version("floatcsep") # Automatically gets the version from setuptools_scm |
| 21 | + |
20 | 22 |
|
21 | 23 | # -- General configuration --------------------------------------------------- |
22 | 24 |
|
|
25 | 27 | "sphinx.ext.todo", |
26 | 28 | "sphinx.ext.autosummary", |
27 | 29 | "sphinx.ext.coverage", |
28 | | - 'sphinx_toolbox.github', |
29 | | - 'sphinx_toolbox.sidebar_links', |
| 30 | + "sphinx_toolbox.github", |
| 31 | + "sphinx_toolbox.sidebar_links", |
30 | 32 | "sphinx.ext.mathjax", |
31 | 33 | "sphinx.ext.viewcode", |
32 | 34 | "sphinx.ext.napoleon", |
|
35 | 37 | "sphinx_design", |
36 | 38 | ] |
37 | 39 |
|
38 | | -github_username = 'cseptesting' |
39 | | -github_repository = 'floatcsep' |
| 40 | +github_username = "cseptesting" |
| 41 | +github_repository = "floatcsep" |
40 | 42 |
|
41 | | -language = 'en' |
| 43 | +language = "en" |
42 | 44 | autosummary_generate = False |
43 | 45 | autoclass_content = "both" |
44 | 46 | suppress_warnings = [ |
|
82 | 84 |
|
83 | 85 | html_context = { |
84 | 86 | "github_links": [ |
| 87 | + ("Getting help", "https://github.com/cseptesting/floatcsep/issues"), |
85 | 88 | ( |
86 | | - 'Getting help', |
87 | | - "https://github.com/cseptesting/floatcsep/issues" |
88 | | - ), |
89 | | - ( |
90 | | - 'Contributing', |
91 | | - "https://github.com/cseptesting/floatcsep/blob/master/CONTRIBUTING.md" |
92 | | - ), |
93 | | - ( |
94 | | - 'Code of Conduct', |
95 | | - "https://github.com/cseptesting/floatcsep/blob/master/CODE_OF_CONDUCT.md" |
96 | | - ), |
97 | | - ( |
98 | | - 'License', |
99 | | - "https://github.com/cseptesting/floatcsep/blob/master/LICENSE" |
| 89 | + "Contributing", |
| 90 | + "https://github.com/cseptesting/floatcsep/blob/master/CONTRIBUTING.md", |
100 | 91 | ), |
101 | 92 | ( |
102 | | - 'Source Code', |
103 | | - "https://github.com/cseptesting/floatcsep" |
| 93 | + "Code of Conduct", |
| 94 | + "https://github.com/cseptesting/floatcsep/blob/master/CODE_OF_CONDUCT.md", |
104 | 95 | ), |
| 96 | + ("License", "https://github.com/cseptesting/floatcsep/blob/master/LICENSE"), |
| 97 | + ("Source Code", "https://github.com/cseptesting/floatcsep"), |
105 | 98 | ], |
106 | 99 | } |
107 | 100 | extlinks = { |
108 | | - 'github_contrib': ('https://github.com/cseptesting/floatcsep/main/blob/%s', ''), |
| 101 | + "github_contrib": ("https://github.com/cseptesting/floatcsep/main/blob/%s", ""), |
109 | 102 | } |
110 | 103 | rst_epilog = """ |
111 | 104 | .. raw:: html |
|
0 commit comments