From 83286150b742de0b34236dc9caa6453d4b71cdca Mon Sep 17 00:00:00 2001 From: avollkopf <43980694+avollkopf@users.noreply.github.com> Date: Thu, 24 Mar 2022 07:33:48 +0100 Subject: [PATCH] Add Codename --- cbpi/__init__.py | 3 ++- cbpi/craftbeerpi.py | 5 +++-- cbpi/http_endpoints/http_system.py | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cbpi/__init__.py b/cbpi/__init__.py index 7002578..52eae63 100644 --- a/cbpi/__init__.py +++ b/cbpi/__init__.py @@ -1 +1,2 @@ -__version__ = "4.0.3.a2" +__version__ = "4.0.4.a1" +__codename__ = "Spring Break" diff --git a/cbpi/craftbeerpi.py b/cbpi/craftbeerpi.py index aa79701..b9ba484 100644 --- a/cbpi/craftbeerpi.py +++ b/cbpi/craftbeerpi.py @@ -12,7 +12,7 @@ from cbpi.controller.notification_controller import NotificationController import logging from os import urandom import os -from cbpi import __version__ +from cbpi import __version__, __codename__ from aiohttp import web from aiohttp_auth import auth from aiohttp_session import session_middleware @@ -95,7 +95,8 @@ class CraftBeerPi: self.path = os.sep.join(os.path.abspath(__file__).split(os.sep)[:-1]) # The path to the package dir self.version = __version__ - + self.codename = __codename__ + self.static_config = load_config(os.path.join(".", 'config', "config.yaml")) logger.info("Init CraftBeerPI") diff --git a/cbpi/http_endpoints/http_system.py b/cbpi/http_endpoints/http_system.py index 9830cc0..c21c4cf 100644 --- a/cbpi/http_endpoints/http_system.py +++ b/cbpi/http_endpoints/http_system.py @@ -5,7 +5,7 @@ from cbpi.job.aiohttp import get_scheduler_from_app import logging from cbpi.api import request_mapping from cbpi.utils import json_dumps -from cbpi import __version__ +from cbpi import __version__, __codename__ import pathlib import os from cbpi.controller.system_controller import SystemController @@ -36,7 +36,8 @@ class SystemHttpEndpoints: step=self.cbpi.step.get_state(), fermentersteps=self.cbpi.fermenter.get_fermenter_steps(), config=self.cbpi.config.get_state(), - version=__version__) + version=__version__, + codename=__codename__) , dumps=json_dumps) @request_mapping(path="/logs", auth_required=False)