-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 16-adding-tests
- Loading branch information
Showing
24 changed files
with
527 additions
and
189 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,3 +160,7 @@ cython_debug/ | |
#.idea/ | ||
.datamander | ||
.DS_Store | ||
|
||
|
||
# Visual studio code | ||
.vscode |
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 |
---|---|---|
|
@@ -18,6 +18,7 @@ dependencies = [ | |
"rich", | ||
"scikit-learn", | ||
"srsly", | ||
"fastapi", | ||
] | ||
|
||
[project.optional-dependencies] | ||
|
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 |
---|---|---|
@@ -1,5 +1,33 @@ | ||
"""Povide the InfoMander class for managing information in a data science project.""" | ||
"""Provide the InfoMander class for managing information in a data science project.""" | ||
|
||
import logging | ||
|
||
import rich.logging | ||
|
||
from .infomander import InfoMander | ||
|
||
__all__ = ["InfoMander"] | ||
|
||
|
||
class Handler(rich.logging.RichHandler): | ||
"""A logging handler that renders output with Rich.""" | ||
|
||
def get_level_text(self, record: rich.logging.LogRecord) -> rich.logging.Text: | ||
"""Get the logger name and levelname from the record.""" | ||
levelname = record.levelname | ||
name = record.name | ||
txt = f"<Logger {name} ({levelname})>" | ||
|
||
return rich.logging.Text.styled( | ||
txt.ljust(8), | ||
f"logging.level.{levelname.lower()}", | ||
) | ||
|
||
|
||
formatter = logging.Formatter("%(message)s") | ||
handler = Handler(markup=True) | ||
handler.setFormatter(formatter) | ||
|
||
logger = logging.getLogger(__name__) | ||
logger.addHandler(handler) | ||
logger.setLevel(logging.INFO) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.