<commit_before>use strict;
use Data::Dumper;
use Test::More;
use Config::Simple;
use Time::HiRes qw(time);
use Bio::KBase::AuthToken;
#use Bio::KBase::workspace::Client;
use Workspace::WorkspaceClient;
use kb_pickaxe::kb_pickaxeImpl;

local $| = 1;
my $token = $ENV{'KB_AUTH_TOKEN'};
my $config_file = $ENV{'KB_DEPLOYMENT_CONFIG'};
my $config = new Config::Simple($config_file)->get_block('kb_pickaxe');
my $ws_url = $config->{"workspace-url"};
my $ws_name = undef;
#my $ws_client = new Bio::KBase::workspace::Client($ws_url,token => $token);
my $ws_client = Workspace::WorkspaceClient->new($ws_url,token => $token);
my $auth_token = Bio::KBase::AuthToken->new(token => $token, ignore_authrc => 1);
my $ctx = LocalCallContext->new($token, $auth_token->user_id);
$kb_pickaxe::kb_pickaxeServer::CallContext = $ctx;
my $impl = new kb_pickaxe::kb_pickaxeImpl();

sub get_ws_name {
    if (!defined($ws_name)) {
        my $suffix = int(time * 1000);
        $ws_name = 'test_kb_pickaxe_' . $suffix;
        $ws_client->create_workspace({workspace => $ws_name});
    }
    return $ws_name;
}

my $compoundInfo = {
    compound_id => "cpd09988",
    compound_name => "pyruvate"
};

#=head
my $pickaxeParam = {
    workspace => "janakakbase:narrative_1497100053395",
    model_id => "M_leteus_model",
    out_model_id => "M_leteus_model_NewModel",
    rule_set => "enzymatic",
    generations => 1,
    model_ref => "22452/2/2",
    compounds => [$compoundInfo]

};

#=cut
=head
my $pickaxeParam = {
    workspace => "janakakbase:narrative_1495258241399",
    model_id => "testmodelid",
    out_model_id => "NewModel",
    #model_ref => "4953/12/1",
    model_ref => "4953/17/2",
    compounds => [$compoundInfo]

};
=cut




eval {
 my $ret =$impl->runpickaxe($pickaxeParam);
};
my $err = undef;<commit_msg>update tests<commit_after>use strict;
use Data::Dumper;
use Test::More;
use Config::Simple;
use Time::HiRes qw(time);
use Bio::KBase::AuthToken;
#use Bio::KBase::workspace::Client;
use Workspace::WorkspaceClient;
use kb_pickaxe::kb_pickaxeImpl;

local $| = 1;
my $token = $ENV{'KB_AUTH_TOKEN'};
my $config_file = $ENV{'KB_DEPLOYMENT_CONFIG'};
my $config = new Config::Simple($config_file)->get_block('kb_pickaxe');
my $ws_url = $config->{"workspace-url"};
my $ws_name = undef;
#my $ws_client = new Bio::KBase::workspace::Client($ws_url,token => $token);
my $ws_client = Workspace::WorkspaceClient->new($ws_url,token => $token);
my $auth_token = Bio::KBase::AuthToken->new(token => $token, ignore_authrc => 1);
my $ctx = LocalCallContext->new($token, $auth_token->user_id);
$kb_pickaxe::kb_pickaxeServer::CallContext = $ctx;
my $impl = new kb_pickaxe::kb_pickaxeImpl();

sub get_ws_name {
    if (!defined($ws_name)) {
        my $suffix = int(time * 1000);
        $ws_name = 'test_kb_pickaxe_' . $suffix;
        $ws_client->create_workspace({workspace => $ws_name});
    }
    return $ws_name;
}

my $compoundInfo = {
    compound_id => "cpd09988",
    compound_name => "pyruvate"
};

#=head
my $pickaxeParam = {
    workspace => "jjeffryes:narrative_1497984704461",
    model_id => "iMR1_799",
    out_model_id => "out_model",
    rule_set => "enzymatic",
    generations => 1,
    model_ref => "22452/2/2",
    compounds => [$compoundInfo]

};

#=cut
=head
my $pickaxeParam = {
    workspace => "janakakbase:narrative_1495258241399",
    model_id => "testmodelid",
    out_model_id => "NewModel",
    #model_ref => "4953/12/1",
    model_ref => "4953/17/2",
    compounds => [$compoundInfo]

};
=cut




eval {
 my $ret =$impl->runpickaxe($pickaxeParam);
};
my $err = undef;
{'fraction_non_alphanumeric': 0.17490919251187484, 'fraction_numerical': 0.034087734003911706, 'mean_word_length': 4.946843853820598, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 59, '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': '6319014', 'n_tokens_mistral': 1476, 'n_tokens_neox': 1388, 'n_words': 248}