SIENTIAPDE-1081

Enhance documentation across multiple modules with detailed parameter descriptions and usage examples
This commit is contained in:
vitor-aignosi
2025-05-26 16:45:50 -03:00
parent bc3f26c280
commit 49fa60c66f
15 changed files with 358 additions and 123 deletions

View File

@@ -6,7 +6,6 @@ with workflow.unsafe.imports_passed_through():
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.pool import QueuePool
from psycopg2.pool import ThreadedConnectionPool
from pandas import read_sql_query, DataFrame
from logging import Logger
from sientia_do.notifications.handlers import NotificationHandler
@@ -49,10 +48,10 @@ class Postgres(BaseActivity):
Loads data from a custom query.
Args:
query (str): The query to load data from.
- query (str): The query to load data from.
Returns:
dict[str, dict]: The data from the query.
dict[str, Any]: The data from the query.
"""
self.logger.info(f"Fetching data from query: {query}")
@@ -95,10 +94,10 @@ class Postgres(BaseActivity):
Repeats the last prediction for a given model.
Args:
query_items (dict[str, str]): The query items. Contains:
schema (str): The schema of the table.
table_name (str): The name of the table.
model (int): The model to repeat the prediction for.
- query_items (dict[str, str]): The query items. Contains:
- schema (str): The schema of the table.
- table_name (str): The name of the table.
- model (int): The model to repeat the prediction for.
Returns:
None
@@ -144,10 +143,10 @@ class Postgres(BaseActivity):
Exports data to a postgres table.
Args:
input_data (dict[str, Any]): The data to export. Contains:
schema (str): The schema of the table.
table_name (str): The name of the table.
data (DataFrame): The data to export.
- input_data (dict[str, Any]): The data to export. Contains:
- schema (str): The schema of the table.
- table_name (str): The name of the table.
- data (DataFrame): The data to export.
"""
self.logger.debug(