Skip to content

Commit

Permalink
Add version to startup console.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzohrab committed Oct 20, 2024
1 parent 032ebb6 commit 895eb7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion devstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import os
import argparse
import logging
from lute import __version__
from lute.app_factory import create_app
from lute.config.app_config import AppConfig

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

ac = AppConfig(config_file)
dev_print(f"\ndb name: {ac.dbname}")
dev_print(f"\nversion {__version__}")
dev_print(f"db name: {ac.dbname}")
dev_print(f"data: {ac.datapath}")
dev_print(f"Running at: http://localhost:{port}\n")

Expand Down
5 changes: 3 additions & 2 deletions lute/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import logging
import textwrap
from waitress import serve
from lute import __version__
from lute.app_factory import create_app
from lute.config.app_config import AppConfig

Expand Down Expand Up @@ -73,7 +74,7 @@ def _get_config_file_path(config_file_path=None):

def _start(args):
"Configure and start the app."
_print("\nStarting Lute.\n")
_print(f"\nStarting Lute version {__version__}.\n")

config_file_path = _get_config_file_path(args.config)
app = create_app(config_file_path, output_func=_print)
Expand All @@ -90,7 +91,7 @@ def _start(args):
"""
_print(textwrap.dedent(close_msg))

msg = f"""Lute is running. Open a web browser, and go to:
msg = f"""Lute v{__version__} is running. Open a web browser, and go to:
http://localhost:{args.port}
"""
Expand Down

0 comments on commit 895eb7f

Please sign in to comment.