|
32 | 32 | from rich.table import Table |
33 | 33 | from rich.text import Text |
34 | 34 |
|
| 35 | +from CodeEntropy import __version__ |
35 | 36 | from CodeEntropy.config.argparse import ConfigResolver |
36 | 37 | from CodeEntropy.core.dask_clusters import HPCDaskManager |
37 | 38 | from CodeEntropy.core.logging import LoggingConfig |
@@ -135,20 +136,21 @@ def load_citation_data(self) -> dict[str, Any] | None: |
135 | 136 | return None |
136 | 137 |
|
137 | 138 | def show_splash(self) -> None: |
138 | | - """Render a Rich splash screen with optional citation metadata.""" |
| 139 | + """Render a Rich splash screen. |
| 140 | +
|
| 141 | + The version shown is that of the locally installed package. Remaining |
| 142 | + metadata (authors, description, URL) comes from the online citation file |
| 143 | + when it is reachable. |
| 144 | + """ |
139 | 145 | citation = self.load_citation_data() |
| 146 | + version_text = Align.center(Text(f"Version {__version__}", style="green")) |
140 | 147 |
|
141 | 148 | if citation: |
142 | 149 | ascii_title = text2art(citation.get("title", "CodeEntropy")) |
143 | 150 | ascii_render = Align.center(Text(ascii_title, style="bold white")) |
144 | 151 |
|
145 | | - version = citation.get("version", "?") |
146 | | - release_date = citation.get("date-released", "?") |
147 | 152 | url = citation.get("url", citation.get("repository-code", "")) |
148 | 153 |
|
149 | | - version_text = Align.center( |
150 | | - Text(f"Version {version} | Released {release_date}", style="green") |
151 | | - ) |
152 | 154 | url_text = Align.center(Text(url, style="blue underline")) |
153 | 155 |
|
154 | 156 | abstract = citation.get("abstract", "No description available.") |
@@ -193,7 +195,7 @@ def show_splash(self) -> None: |
193 | 195 | else: |
194 | 196 | ascii_title = text2art("CodeEntropy") |
195 | 197 | ascii_render = Align.center(Text(ascii_title, style="bold white")) |
196 | | - splash_content = Group(ascii_render) |
| 198 | + splash_content = Group(ascii_render, Rule(style="cyan"), version_text) |
197 | 199 |
|
198 | 200 | splash_panel = Panel( |
199 | 201 | splash_content, |
|
0 commit comments