Skip to content

Commit 2a1d0cb

Browse files
committed
Add version retrieval and error handling to DataUI about text
1 parent 6fbc18b commit 2a1d0cb

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

pydelmod/dataui.py

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -389,18 +389,27 @@ def create_save_button(self):
389389
embed=False,
390390
)
391391

392+
def get_version(self):
393+
try:
394+
return self.dataui_manager.get_version()
395+
except Exception as e:
396+
return "Unknown version"
397+
392398
def get_about_text(self):
393-
version = "0.1.0"
399+
try:
400+
return self.dataui_manager.get_about_text()
401+
except Exception as e:
402+
version = self.get_version()
394403

395-
# insert app version with date time of last commit and commit id
396-
version_string = f"Data UI: {version}"
397-
about_text = f"""
398-
## App version:
399-
### {version}
404+
# insert app version with date time of last commit and commit id
405+
version_string = f"Data UI: {version}"
406+
about_text = f"""
407+
## App version:
408+
### {version}
400409
401-
## An App to view data using Holoviews and Panel
402-
"""
403-
return about_text
410+
## An App to view data using Holoviews and Panel
411+
"""
412+
return about_text
404413

405414
def create_about_button(self, template):
406415
about_btn = pn.widgets.Button(

0 commit comments

Comments
 (0)