示例#1
0
    def print_summary(cls, path, results):
        """Function is used for printing summary information"""
        if results.get_summary_info():
            for key, value in results.get_summary_info().items():
                logger.info("%s %s\n", key, value)

        LoggerHelper.add_file_handler(logger_report, path)

        cls.results_store = results

        cls.print_success_message()
        logger_report.info("All result files are stored in %s", os.path.dirname(path))

        cls.print_changes_patch()

        cls.print_checkers_text_output(results.get_checkers())

        cls.print_build_log_hooks_result(results.get_build_log_hooks())

        if results.get_patches():
            cls.print_patches(results.get_patches())

        cls.print_message_and_separator("\nRPMS")
        for pkg_version in ['old', 'new']:
            pkg_results = results.get_build(pkg_version)
            if pkg_results:
                cls.print_rpms_and_logs(pkg_results, pkg_version.capitalize())
示例#2
0
    def print_summary(cls, path):

        """
        Function is used for printing summary informations
        :return:
        """

        for key, value in six.iteritems(OutputLogger.get_summary_info()):
            logger.info("%s %s\n", key, value)

        try:
            LoggerHelper.add_file_handler(logger_report, path)
        except (OSError, IOError):
            raise RebaseHelperError("Can not create results file '%s'" % path)

        type_pkgs = ['old', 'new']
        if OutputLogger.get_patches():
            cls.print_patches(OutputLogger.get_patches(), '\nSummary information about patches:')
        for pkg in type_pkgs:
            type_pkg = OutputLogger.get_build(pkg)
            if type_pkg:
                cls.print_rpms(type_pkg, pkg.capitalize())
                cls.print_build_logs(type_pkg, pkg.capitalize())

        cls.print_pkgdiff_tool()
示例#3
0
    def print_summary(cls, path, results=results_store):
        """
        Function is used for printing summary informations

        :return: 
        """
        if results.get_summary_info():
            for key, value in six.iteritems(results.get_summary_info()):
                logger.info("%s %s\n", key, value)

        try:
            LoggerHelper.add_file_handler(logger_report, path)
        except (OSError, IOError):
            raise RebaseHelperError("Can not create results file '%s'" % path)

        type_pkgs = ['old', 'new']
        if results.get_patches():
            cls.print_patches(results.get_patches(),
                              '\nSummary information about patches:')
        for pkg in type_pkgs:
            type_pkg = results.get_build(pkg)
            if type_pkg:
                cls.print_rpms(type_pkg, pkg.capitalize())
                cls.print_build_logs(type_pkg, pkg.capitalize())

        cls.print_pkgdiff_tool(results.get_checkers())
    def print_summary(cls, path, results):
        """Function is used for printing summary information"""
        if results.get_summary_info():
            for key, value in six.iteritems(results.get_summary_info()):
                logger.info("%s %s\n", key, value)

        try:
            LoggerHelper.add_file_handler(logger_report, path)
        except (OSError, IOError):
            raise RebaseHelperError(
                "Can not create results file '{}'".format(path))

        cls.results_store = results

        cls.print_success_message()
        logger_report.info("All result files are stored in %s",
                           os.path.dirname(path))

        cls.print_changes_patch()

        cls.print_checkers_text_output(results.get_checkers())

        if results.get_patches():
            cls.print_patches(results.get_patches())

        cls.print_message_and_separator("\nRPMS")
        for pkg_version in ['old', 'new']:
            pkg_results = results.get_build(pkg_version)
            if pkg_results:
                cls.print_rpms_and_logs(pkg_results, pkg_version.capitalize())
示例#5
0
    def print_summary(cls, path):

        """
        Function is used for printing summary informations
        :return:
        """

        # First of all we would like to print all
        # summary information
        OutputLogger.set_info_text("Summary output is also available in log:", path)
        logger.info('\n')
        for key, value in six.iteritems(OutputLogger.get_summary_info()):
            logger.info("%s %s\n", key, value)

        try:
            LoggerHelper.add_file_handler(logger_output, path)
        except (OSError, IOError):
            raise RebaseHelperError("Can not create results file '%s'", path)

        type_pkgs = ['old', 'new']
        cls.print_patches(OutputLogger.get_patches(), '\nSummary information about patches:')
        for pkg in type_pkgs:
            type_pkg = OutputLogger.get_build(pkg)
            if type_pkg:
                cls.print_rpms(type_pkg, pkg.capitalize())
                cls.print_build_logs(type_pkg, pkg.capitalize())

        cls.print_pkgdiff_tool()
