Skip to content

Commit 895eb7f

Browse files
committed
Add version to startup console.
1 parent 032ebb6 commit 895eb7f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

devstart.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import os
2222
import argparse
2323
import logging
24+
from lute import __version__
2425
from lute.app_factory import create_app
2526
from lute.config.app_config import AppConfig
2627

@@ -47,7 +48,8 @@ def dev_print(s):
4748
app = create_app(config_file, output_func=dev_print)
4849

4950
ac = AppConfig(config_file)
50-
dev_print(f"\ndb name: {ac.dbname}")
51+
dev_print(f"\nversion {__version__}")
52+
dev_print(f"db name: {ac.dbname}")
5153
dev_print(f"data: {ac.datapath}")
5254
dev_print(f"Running at: http://localhost:{port}\n")
5355

lute/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import logging
1515
import textwrap
1616
from waitress import serve
17+
from lute import __version__
1718
from lute.app_factory import create_app
1819
from lute.config.app_config import AppConfig
1920

@@ -73,7 +74,7 @@ def _get_config_file_path(config_file_path=None):
7374

7475
def _start(args):
7576
"Configure and start the app."
76-
_print("\nStarting Lute.\n")
77+
_print(f"\nStarting Lute version {__version__}.\n")
7778

7879
config_file_path = _get_config_file_path(args.config)
7980
app = create_app(config_file_path, output_func=_print)
@@ -90,7 +91,7 @@ def _start(args):
9091
"""
9192
_print(textwrap.dedent(close_msg))
9293

93-
msg = f"""Lute is running. Open a web browser, and go to:
94+
msg = f"""Lute v{__version__} is running. Open a web browser, and go to:
9495
9596
http://localhost:{args.port}
9697
"""

0 commit comments

Comments
 (0)