Skip to content

Commit

Permalink
Fix and update dependencies, Typing for Logger
Browse files Browse the repository at this point in the history
  • Loading branch information
henryruhs committed Aug 17, 2023
1 parent d0c9c58 commit 360264e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion chroma_feedback/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def cli() -> None:
program.add_argument('-b', '--background-run', action = 'store_true')
program.add_argument('-i', '--background-interval', default = 60, type = int)
program.add_argument('-d', '--dry-run', action = 'store_true')
program.add_argument('-l', '--log-level', default = 'info', choices = logger.get_log_level())
program.add_argument('-l', '--log-level', default = 'info', choices = logger.get_log_levels())
program.add_argument('-v', '--version', action = 'version', version = metadata.get('name') + ' ' + metadata.get('version'))
init(program)

Expand Down
6 changes: 3 additions & 3 deletions chroma_feedback/logger.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from logging import basicConfig, getLogger, Logger, DEBUG, INFO, WARNING, ERROR
from typing import Any
from typing import Dict

from chroma_feedback.typing import LogLevel


def init(log_level : LogLevel) -> None:
basicConfig(format = '')
get_package_logger().setLevel(get_log_level()[log_level])
get_package_logger().setLevel(get_log_levels()[log_level])


def get_package_logger() -> Logger:
Expand All @@ -29,7 +29,7 @@ def error(message : str = '') -> None:
get_package_logger().error(message)


def get_log_level() -> Any:
def get_log_levels() -> Dict[LogLevel, int]:
return\
{
'error': ERROR,
Expand Down
2 changes: 1 addition & 1 deletion chroma_feedback/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
'name': 'chroma-feedback',
'description': 'Turn your RGB powered hardware into a status indicator for continuous integration, continuous deployment and infrastructure monitoring',
'version': '13.1.0',
'version': '13.2.0',
'license': 'MIT',
'keywords': ' '.join(producer.ALL),
'author': 'Henry Ruhs',
Expand Down
29 changes: 15 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,28 +76,29 @@
},
install_requires =
[
'busylight-for-humans==0.26.0',
'bitstring==3.1.9',
'busylight-for-humans==0.26.1',
'lifxlan==1.2.7',
'liquidctl==1.12.1',
'liquidctl==1.13.0',
'nanoleafapi==2.1.2',
'phue==1.1',
'python-magichue==0.3.2',
'pyqt6==6.4.2 ',
'pyqt6==6.5.2 ',
'pywizlight==0.5.14',
'requests==2.28.2',
'streamdeck==0.9.3',
'yeelight==0.7.10'
'requests==2.31.0',
'streamdeck==0.9.4',
'yeelight==0.7.13'
],
tests_require =
[
'flake8==6.0.0',
'mock==5.0.1',
'mypy==1.0.1',
'pytest==7.1.2',
'pytest-cov==4.0.0',
'flake8==6.1.0',
'mock==5.1.0',
'mypy==1.5.1',
'pytest==7.4.0',
'pytest-cov==4.1.0',
'pytest-dotenv==0.5.2',
'pytest-mock==3.10.0',
'types-mock==5.0.0.5',
'types-requests==2.28.11.14'
'pytest-mock==3.11.1',
'types-mock==5.1.0.1',
'types-requests==2.31.0.2'
]
)

0 comments on commit 360264e

Please sign in to comment.