示例#6
0
    def run():
        debug_log_file = None
        try:
            cli = CLI()
            if hasattr(cli, 'version'):
                logger.info(VERSION)
                sys.exit(0)

            config = Config(getattr(cli, 'config-file', None))
            config.merge(cli)
            for handler in [main_handler, output_tool_handler]:
                handler.set_terminal_background(config.background)

            ConsoleHelper.use_colors = ConsoleHelper.should_use_colors(config)
            execution_dir, results_dir, debug_log_file = Application.setup(
                config)
            traceback_log = os.path.join(results_dir, LOGS_DIR, TRACEBACK_LOG)
            if config.verbose == 0:
                main_handler.setLevel(logging.INFO)
            elif config.verbose == 1:
                main_handler.setLevel(CustomLogger.VERBOSE)
            else:
                main_handler.setLevel(logging.DEBUG)
            app = Application(config, execution_dir, results_dir,
                              debug_log_file)
            app.run()
        except KeyboardInterrupt:
            logger.info('Interrupted by user')
        except RebaseHelperError as e:
            if e.msg:
                logger.error('%s', e.msg)
            else:
                logger.error('%s', six.text_type(e))
            sys.exit(1)
        except SystemExit as e:
            sys.exit(e.code)
        except BaseException:
            if debug_log_file:
                logger.error(
                    'rebase-helper failed due to an unexpected error. Please report this problem'
                    '\nusing the following link: %s'
                    '\nand include the content of'
                    '\n\'%s\' and'
                    '\n\'%s\''
                    '\nin the report.'
                    '\nThank you!', NEW_ISSUE_LINK, debug_log_file,
                    traceback_log)
                LoggerHelper.add_file_handler(logger_traceback, traceback_log)
                logger_traceback.trace('', exc_info=1)
            else:
                logger.error(
                    'rebase-helper failed due to an unexpected error. Please report this problem'
                    '\nusing the following link: %s'
                    '\nThank you!', NEW_ISSUE_LINK)
            sys.exit(1)

        sys.exit(0)
示例#7
0
    def __init__(self, cli_conf=None):
        """
        Initialize the application

        :param cli_conf: CLI object with configuration gathered from commandline
        :return: 
        """
        OutputLogger.clear()

        self.conf = cli_conf

        if self.conf.verbose:
            LoggerHelper.add_stream_handler(logger, logging.DEBUG)
        else:
            LoggerHelper.add_stream_handler(logger, logging.INFO)

        # The directory in which rebase-helper was executed
        if self.conf.results_dir is None:
            self.execution_dir = os.getcwd()
        else:
            self.execution_dir = self.conf.results_dir

        # Temporary workspace for Builder, checks, ...
        self.kwargs['workspace_dir'] = self.workspace_dir = os.path.join(self.execution_dir,
                                                                         settings.REBASE_HELPER_WORKSPACE_DIR)
        # Directory where results should be put
        self.kwargs['results_dir'] = self.results_dir = os.path.join(self.execution_dir,
                                                                     settings.REBASE_HELPER_RESULTS_DIR)

        self.kwargs['non_interactive'] = self.conf.non_interactive
        # if not continuing, check the results dir
        if not self.conf.cont and not self.conf.build_only and not self.conf.comparepkgs:
            self._check_results_dir()
        # This is used if user executes rebase-helper with --continue
        # parameter even when directory does not exist
        if not os.path.exists(self.results_dir):
            os.makedirs(self.results_dir)
            os.makedirs(os.path.join(self.results_dir, settings.REBASE_HELPER_LOGS))

        self._add_debug_log_file()
        self._add_report_log_file()
        logger.debug("Rebase-helper version: %s" % version.VERSION)
        if self.conf.build_tasks is None:
            self._get_spec_file()
            self._prepare_spec_objects()

            # check the workspace dir
            if not self.conf.cont:
                self._check_workspace_dir()

            # TODO: Remove the value from kwargs and use only CLI attribute!
            self.kwargs['continue'] = self.conf.cont
            self._initialize_data()

        if self.conf.cont or self.conf.build_only:
            self._delete_old_builds()
