# Path: rsmtool/reporter.py
# class Reporter:
#     def __init__(self, logger=None):
#     def locate_custom_sections(custom_report_section_paths, configdir):
#     def merge_notebooks(notebook_files, output_file):
#     def check_section_names(specified_sections,
#                             section_type,
#                             context='rsmtool'):
#     def check_section_order(chosen_sections, section_order):
#     def convert_ipynb_to_html(notebook_file, html_file):
#     def determine_chosen_sections(self,
#                                   general_sections,
#                                   special_sections,
#                                   custom_sections,
#                                   subgroups,
#                                   context='rsmtool'):
#     def get_section_file_map(self,
#                              special_sections,
#                              custom_sections,
#                              model_type=None,
#                              context='rsmtool'):
#     def get_ordered_notebook_files(self,
#                                    general_sections,
#                                    special_sections=[],
#                                    custom_sections=[],
#                                    section_order=None,
#                                    subgroups=[],
#                                    model_type=None,
#                                    context='rsmtool'):
#     def create_report(self,
#                       config,
#                       csvdir,
#                       figdir,
#                       context='rsmtool'):
#     def create_comparison_report(self,
#                                  config,
#                                  csvdir_old,
#                                  figdir_old,
#                                  csvdir_new,
#                                  figdir_new,
#                                  output_dir):
#     def create_summary_report(self,
#                               config,
#                               all_experiments,
#                               csvdir):
# def main():  # noqa: D103


from os.path import join, normpath
from nose.tools import eq_, ok_, raises
from rsmtool.reporter import (Reporter,
                              comparison_notebook_path,
                              master_section_dict,
                              notebook_path,
                              notebook_path_dict,
                              summary_notebook_path)

    def test_determine_chosen_sections_eval_default_general_with_no_subgroups(self):
        general_sections = ['all']
        special_sections = []
        custom_sections = []
        subgroups = []
        no_subgroup_list = [s for s in general_section_list_rsmeval
                            if not s.endswith('by_group') and s != 'fairness_analyses']
        chosen_sections = self.reporter.determine_chosen_sections(general_sections,
                                                                  special_sections,
                                                                  custom_sections,
                                                                  subgroups,
                                                                  context='rsmeval')
        eq_(sorted(chosen_sections), sorted(no_subgroup_list))

    def test_determine_chosen_sections_eval_custom_general_with_special_and_subgroups(self):
        general_sections = ['data_description', 'consistency', 'data_description_by_group']
        special_sections = ['placeholder_special_section']
        custom_sections = []
        subgroups = ['prompt', 'gender']
        chosen_sections = self.reporter.determine_chosen_sections(general_sections,
                                                                  special_sections,
                                                                  custom_sections,
                                                                  subgroups,
                                                                  context='rsmeval')
        eq_(sorted(chosen_sections), sorted(general_sections +
                                            special_sections))

    def test_determine_chosen_sections_compare_default_general(self):
        general_sections = ['all']

# Path: rsmtool/reporter.py
# class Reporter:
#     def __init__(self, logger=None):
#     def locate_custom_sections(custom_report_section_paths, configdir):
#     def merge_notebooks(notebook_files, output_file):
#     def check_section_names(specified_sections,
#                             section_type,
#                             context='rsmtool'):
#     def check_section_order(chosen_sections, section_order):
#     def convert_ipynb_to_html(notebook_file, html_file):
#     def determine_chosen_sections(self,
#                                   general_sections,
#                                   special_sections,
#                                   custom_sections,
#                                   subgroups,
#                                   context='rsmtool'):
#     def get_section_file_map(self,
#                              special_sections,
#                              custom_sections,
#                              model_type=None,
#                              context='rsmtool'):
#     def get_ordered_notebook_files(self,
#                                    general_sections,
#                                    special_sections=[],
#                                    custom_sections=[],
#                                    section_order=None,
#                                    subgroups=[],
#                                    model_type=None,
#                                    context='rsmtool'):
#     def create_report(self,
#                       config,
#                       csvdir,
#                       figdir,
#                       context='rsmtool'):
#     def create_comparison_report(self,
#                                  config,
#                                  csvdir_old,
#                                  figdir_old,
#                                  csvdir_new,
#                                  figdir_new,
#                                  output_dir):
#     def create_summary_report(self,
#                               config,
#                               all_experiments,
#                               csvdir):
# def main():  # noqa: D103


# Path: tests/test_reporter.py
from os.path import join, normpath
from nose.tools import eq_, ok_, raises
from rsmtool.reporter import (Reporter,
                              comparison_notebook_path,
                              master_section_dict,
                              notebook_path,
                              notebook_path_dict,
                              summary_notebook_path)


    def test_determine_chosen_sections_eval_default_general_with_no_subgroups(self):
        general_sections = ['all']
        special_sections = []
        custom_sections = []
        subgroups = []
        no_subgroup_list = [s for s in general_section_list_rsmeval
                            if not s.endswith('by_group') and s != 'fairness_analyses']
        chosen_sections = self.reporter.determine_chosen_sections(general_sections,
                                                                  special_sections,
                                                                  custom_sections,
                                                                  subgroups,
                                                                  context='rsmeval')
        eq_(sorted(chosen_sections), sorted(no_subgroup_list))

    def test_determine_chosen_sections_eval_custom_general_with_special_and_subgroups(self):
        general_sections = ['data_description', 'consistency', 'data_description_by_group']
        special_sections = ['placeholder_special_section']
        custom_sections = []
        subgroups = ['prompt', 'gender']
        chosen_sections = self.reporter.determine_chosen_sections(general_sections,
                                                                  special_sections,
                                                                  custom_sections,
                                                                  subgroups,
                                                                  context='rsmeval')
        eq_(sorted(chosen_sections), sorted(general_sections +
                                            special_sections))

    def test_determine_chosen_sections_compare_default_general(self):
        general_sections = ['all']

        special_sections = []