<commit_before>package CoGe::Accessory::Workflow;
use strict;
use warnings;
use 5.10.0;

use Moose;

# Attributes
has 'workflow_id' => (is => 'ro',);

has 'name' => (
    is       => 'ro',
    isa      => 'Str',
    required => 1,
    default  => "",);

has 'logfile' => (
    is       => 'ro',
    isa      => 'Str',
    required => 1,
    default  => "",);

has 'jobs' => (
    is       => 'rw',
    isa      => 'ArrayRef',
    default  => sub {[]},
    required => 0,);

# Public functions
sub add_job
{
    my ($self, %opts) = @_;
    my $cmd     = $opts{cmd};
    my $script  = "" unless defined($opts{script});
    my $args    = $opts{args};
    my $inputs  = $opts{inputs};
    my $outputs = $opts{outputs};
    my $size    = $self->jobs;
    my $overwrite;

    if (defined($opts{overwrite}) && $opts{overwrite} > 0) {
        $overwrite = 1;
    } else {
        $overwrite = 0;
    }

    push(
        @{$self->jobs},
        {
            cmdstring => {cmd => $cmd, script => $script, args => $args,},
            overwrite => $overwrite,
            inputs    => $inputs,
            outputs   => $outputs,});<commit_msg>Moved the Workflow to its own seperate module.<commit_after>package CoGe::Accessory::Workflow;
use strict;
use warnings;
use 5.10.0;

use Moose;

# Attributes
has 'workflow_id' => (
    is => 'ro',
);

has 'name' => (
    is => 'ro',
    isa  => 'Str',
    required => 1,
    default => "",
);

has 'jobs' => (
    is => 'rw',
    isa  => 'ArrayRef',
    default => sub { [] },
    required => 0,
);

# Public functions
sub add_job {
    my ($self, $cmd, $inputs, $outputs) = @_;
    my $size = $self->jobs;
    
    push(@{$self->jobs}, {
        cmd => $cmd,
        inputs => $inputs,
        outputs => $outputs,
    });
{'fraction_non_alphanumeric': 0.1956769055745165, 'fraction_numerical': 0.009101251422070534, 'mean_word_length': 2.075174825174825, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 47, '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': '7384307', 'n_tokens_mistral': 644, 'n_tokens_neox': 617, 'n_words': 154}