feat: Introduce bot-digitador service for automated data entry in Integración Total. Add CLI and GUI interfaces for CSV processing, implement auto-start functionality on Windows, and enhance README with setup instructions and usage details. Include necessary configurations in docker-compose for service integration.
This commit is contained in:
@@ -49,6 +49,11 @@ def apply_rules(
|
||||
if col not in result.columns:
|
||||
log.append(f"[WARN] Columna no encontrada: {col}")
|
||||
return
|
||||
# Eliminar columna: no tiene sentido transformar y luego borrar.
|
||||
if "drop_column" in rule_ids:
|
||||
result.drop(columns=[col], inplace=True)
|
||||
log.append(f"[OK] '{col}' <- {get_rule_name('drop_column')}")
|
||||
return
|
||||
split_has_homologation = (
|
||||
"doc_id_split_tipo_numero" in rule_ids and "doc_type_homologate" in rule_ids
|
||||
)
|
||||
|
||||
@@ -140,5 +140,14 @@ register_rule(
|
||||
),
|
||||
fn=special._rule_passthrough_series,
|
||||
)
|
||||
register_rule(
|
||||
"drop_column",
|
||||
name="Eliminar columna",
|
||||
description=(
|
||||
"Quita por completo esta columna del resultado limpio. "
|
||||
"Útil para campos que no se necesitan en el export o en pasos posteriores."
|
||||
),
|
||||
fn=special._rule_passthrough_series,
|
||||
)
|
||||
|
||||
rebuild_cleaning_rules()
|
||||
|
||||
@@ -99,7 +99,12 @@ def _infer_column_type(
|
||||
|
||||
def _applicable_rules_for_type(inferred_type: str) -> list[str]:
|
||||
"""Identificadores de reglas a mostrar según el tipo inferido (sin redundancias)."""
|
||||
base = ["strip_special_spaces", "strip_special_keep_date_seps", "strip_spaces"]
|
||||
base = [
|
||||
"strip_special_spaces",
|
||||
"strip_special_keep_date_seps",
|
||||
"strip_spaces",
|
||||
"drop_column",
|
||||
]
|
||||
if inferred_type == TYPE_INTEGER:
|
||||
return base + ["cop_mod_split", "cop_mod_bruto_neto"]
|
||||
if inferred_type == TYPE_DECIMAL:
|
||||
|
||||
Reference in New Issue
Block a user