示例#8
0
    def run():
        debug_log_file = None
        try:
            cli = CLI()
            if hasattr(cli, 'version'):
                logger.info(VERSION)
                sys.exit(0)

            config = Config(getattr(cli, 'config-file', None))
            config.merge(cli)
            for handler in [main_handler, output_tool_handler]:
                handler.set_terminal_background(config.background)

            ConsoleHelper.use_colors = ConsoleHelper.should_use_colors(config)
            execution_dir, results_dir, debug_log_file = Application.setup(config)
            traceback_log = os.path.join(results_dir, LOGS_DIR, TRACEBACK_LOG)
            if config.verbose == 0:
                main_handler.setLevel(logging.INFO)
            elif config.verbose == 1:
                main_handler.setLevel(CustomLogger.VERBOSE)
            else:
                main_handler.setLevel(logging.DEBUG)
            app = Application(config, execution_dir, results_dir, debug_log_file)
            app.run()
        except KeyboardInterrupt:
            logger.info('Interrupted by user')
        except RebaseHelperError as e:
            if e.msg:
                logger.error('%s', e.msg)
            else:
                logger.error('%s', str(e))
            sys.exit(1)
        except SystemExit as e:
            sys.exit(e.code)
        except BaseException:
            if debug_log_file:
                logger.error('rebase-helper failed due to an unexpected error. Please report this problem'
                             '\nusing the following link: %s'
                             '\nand include the content of'
                             '\n\'%s\' and'
                             '\n\'%s\''
                             '\nin the report.'
                             '\nThank you!',
                             NEW_ISSUE_LINK, debug_log_file, traceback_log)
                LoggerHelper.add_file_handler(logger_traceback, traceback_log)
                logger_traceback.trace('', exc_info=1)
            else:
                logger.error('rebase-helper failed due to an unexpected error. Please report this problem'
                             '\nusing the following link: %s'
                             '\nThank you!',
                             NEW_ISSUE_LINK)
            sys.exit(1)

        sys.exit(0)
示例#9
0
    def _add_report_log_file(results_dir):
        """
        Add the application report log file

        :return: log file path
        """
        report_log_file = os.path.join(results_dir,
                                       settings.REBASE_HELPER_REPORT_LOG)
        try:
            LoggerHelper.add_file_handler(logger_report, report_log_file, None,
                                          logging.INFO)
        except (IOError, OSError):
            logger.warning("Can not create report log '%s'", report_log_file)
        else:
            return report_log_file
示例#10
0
 def _add_report_log_file(self):
     """
     Add the application report log file
     :return:
     """
     report_log_file = os.path.join(self.results_dir, settings.REBASE_HELPER_REPORT_LOG)
     try:
         LoggerHelper.add_file_handler(logger_report,
                                       report_log_file,
                                       None,
                                       logging.INFO)
     except (IOError, OSError):
         logger.warning("Can not create report log '%s'", report_log_file)
     else:
         self.report_log_file = report_log_file
示例#11
0
 def _add_debug_log_file(self):
     """
     Add the application wide debug log file
     :return:
     """
     debug_log_file = os.path.join(self.results_dir, settings.REBASE_HELPER_DEBUG_LOG)
     try:
         LoggerHelper.add_file_handler(logger,
                                       debug_log_file,
                                       logging.Formatter("%(asctime)s %(levelname)s\t%(filename)s"
                                                         ":%(lineno)s %(funcName)s: %(message)s"),
                                       logging.DEBUG)
     except (IOError, OSError):
         logger.warning("Can not create debug log '%s'", debug_log_file)
     else:
         self.debug_log_file = debug_log_file
示例#12
0
    def _add_debug_log_file(results_dir):
        """
        Add the application wide debug log file

        :return: log file path
        """
        debug_log_file = os.path.join(results_dir, constants.DEBUG_LOG)
        try:
            LoggerHelper.add_file_handler(logger,
                                          debug_log_file,
                                          logging.Formatter("%(asctime)s %(levelname)s\t%(filename)s"
                                                            ":%(lineno)s %(funcName)s: %(message)s"),
                                          logging.DEBUG)
        except (IOError, OSError):
            logger.warning("Can not create debug log '%s'", debug_log_file)
        else:
            return debug_log_file
