<commit_before># Copyright 2018 <NAME> and <NAME>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

*** Settings ***
Library    gkeeprobot.keywords.ServerSetupKeywords
Library    gkeeprobot.keywords.ServerCheckKeywords
Library    gkeeprobot.keywords.ServerWaitKeywords
Library    gkeeprobot.keywords.ClientSetupKeywords
Library    gkeeprobot.keywords.ClientCheckKeywords

*** Keywords ***

Add Faculty and Configure Accounts on Client
    [Arguments]    @{faculty_names}
    :FOR    ${username}    IN    @{faculty_names}
    \        Gkeep Add Faculty Succeeds    admin_prof    ${username}
    \        Wait For Email    to_user=${username}    subject_contains="New git-keeper account"    body_contains=Password
    Create Accounts On Client  @{faculty_names}

Launch Gkeepd And Configure Admin Account on Client
    Reset Server
    Reset Client
    Add File To Server    keeper    files/valid_server.cfg    server.cfg
    Start gkeepd
    Wait For Gkeepd
    Wait For Email    to_user=admin_prof    subject_contains="New git-keeper account"    body_contains=Password
    Create Accounts On Client    admin_prof

Establish Course
    [Arguments]    ${faculty}    ${class}    @{students}
    :FOR     ${student}    IN    @{students}
    \    Add To Class CSV   faculty=${faculty}    class_name=${class}    student=${student}
    Gkeep Add Succeeds    faculty=${faculty}   class_name=cs1


Create Accounts On Client
    [Arguments]    @{usernames}
    :FOR    ${username}    IN    @{usernames}
    \       Create Account    ${username}
    \       Establish SSH Keys    ${username}
    \       Create Gkeep Config File    ${username}

<commit_msg>Fix error where class name was fixed to cs1<commit_after># Copyright 2018 <NAME> and <NAME>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

*** Settings ***
Library    gkeeprobot.keywords.ServerSetupKeywords
Library    gkeeprobot.keywords.ServerCheckKeywords
Library    gkeeprobot.keywords.ServerWaitKeywords
Library    gkeeprobot.keywords.ClientSetupKeywords
Library    gkeeprobot.keywords.ClientCheckKeywords

*** Keywords ***

Add Faculty and Configure Accounts on Client
    [Arguments]    @{faculty_names}
    :FOR    ${username}    IN    @{faculty_names}
    \        Gkeep Add Faculty Succeeds    admin_prof    ${username}
    \        Wait For Email    to_user=${username}    subject_contains="New git-keeper account"    body_contains=Password
    Create Accounts On Client  @{faculty_names}

Launch Gkeepd And Configure Admin Account on Client
    Reset Server
    Reset Client
    Add File To Server    keeper    files/valid_server.cfg    server.cfg
    Start gkeepd
    Wait For Gkeepd
    Wait For Email    to_user=admin_prof    subject_contains="New git-keeper account"    body_contains=Password
    Create Accounts On Client    admin_prof

Establish Course
    [Arguments]    ${faculty}    ${class}    @{students}
    :FOR     ${student}    IN    @{students}
    \    Add To Class CSV   faculty=${faculty}    class_name=${class}    student=${student}
    Gkeep Add Succeeds    faculty=${faculty}   class_name=${class}


Create Accounts On Client
    [Arguments]    @{usernames}
    :FOR    ${username}    IN    @{usernames}
    \       Create Account    ${username}
    \       Establish SSH Keys    ${username}
    \       Create Gkeep Config File    ${username}


{'fraction_non_alphanumeric': 0.07353921350810931, 'fraction_numerical': 0.0026660742057320595, 'mean_word_length': 3.195712954333644, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '353098', 'n_tokens_mistral': 1276, 'n_tokens_neox': 1232, 'n_words': 468}