def set_config(cls): config_path_abs = resolve_config_path(cls) if not os.path.exists(config_path_abs): raise ValueError( "Luigi configuration file was not found: {}".format( config_path_abs)) configuration_core.add_config_path(config_path_abs) init_luigi_logging()
import attr import luigi from luigi.configuration.core import add_config_path from luigi.util import requires from typing import Dict from tcomapi.common.excel import parse from tcomapi.common.utils import save_csvrows from tcomapi.common.correctors import basic_corrector from settings import CONFIG_DIR, TMP_DIR, BIGDATA_TMP_DIR from tasks.base import (GzipToFtp, BaseConfig, ParseWebExcelFileFromArchive, GzipDataGovToFtp, GzipDgovBigToFtp, ParseDgovBig, WebDataExcelFileFromArchiveParsingToCsv) config_path = os.path.join(CONFIG_DIR, 'kato.conf') add_config_path(config_path) @attr.s class Row: te = attr.ib(default='') ab = attr.ib(default='') cd = attr.ib(default='') ef = attr.ib(default='') hij = attr.ib(default='') k = attr.ib(default='') name_kaz = attr.ib(default='') name_rus = attr.ib(default='') nn = attr.ib(default='')