示例#13
0
    def run():
        debug_log_file = None
        try:
            # be verbose until debug_log_file is created
            handler = LoggerHelper.add_stream_handler(logger, logging.DEBUG)
            if "--builder-options" in sys.argv[1:]:
                raise RebaseHelperError(
                    "Wrong format of --builder-options. It must be in the following form:"
                    ' --builder-options="--desired-builder-option".'
                )
            cli = CLI()
            execution_dir, results_dir, debug_log_file, report_log_file = Application.setup(cli)
            if not cli.verbose:
                handler.setLevel(logging.INFO)
            app = Application(cli, execution_dir, results_dir, debug_log_file, report_log_file)
            app.run()
        except KeyboardInterrupt:
            logger.info("\nInterrupted by user")
        except RebaseHelperError as e:
            if e.args:
                logger.error("\n%s", e.args[0] % e.args[1:])
            else:
                logger.error("\n%s", six.text_type(e))
            sys.exit(1)
        except SystemExit as e:
            sys.exit(e.code)
        except BaseException:
            if debug_log_file:
                logger.error(
                    "\nrebase-helper failed due to an unexpected error. Please report this problem"
                    "\nusing the following link: %s"
                    "\nand include the content of"
                    "\n'%s'"
                    "\nfile in the report."
                    "\nThank you!",
                    NEW_ISSUE_LINK,
                    debug_log_file,
                )
            else:
                logger.error(
                    "\nrebase-helper failed due to an unexpected error. Please report this problem"
                    "\nusing the following link: %s"
                    "\nand include the traceback following this message in the report."
                    "\nThank you!",
                    NEW_ISSUE_LINK,
                )
            logger.debug("\n", exc_info=1)
            sys.exit(1)

        sys.exit(0)
示例#14
0
    def print_summary(cls, report_path, results):
        """Outputs a summary of a rebase.

        Args:
            report_path: Where the report file should be created
            results: ResultsStore instance to get data from.

        """
        info = results.get_summary_info()
        if info:
            for key, value in info.items():
                level = logging.getLevelName(key)
                if isinstance(level, int):
                    logger.log(level, value)
                else:
                    logger.info('%s: %s', key, value)

        LoggerHelper.add_file_handler(logger_report, report_path)

        cls.print_success_message(results)
        logger_report.info("All result files are stored in %s",
                           os.path.dirname(report_path))

        cls.print_changes_patch(results)

        cls.print_checkers_text_output(results.get_checkers())

        cls.print_build_log_hooks_result(results.get_build_log_hooks())

        if results.get_patches():
            cls.print_patches(results.get_patches())

        cls.print_message_and_separator("\nRPMS")
        for pkg_version in ['old', 'new']:
            pkg_results = results.get_build(pkg_version)
            if pkg_results:
                cls.print_rpms_and_logs(pkg_results, pkg_version.capitalize())
示例#15
0
    def run():
        debug_log_file = None
        try:
            # be verbose until debug_log_file is created
            handler = LoggerHelper.add_stream_handler(logger, logging.DEBUG)
            if "--builder-options" in sys.argv[1:]:
                raise RebaseHelperError(
                    'Wrong format of --builder-options. It must be in the following form:'
                    ' --builder-options="--desired-builder-option".')
            cli = CLI()
            if cli.version:
                logger.info(VERSION)
                sys.exit(0)
            ConsoleHelper.use_colors = ConsoleHelper.should_use_colors(cli)
            execution_dir, results_dir, debug_log_file = Application.setup(cli)
            if not cli.verbose:
                handler.setLevel(logging.INFO)
            app = Application(cli, execution_dir, results_dir, debug_log_file)
            app.run()
        except KeyboardInterrupt:
            logger.info('\nInterrupted by user')
        except RebaseHelperError as e:
            if e.msg:
                logger.error('\n%s', e.msg)
            else:
                logger.error('\n%s', six.text_type(e))
            sys.exit(1)
        except SystemExit as e:
            sys.exit(e.code)
        except BaseException:
            if debug_log_file:
                logger.error(
                    '\nrebase-helper failed due to an unexpected error. Please report this problem'
                    '\nusing the following link: %s'
                    '\nand include the content of'
                    '\n\'%s\''
                    '\nfile in the report.'
                    '\nThank you!', NEW_ISSUE_LINK, debug_log_file)
            else:
                logger.error(
                    '\nrebase-helper failed due to an unexpected error. Please report this problem'
                    '\nusing the following link: %s'
                    '\nand include the traceback following this message in the report.'
                    '\nThank you!', NEW_ISSUE_LINK)
            logger.debug('\n', exc_info=1)
            sys.exit(1)

        sys.exit(0)
