def write_report()

in dagify/converter/report_generator.py [0:0]


    def write_report(self):
        """Function that generates the json and txt report"""
        report_tables = []
        if not directory_exists(self.output_path):
            create_directory(self.output_path)

        job_title, job_columns, job_rows, job_statistics, job_warning = self.generate_report()
        job_conversion_table = generate_table(job_title, job_columns, job_rows)

        schedules_title, schedules_columns, schedules_rows = self.check_schedules(dag_divider=self.dag_divider)
        schedule_table = generate_table(schedules_title, schedules_columns, schedules_rows)

        report_tables.append(job_conversion_table)
        report_tables.append(schedule_table)
        generate_report_utils(report_tables, self.output_path, job_statistics, job_warning)
        # json_generation
        formatted_job_table_data = format_table_json(job_title, job_columns, job_rows)
        formatted_schedule_table_data = format_table_json(schedules_title, schedules_columns, schedules_rows)
        generate_json(job_statistics, formatted_job_table_data, formatted_schedule_table_data, job_warning, self.output_path)