Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreWohnsland committed Nov 21, 2021
2 parents d3edb99 + 48c7f7f commit 1e667a6
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion config/config_manager.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import yaml

CONFIG_FILE = os.path.join(os.path.dirname(__file__), "..", "custom_config.yaml")
CONFIG_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "custom_config.yaml")


class ConfigManager:
Expand Down
2 changes: 1 addition & 1 deletion dashboard/backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pydantic import BaseModel

DATABASE_NAME = "team"
DIRPATH = os.path.dirname(__file__)
DIRPATH = os.path.dirname(os.path.abspath(__file__))
database_path = os.path.join(DIRPATH, "storage", f"{DATABASE_NAME}.db")

app = FastAPI()
Expand Down
2 changes: 1 addition & 1 deletion dashboard/frontend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
mpl.rcParams.update({'text.color': "white", 'axes.labelcolor': "white"})

DATABASE_NAME = "team"
DIRPATH = os.path.dirname(__file__)
DIRPATH = os.path.dirname(os.path.abspath(__file__))
load_dotenv(os.path.join(DIRPATH, ".language.env"))
database_path = os.path.join(DIRPATH, "storage", f"{DATABASE_NAME}.db")

Expand Down
2 changes: 1 addition & 1 deletion dashboard/qt-app/.language.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
LANGUAGE=en
UI_LANGUAGE=en
4 changes: 2 additions & 2 deletions dashboard/qt-app/waffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

from pywaffle import Waffle

DIRPATH = os.path.dirname(__file__)
DIRPATH = os.path.dirname(os.path.abspath(__file__))
load_dotenv(os.path.join(DIRPATH, ".language.env"))
matplotlib.rcParams.update({'text.color': "white", 'axes.labelcolor': "white"})


def __choose_language(element: dict) -> str:
language = os.getenv("LANGUAGE")
language = os.getenv("UI_LANGUAGE")
return element.get(language, element["en"])


Expand Down
2 changes: 1 addition & 1 deletion microservice/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sqlite3

DATABASE_NAME = "failed_data"
DIRPATH = os.path.dirname(__file__)
DIRPATH = os.path.dirname(os.path.abspath(__file__))


class DatabaseHandler:
Expand Down
8 changes: 8 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# The Cocktailmaker

![GitHub release (latest by date)](https://img.shields.io/github/v/release/AndreWohnsland/Cocktailmaker_AW)
![GitHub Release Date](https://img.shields.io/github/release-date/AndreWohnsland/Cocktailmaker_AW)
![Python Version](https://img.shields.io/badge/python-%3E%3D%203.6-blue)
![GitHub](https://img.shields.io/github/license/AndreWohnsland/Cocktailmaker_AW)
![GitHub issues](https://img.shields.io/github/issues-raw/AndreWohnsland/Cocktailmaker_AW)
![GitHub Repo stars](https://img.shields.io/github/stars/AndreWohnsland/Cocktailmaker_AW?style=social)


#### A Python and Qt Based App for a Cocktail machine

<br />
Expand Down
2 changes: 1 addition & 1 deletion src/database_commander.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import Any, Dict, List

DATABASE_NAME = "Cocktail_database"
DIRPATH = os.path.dirname(__file__)
DIRPATH = os.path.dirname(os.path.abspath(__file__))


class DatabaseCommander:
Expand Down
2 changes: 1 addition & 1 deletion src/logger_handler.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import logging

dirpath = os.path.dirname(__file__)
dirpath = os.path.dirname(os.path.abspath(__file__))


class LoggerHandler:
Expand Down
2 changes: 1 addition & 1 deletion src/save_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from src.display_controller import DP_CONTROLLER
from src.service_handler import SERVICE_HANDLER

DIRPATH = os.path.dirname(__file__)
DIRPATH = os.path.dirname(os.path.abspath(__file__))


class SaveHandler:
Expand Down
3 changes: 2 additions & 1 deletion src_ui/setup_mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def __init__(self, parent=None):
self.logger_handler.log_start_program()
self.connect_objects()
self.connect_other_windows()
self.icon_path = os.path.join(os.path.dirname(__file__), "..", "ui_elements", "Cocktail-icon.png")
self.icon_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
"..", "ui_elements", "Cocktail-icon.png")
# as long as its not UI_DEVENVIRONMENT (usually touchscreen) hide the cursor
if not self.UI_DEVENVIRONMENT:
self.setCursor(Qt.BlankCursor)
Expand Down

0 comments on commit 1e667a6

Please sign in to comment.