示例#16
0
    def setup_logging(results_dir):
        """Adds file handlers of various verbosity to loggers.

        Args:
            results_dir: Path to directory which results are stored in.

        Returns:
            string: Path to debug log.

        """
        logs_dir = os.path.join(results_dir, constants.LOGS_DIR)
        debug_log = os.path.join(logs_dir, constants.DEBUG_LOG)
        LoggerHelper.add_file_handler(logger, debug_log, debug_log_formatter, logging.DEBUG)
        verbose_log = os.path.join(logs_dir, constants.VERBOSE_LOG)
        LoggerHelper.add_file_handler(logger, verbose_log, log_formatter, CustomLogger.VERBOSE)
        info_log = os.path.join(logs_dir, constants.INFO_LOG)
        LoggerHelper.add_file_handler(logger, info_log, log_formatter, logging.INFO)

        return debug_log
示例#17
0
    def setup_logging(results_dir):
        """Adds file handlers of various verbosity to loggers.

        Args:
            results_dir: Path to directory which results are stored in.

        Returns:
            string: Path to debug log.

        """
        logs_dir = os.path.join(results_dir, constants.LOGS_DIR)
        debug_log = os.path.join(logs_dir, constants.DEBUG_LOG)
        LoggerHelper.add_file_handler(logger, debug_log, debug_log_formatter, logging.DEBUG)
        verbose_log = os.path.join(logs_dir, constants.VERBOSE_LOG)
        LoggerHelper.add_file_handler(logger, verbose_log, log_formatter, CustomLogger.VERBOSE)
        info_log = os.path.join(logs_dir, constants.INFO_LOG)
        LoggerHelper.add_file_handler(logger, info_log, log_formatter, logging.INFO)

        return debug_log
示例#18
0
    def run(cls):
        results_dir = None
        start_dir = os.getcwd()
        try:
            LoggerHelper.setup_memory_handler()
            main_handler, output_tool_handler = LoggerHelper.create_stream_handlers(
            )
            cli = CLI()
            if hasattr(cli, 'version'):
                print(VERSION)
                sys.exit(0)

            logger.info('rebase-helper version %s', VERSION)

            config = Config(getattr(cli, 'config-file', None))
            config.merge(cli)
            for handler in [main_handler, output_tool_handler]:
                handler.set_terminal_background(config.background)
            if config.verbose == 0:
                main_handler.setLevel(logging.INFO)
            elif config.verbose == 1:
                main_handler.setLevel(CustomLogger.VERBOSE)
            else:
                main_handler.setLevel(logging.DEBUG)
            ConsoleHelper.use_colors = ConsoleHelper.should_use_colors(config)
            if config.bugzilla_id:
                repo_path, config.config[
                    'sources'] = BugzillaHelper.prepare_rebase_repository(
                        config.bugzilla_id)
                try:
                    os.chdir(repo_path)
                except OSError as e:
                    raise RebaseHelperError(
                        'Could not change directory to the cloned repository'
                    ) from e
                # update relative paths in config
                for option in ('results_dir', 'workspace_dir'):
                    path = getattr(config, option)
                    if path and not os.path.isabs(path):
                        config.config[option] = os.path.join(
                            os.path.relpath(start_dir, os.getcwd()), path)

            if config.config['rpmmacros']:
                macros = ' -D ' + ' -D '.join(
                    '"{}"'.format(s) for s in config.config['rpmmacros'])
                for option in ('builder_options', 'srpm_builder_options'):
                    if config.config[option]:
                        config.config[option] += macros
                    else:
                        config.config[option] = macros

            config.config['rpmmacros'] = cls.convert_macros_to_dict(
                config.rpmmacros)
            execution_dir, results_dir = Application.setup(config)
            app = Application(config, start_dir, execution_dir, results_dir)
            app.run()
        except KeyboardInterrupt:
            logger.info('Interrupted by user')
        except RebaseHelperError as e:
            if e.msg:
                logger.error('%s', e.msg)
            else:
                logger.error('%s', str(e))
            sys.exit(1)
        except SystemExit as e:
            sys.exit(e.code)
        except BaseException:
            logger_traceback: CustomLogger = cast(
                CustomLogger, logging.getLogger('rebasehelper.traceback'))
            logger_traceback.propagate = False
            logger_traceback.setLevel(CustomLogger.TRACE)
            if results_dir:
                debug_log = os.path.join(results_dir, LOGS_DIR, DEBUG_LOG)
                traceback_log = os.path.join(results_dir, LOGS_DIR,
                                             TRACEBACK_LOG)
                logger.error(
                    'rebase-helper failed due to an unexpected error. Please report this problem'
                    '\nusing the following link: %s'
                    '\nand include the content of'
                    '\n\'%s\' and'
                    '\n\'%s\''
                    '\nin the report.'
                    '\nThank you!', NEW_ISSUE_LINK, debug_log, traceback_log)
                LoggerHelper.add_file_handler(logger_traceback, traceback_log)
            else:
                logger.error(
                    'rebase-helper failed due to an unexpected error. Please report this problem'
                    '\nusing the following link: %s'
                    '\nand include the following traceback in the report.'
                    '\nThank you!', NEW_ISSUE_LINK)

                LoggerHelper.add_stream_handler(logger_traceback,
                                                CustomLogger.TRACE)
            logger_traceback.trace('', exc_info=1)
            sys.exit(1)

        sys.exit(0)
