Skip to content

Commit

Permalink
Version 0.1.8 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablo Minue committed Jul 1, 2024
1 parent 4cfbf4a commit d2dfd75
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.pytest_cache
__pycache__
.pyc
.pyc
testings.py
Binary file modified dist/pysqltools-0.1.7-py3-none-any.whl
Binary file not shown.
Binary file modified dist/pysqltools-0.1.7.tar.gz
Binary file not shown.
Binary file added dist/pysqltools-0.1.8-py3-none-any.whl
Binary file not shown.
Binary file added dist/pysqltools-0.1.8.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pysqltools"
version = "0.1.7"
version = "0.1.8"
description = "PySQLTools"
authors = ["Pablo Minué"]
license = "None"
Expand Down
6 changes: 4 additions & 2 deletions pysqltools/src/log/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
class PabLog:
"""Logger"""

def __init__(self, __format: str = "- %(message)s") -> None:
def __init__(
self, log_name: str = "Logger", __format: str = "- %(message)s"
) -> None:
"""Logger Constructor"""
self.avaliable_colors = []
self.rich_handler = RichHandler(rich_tracebacks=True)
Expand All @@ -38,7 +40,7 @@ def __init__(self, __format: str = "- %(message)s") -> None:

logging.basicConfig(format=__format, handlers=__handlers, level=logging.DEBUG)

self.log = logging.getLogger()
self.log = logging.getLogger(log_name)
self.console = Console()

def add_table(self, df: pd.DataFrame, title: str = "", max_rows: int = 10) -> None:
Expand Down
2 changes: 1 addition & 1 deletion pysqltools/src/queries/insert.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def generate_insert_query(
previous_iter = 0
while previous_iter < len(df):
percentage = round(100 * previous_iter / len(df), 2)
lg.log.info("Generating Insert Queries... %s %", percentage)
lg.log.info("Generating Insert Queries... %s", percentage)
batch = df.iloc[previous_iter : previous_iter + batch_size]
data_points = list(pandas_to_sql(batch))
data_points_string = ",".join(data_points)
Expand Down

0 comments on commit d2dfd75

Please sign in to comment.