<commit_before># Copyright 2007 Pompeu Fabra University (Computational Imaging Laboratory), Barcelona, Spain. Web: www.cilab.upf.edu.
# This software is distributed WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# 
#  Script to automate CSnake calls from cruise control

import sys
import csnGUIHandler
import csnGUIOptions
import csnGenerator

# Check command line arguments
if len(sys.argv) != 3:
    sys.exit("Error: not enough arguments. You need to provide an option and a configuration file.")

# Command line inputs
options_file = sys.argv[1]
config_file = sys.argv[2]

# Create GUI handler
handler = csnGUIHandler.Handler()
# Read options
options = csnGUIOptions.Options()
options.Load( options_file )
# Read settings
settings = csnGenerator.Settings()
settings.Load( config_file )
# Set the options
handler.SetOptions( options )
# Configure the project with the settings
if settings.instance == "thirdParty":
    handler.ConfigureThirdPartyFolder(settings)
else:
    handler.ConfigureProjectToBinFolder( settings, 1 )
<commit_msg>Added a return value.<commit_after># Copyright 2007 Pompeu Fabra University (Computational Imaging Laboratory), Barcelona, Spain. Web: www.cilab.upf.edu.
# This software is distributed WITHOUT ANY WARRANTY;
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# 
#  Script to automate CSnake calls from cruise control

import sys
import csnGUIHandler
import csnGUIOptions
import csnGenerator

# Check command line arguments
if len(sys.argv) != 3:
    sys.exit("Error: not enough arguments. You need to provide an option and a configuration file.")

# Command line inputs
options_file = sys.argv[1]
config_file = sys.argv[2]

# Create GUI handler
handler = csnGUIHandler.Handler()
# Read options
options = csnGUIOptions.Options()
options.Load( options_file )
# Read settings
settings = csnGenerator.Settings()
settings.Load( config_file )
# Set the options
handler.SetOptions( options )
# Configure the project with the settings
if settings.instance == "thirdParty":
    res = handler.ConfigureThirdPartyFolder(settings)
else:
    res = handler.ConfigureProjectToBinFolder( settings, 1 )
return res
{'fraction_non_alphanumeric': 0.07627118644067797, 'fraction_numerical': 0.007136485280999108, 'mean_word_length': 5.26536312849162, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, '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': '2676217', 'n_tokens_mistral': 626, 'n_tokens_neox': 603, 'n_words': 233}