You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sdap.apache.org by rk...@apache.org on 2024/02/29 00:23:47 UTC

(incubator-sdap-nexus) branch SDAP-511 updated: banner

This is an automated email from the ASF dual-hosted git repository.

rkk pushed a commit to branch SDAP-511
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git


The following commit(s) were added to refs/heads/SDAP-511 by this push:
     new 2fa21fb  banner
2fa21fb is described below

commit 2fa21fbb0a20d545abae70865e07ac9c04ba154e
Author: rileykk <ri...@jpl.nasa.gov>
AuthorDate: Wed Feb 28 16:23:33 2024 -0800

    banner
---
 analysis/webservice/webapp.py | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/analysis/webservice/webapp.py b/analysis/webservice/webapp.py
index f0da8d9..f3608c8 100644
--- a/analysis/webservice/webapp.py
+++ b/analysis/webservice/webapp.py
@@ -27,6 +27,27 @@ from analysis.webservice.redirect import RemoteCollectionMatcher
 from analysis.webservice.nexus_tornado.app_builders import NexusAppBuilder
 from analysis.webservice.nexus_tornado.app_builders import RedirectAppBuilder
 
+try:
+    from importlib.metadata import version as _version
+    from importlib.metadata import files as _files
+except ImportError:
+    from importlib_metadata import version as _version
+
+try:
+    __version__ = _version('nexusanalysis')
+except Exception:
+    __version__ = 'Cannot be determined'
+
+banner = [
+     '',
+     ' ____  ____    _    ____    | ',
+     '/ ___||  _ \\  / \\  |  _ \\   | Apache SDAP',
+     '\\___ \\| | | |/ _ \\ | |_) |  | Science Data Analytics Platform',
+     f' ___) | |_| / ___ \\|  __/   | Version: {__version__}',
+     '|____/|____/_/   \\_\\_|      | ',
+     ''
+]
+
 
 def inject_args_in_config(args, config):
     """