<commit_before>import os
import sys
import argparse
import logging
#from jinja2 import Template, Environment, FileSystemLoader
from collections import OrderedDict
import rpy2.robjects as R
from rpy2.robjects.vectors import ListVector
#from rpy2.robjects.packages import importr
from gensabenchmarks.rbench.convert2r import GOClass2RConverter
from gensabenchmarks.go_func_utils import goclass

logger = logging.getLogger(__name__)

def csv(value):
    return value.split(",")

def benchmark(methods, nbruns, deltas, output_dir):
    script_path = os.path.join(os.path.abspath(os.path.dirname(__file__)),
            'scripts')
    R.r['source'](os.path.join(script_path, 'bench.R'))
    od = OrderedDict()
    # Creating the R list with converted python go testing functions
    print('Converting SciPy test functions to R...')
    counter = 0
    for name, klass in goclass():
        try:
            gocc = GOClass2RConverter(klass)
            #res = gocc.fun(gocc.xglob)
            od.update(((name, gocc.rlist),))
        except Exception:
            print('Ignoring function: {} that can not be translated...'.format(<commit_msg>Calling the non context translated function<commit_after>import os
import sys
import argparse
import logging
#from jinja2 import Template, Environment, FileSystemLoader
from collections import OrderedDict
import rpy2.robjects as R
from rpy2.robjects.vectors import ListVector
#from rpy2.robjects.packages import importr
from gensabenchmarks.rbench.convert2r import GOClass2RConverter
from gensabenchmarks.go_func_utils import goclass

logger = logging.getLogger(__name__)

def csv(value):
    return value.split(",")

def benchmark(methods, nbruns, deltas, output_dir):
    script_path = os.path.join(os.path.abspath(os.path.dirname(__file__)),
            'scripts')
    R.r['source'](os.path.join(script_path, 'bench.R'))
    od = OrderedDict()
    # Creating the R list with converted python go testing functions
    print('Converting SciPy test functions to R...')
    counter = 0
    for name, klass in goclass():
        try:
            gocc = GOClass2RConverter(klass)
            res = gocc.fun_no_context(gocc.xglob)
            od.update(((name, gocc.rlist),))
        except Exception:
            print('Ignoring function: {} that can not be translated...'.format(
{'fraction_non_alphanumeric': 0.0972342264477096, 'fraction_numerical': 0.006914433880726016, 'mean_word_length': 3.6862348178137654, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5547773', 'n_tokens_mistral': 710, 'n_tokens_neox': 702, 'n_words': 194}