continuing rework of generators
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
2023-02-09 15:14:21 +01:00
parent 8a88695409
commit 59689f2af6
4 changed files with 65 additions and 56 deletions

View File

@ -3,9 +3,9 @@
"""Part of the MIB export tools for the EIVE project by.
Returnvalue exporter.
"""
import logging
from pathlib import Path
from fsfwgen.logging import get_console_logger
from fsfwgen.utility.file_management import copy_file
from fsfwgen.parserbase.file_list_parser import FileListParser
from fsfwgen.returnvalues.returnvalues_parser import (
@ -17,7 +17,7 @@ from fsfwgen.utility.sql_writer import SqlWriter
from definitions import BspType, DATABASE_NAME, ROOT_DIR, OBSW_ROOT_DIR
LOGGER = get_console_logger()
_LOGGER = logging.getLogger(__name__)
EXPORT_TO_FILE = True
COPY_CSV_FILE = True
EXPORT_TO_SQL = True
@ -98,7 +98,7 @@ def parse_returnvalues(bsp_select: BspType):
delete_existing_file=True,
)
if EXPORT_TO_SQL:
LOGGER.info("ReturnvalueParser: Exporting to SQL")
_LOGGER.info("ReturnvalueParser: Exporting to SQL")
sql_retval_exporter(
returnvalue_table, db_filename=f"{ROOT_DIR}/{DATABASE_NAME}"
)
@ -116,7 +116,7 @@ def generate_returnvalue_table(cfg: BspConfig):
returnvalue_parser.obsw_root_path = OBSW_ROOT_DIR
returnvalue_parser.set_moving_window_mode(moving_window_size=7)
returnvalue_table = returnvalue_parser.parse_files(True)
LOGGER.info(f"ReturnvalueParser: Found {len(returnvalue_table)} returnvalues")
_LOGGER.info(f"ReturnvalueParser: Found {len(returnvalue_table)} returnvalues")
return returnvalue_table