<commit_before>import pandas as pd
import numpy as np

from lexos.helpers.error_messages import EMPTY_DTM_MESSAGE
from lexos.models.stats_model import StatsModel, StatsTestOptions

# ------------------------ First test suite ------------------------
test_dtm_one = pd.DataFrame(data=np.array([(40, 20, 15, 5, 0, 0, 0, 0, 0),
                                           (0, 0, 0, 0, 1, 2, 3, 4, 5)]),
                            index=np.array([0, 1]),
                            columns=np.array(["A", "B", "C", "D", "E", "F",
                                              "G", "H", "I"]))
test_id_temp_table_one = {0: "F1.txt", 1: "F2.txt"}
test_option_one = StatsTestOptions(
    token_type="terms",
    doc_term_matrix=test_dtm_one,
    id_temp_label_map=test_id_temp_table_one)
test_stats_model_one = StatsModel(test_options=test_option_one)
test_corpus_result_one = test_stats_model_one.get_corpus_stats()
test_file_result_one = test_stats_model_one.get_file_stats()
# noinspection PyProtectedMember
test_box_plot_result_one = test_stats_model_one._get_box_plot_object()
test_pandas_one = pd.read_html(test_file_result_one)[0]
# ------------------------------------------------------------------

# ------------------------ Second test suite -----------------------
test_dtm_two = pd.DataFrame(
    data=np.array([(40, 20, 15, 5, 0, 0, 0, 0, 0, 0, 0, 0),
                   (0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 0, 0),
                   (0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 12, 13)]),
    index=np.array([0, 1, 2]),
    columns=np.array(["A", "B", "C", "D", "E", "F", "G", "H",<commit_msg>test_stats_front_end_option added to unit testing<commit_after>import pandas as pd
import numpy as np

from lexos.helpers.error_messages import EMPTY_DTM_MESSAGE
from lexos.models.stats_model import StatsModel, StatsTestOptions

# ------------------------ First test suite ------------------------
from lexos.receivers.stats_receiver import StatsFrontEndOption

test_dtm_one = pd.DataFrame(data=np.array([(40, 20, 15, 5, 0, 0, 0, 0, 0),
                                           (0, 0, 0, 0, 1, 2, 3, 4, 5)]),
                            index=np.array([0, 1]),
                            columns=np.array(["A", "B", "C", "D", "E", "F",
                                              "G", "H", "I"]))
test_id_temp_table_one = {0: "F1.txt", 1: "F2.txt"}
test_stats_front_end_option = StatsFrontEndOption(active_file_ids=[0, 1])
test_option_one = StatsTestOptions(
    token_type="terms",
    doc_term_matrix=test_dtm_one,
    front_end_option=test_stats_front_end_option,
    id_temp_label_map=test_id_temp_table_one)
test_stats_model_one = StatsModel(test_options=test_option_one)
test_corpus_result_one = test_stats_model_one.get_corpus_stats()
test_file_result_one = test_stats_model_one.get_file_stats()
# noinspection PyProtectedMember
test_box_plot_result_one = test_stats_model_one._get_box_plot_object()
test_pandas_one = pd.read_html(test_file_result_one)[0]
# ------------------------------------------------------------------

# ------------------------ Second test suite -----------------------
test_dtm_two = pd.DataFrame(
    data=np.array([(40, 20, 15, 5, 0, 0, 0, 0, 0, 0, 0, 0),
                   (0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 0, 0),
                   (0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 12, 13)]),
    index=np.array([0, 1, 2]),
    columns=np.array(["A", "B", "C", "D", "E", "F", "G", "H",
{'fraction_non_alphanumeric': 0.2255306603773585, 'fraction_numerical': 0.044221698113207544, 'mean_word_length': 2.1387604070305275, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '346512', 'n_tokens_mistral': 1312, 'n_tokens_neox': 1163, 'n_words': 259}