-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare project for further development (#396)
* Fix linting and auto formatting * Refactor settings to use with subobjects * Fix isort for subfolders * Refactor logger module * Bump python requirements to actual versions * Bump versions angular dependencies --------- Signed-off-by: Johannes Ott <[email protected]>
- Loading branch information
Showing
19 changed files
with
293 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[settings] | ||
known_first_party = learninghouse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import logging | ||
|
||
from learninghouse.models.base import EnumModel | ||
|
||
|
||
class LoggingLevelEnum(EnumModel): | ||
DEBUG = "DEBUG", logging.DEBUG | ||
INFO = "INFO", logging.INFO | ||
WARNING = "WARNING", logging.WARNING | ||
ERROR = "ERROR", logging.ERROR | ||
CRITICAL = "CRITICAL", logging.CRITICAL | ||
|
||
def __init__(self, description: str, level: int): | ||
# pylint: disable=super-init-not-called | ||
self._description: str = description | ||
self._level: int = level | ||
|
||
@property | ||
def description(self) -> str: | ||
return self._description | ||
|
||
@property | ||
def level(self) -> int: | ||
return self._level |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from functools import lru_cache | ||
|
||
from learninghouse.core.settings.models import ServiceSettings | ||
|
||
@lru_cache() | ||
def service_settings() -> ServiceSettings: | ||
return ServiceSettings() |
Oops, something went wrong.