示例#19
0
 def __del__(self):
     LoggerHelper.remove_file_handlers(self.handlers)
示例#20
0
    def __init__(self,
                 cli_conf: Config,
                 start_dir: str,
                 execution_dir: str,
                 results_dir: str,
                 create_logs: bool = True) -> None:
        """Initializes the application.

        Args:
            cli_conf: Application configuration.
            start_dir: Directory where rebase-helper was started.
            execution_dir: Working directory.
            results_dir: Location of rebase results.
            create_logs: Whether to create default logging file handlers.

        """
        results_store.clear()

        # Initialize instance attributes
        self.old_sources = ''
        self.new_sources = ''
        self.old_rest_sources: List[str] = []
        self.new_rest_sources: List[str] = []
        self.rebased_patches: Dict[str, List[str]] = {}
        self.rebased_repo: Optional[git.Repo] = None

        self.handlers = LoggerHelper.create_file_handlers(
            results_dir) if create_logs else []

        self.conf = cli_conf
        self.start_dir = start_dir
        self.execution_dir = execution_dir
        self.rebased_sources_dir = os.path.join(results_dir, 'rebased-sources')

        self.kwargs: Dict[str, Any] = {}
        self.kwargs.update(self.conf.config)
        # Temporary workspace for Builder, checks, ...
        workspace_location = os.path.abspath(
            cli_conf.workspace_dir
        ) if cli_conf.workspace_dir else self.execution_dir
        self.kwargs['workspace_dir'] = self.workspace_dir = os.path.join(
            workspace_location, constants.WORKSPACE_DIR)

        # Directory where results should be put
        self.kwargs['results_dir'] = self.results_dir = results_dir
        # Directory contaning only those files, which are relevant for the new rebased version
        self.kwargs['rebased_sources_dir'] = self.rebased_sources_dir

        self.spec_file_path = self._find_spec_file()
        self._prepare_spec_objects()

        if self.conf.build_tasks is None:
            # check the workspace dir
            self._check_workspace_dir()

            # verify all sources for the new version are present
            missing_sources = [
                os.path.basename(s) for s in self.rebase_spec_file.sources
                if not os.path.isfile(os.path.basename(s))
            ]
            if missing_sources:
                raise RebaseHelperError(
                    'The following sources are missing: {}'.format(
                        ','.join(missing_sources)))

            if self.conf.update_sources:
                sources = [os.path.basename(s) for s in self.spec_file.sources]
                rebased_sources = [
                    os.path.basename(s) for s in self.rebase_spec_file.sources
                ]
                uploaded = LookasideCacheHelper.update_sources(
                    'fedpkg',
                    self.rebased_sources_dir,
                    self.rebase_spec_file.header.name,
                    sources,
                    rebased_sources,
                    upload=not self.conf.skip_upload)
                self._update_gitignore(uploaded, self.rebased_sources_dir)

            self._initialize_data()