mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-05-14 20:18:48 +02:00
Fixed tqdm typos. (#382)
This commit is contained in:
parent
dd511af3a5
commit
7c1fac28fd
@ -612,7 +612,7 @@ def add_annual_financial_reports(companies: list[dict], db: Session) -> None:
|
||||
total: int = sum(len(company.get("yearly_results", "")) for company in companies)
|
||||
with tqdm(
|
||||
total=total,
|
||||
desc="Company connections added",
|
||||
desc="Add financial reports:",
|
||||
) as pbar:
|
||||
for company in companies:
|
||||
yearly_results: dict[str, dict] = company.get("yearly_results", {})
|
||||
|
@ -12,7 +12,7 @@ def initialize_network(edges: list, nodes: dict) -> tuple[nx.Graph, pd.DataFrame
|
||||
|
||||
Returns:
|
||||
Graph: Plotly Figure
|
||||
Metrices: DataFrame with Metrics
|
||||
Metrics: DataFrame with Metrics
|
||||
"""
|
||||
# create edge dataframe
|
||||
df_edges = pd.DataFrame(edges, columns=["from", "to", "type"])
|
||||
|
@ -182,12 +182,12 @@ def _transfer_news_to_sql(config_provider: ConfigProvider, db: Session) -> None:
|
||||
articles = get_all_news(config_provider)
|
||||
article_added = 0
|
||||
sentiments_added = 0
|
||||
for article in tqdm(articles):
|
||||
for article in tqdm(articles, desc="Transfer news:"):
|
||||
if sentiments := add_article_to_sql(article, db):
|
||||
article_added += 1
|
||||
sentiments_added += sentiments
|
||||
logger.info(
|
||||
f"{article_added} with {sentiments_added} articles where added to the SQL db."
|
||||
f"{article_added} articles with {sentiments_added} sentiments where added to the SQL db."
|
||||
)
|
||||
|
||||
|
||||
@ -196,7 +196,6 @@ def transfer_news_to_sql(config_provider: ConfigProvider) -> None:
|
||||
|
||||
Args:
|
||||
config_provider: The configuration prover to connect to the mongodb.
|
||||
db: A session to connect to an SQL db via SQLAlchemy.
|
||||
"""
|
||||
_transfer_news_to_sql(config_provider, get_session(config_provider))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user