mirror of
https://github.com/pablorevilla-meshtastic/meshview.git
synced 2026-08-06 17:02:48 +02:00
Update to check for new requirements
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import logging
|
||||
from importlib.util import find_spec
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def check_optional_deps() -> None:
|
||||
if find_spec("pyitm") is None:
|
||||
logger.warning(
|
||||
"Optional dependency missing: pyitm. "
|
||||
"Coverage prediction is disabled. "
|
||||
"Run: ./env/bin/pip install -r requirements.txt"
|
||||
)
|
||||
@@ -21,6 +21,7 @@ from meshview import config, database, decode_payload, migrations, models, store
|
||||
from meshview.__version__ import (
|
||||
__version_string__,
|
||||
)
|
||||
from meshview.deps import check_optional_deps
|
||||
from meshview.web_api import api
|
||||
|
||||
logging.basicConfig(
|
||||
@@ -38,6 +39,7 @@ env = Environment(loader=PackageLoader("meshview"), autoescape=select_autoescape
|
||||
|
||||
# Start Database
|
||||
database.init_database(CONFIG["database"]["connection_string"])
|
||||
check_optional_deps()
|
||||
|
||||
BASE_DIR = os.path.dirname(__file__)
|
||||
LANG_DIR = os.path.join(BASE_DIR, "lang")
|
||||
|
||||
Reference in New Issue
Block a user