# 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)
        # replace model section with skll_model.
        updated_section_list = ['skll_' + sname if sname == 'model' else sname for sname in section_list]
        general_section_plus_extension = [s + '.ipynb' for s in updated_section_list]
        expected_notebook_files = [join(notebook_path, s)
                                   for s in general_section_plus_extension]
        eq_(notebook_files, expected_notebook_files)

    def test_get_ordered_notebook_files_custom_rsmtool(self):

        # custom and general sections, custom order and subgroups
        general_sections = ['data_description', 'pca', 'data_description_by_group']
        custom_sections = ['/test_path/custom.ipynb']
        special_sections = ['placeholder_special_section']
        subgroups = ['prompt']
        section_order = ['custom',
                         'data_description',
                         'pca',
                         'data_description_by_group',
                         'placeholder_special_section']
        special_notebook_path = notebook_path_dict['special']['rsmtool']
        notebook_files = self.reporter.get_ordered_notebook_files(general_sections,
                                                                  custom_sections=custom_sections,
                                                                  special_sections=special_sections,
                                                                  section_order=section_order,
                                                                  subgroups=subgroups,
                                                                  model_type='skll',
                                                                  context='rsmtool')

        expected_notebook_files = ([join(notebook_path, 'header.ipynb')] +
                                   ['/test_path/custom.ipynb'] +

# 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)

        # replace model section with skll_model.
        updated_section_list = ['skll_' + sname if sname == 'model' else sname for sname in section_list]
        general_section_plus_extension = [s + '.ipynb' for s in updated_section_list]
        expected_notebook_files = [join(notebook_path, s)
                                   for s in general_section_plus_extension]
        eq_(notebook_files, expected_notebook_files)

    def test_get_ordered_notebook_files_custom_rsmtool(self):

        # custom and general sections, custom order and subgroups
        general_sections = ['data_description', 'pca', 'data_description_by_group']
        custom_sections = ['/test_path/custom.ipynb']
        special_sections = ['placeholder_special_section']
        subgroups = ['prompt']
        section_order = ['custom',
                         'data_description',
                         'pca',
                         'data_description_by_group',
                         'placeholder_special_section']
        special_notebook_path = notebook_path_dict['special']['rsmtool']
        notebook_files = self.reporter.get_ordered_notebook_files(general_sections,
                                                                  custom_sections=custom_sections,
                                                                  special_sections=special_sections,
                                                                  section_order=section_order,
                                                                  subgroups=subgroups,
                                                                  model_type='skll',
                                                                  context='rsmtool')

        expected_notebook_files = ([join(notebook_path, 'header.ipynb')] +
                                   ['/test_path/custom.ipynb'] +

                                   [join(notebook_path, s) + '.ipynb' for s in ['data_description',