Skip to content

Commit ee8f3ad

Browse files
feature: excessive logs remove
1 parent 378ba5d commit ee8f3ad

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

.idea/api-to-dataframe.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/poetry.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "api-to-dataframe"
3-
version = "1.3.10"
3+
version = "1.3.11"
44
description = "A package to convert API responses to pandas dataframe"
55
authors = ["IvanildoBarauna <ivanildo.jnr@outlook.com>"]
66
readme = "README.md"

src/api_to_dataframe/config/config.py

Whitespace-only changes.

src/api_to_dataframe/controller/client_builder.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
class ClientBuilder:
7-
def __init__( # pylint: disable=too-many-arguments
7+
def __init__( # pylint: disable=too-many-positional-arguments,too-many-arguments
88
self,
99
endpoint: str,
1010
headers: dict = None,
@@ -89,5 +89,4 @@ def api_to_dataframe(response: dict):
8989
DataFrame: A pandas DataFrame containing the data from the API response.
9090
"""
9191
df = GetData.to_dataframe(response)
92-
log("serialized to dataframe: OK", LogLevel.INFO)
9392
return df

src/api_to_dataframe/models/get_data.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ class GetData:
99
def get_response(endpoint: str, headers: dict, connection_timeout: int):
1010
response = requests.get(endpoint, timeout=connection_timeout, headers=headers)
1111
response.raise_for_status()
12-
log("get_response: ok", LogLevel.INFO)
1312
return response
1413

1514
@staticmethod

src/api_to_dataframe/models/retainer.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ def wrapper(*args, **kwargs): # pylint: disable=inconsistent-return-statements
1717
retry_number = 0
1818
while retry_number < args[0].retries:
1919
try:
20-
log(
21-
f"Trying for the {retry_number} of {Constants.MAX_OF_RETRIES} retries. "
22-
f"Using {args[0].retry_strategy}",
23-
LogLevel.INFO,
24-
)
20+
if retry_number > 0:
21+
log(
22+
f"Trying for the {retry_number} of {Constants.MAX_OF_RETRIES} retries. "
23+
f"Using {args[0].retry_strategy}",
24+
LogLevel.INFO,
25+
)
2526
return func(*args, **kwargs)
2627
except RequestException as e:
2728
retry_number += 1

0 commit comments

Comments
 (0)