Skip to content

Commit 2ec35b3

Browse files
committed
refactoring begun
1 parent 5fe6ed3 commit 2ec35b3

File tree

16 files changed

+82
-62
lines changed

16 files changed

+82
-62
lines changed

lib/BioX/Workflow/Command/run.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use File::Copy;
77

88
extends 'BioX::Workflow::Command';
99
use BioX::Workflow::Command::Utils::Traits qw(ArrayRefOfStrs);
10-
use BioX::Workflow::Command::run::Utils::Directives;
10+
use BioX::Workflow::Command::run::Rules::Directives;
1111

1212
with 'BioX::Workflow::Command::run::Utils::Samples';
1313
with 'BioX::Workflow::Command::run::Utils::Attributes';

lib/BioX/Workflow/Command/run/Utils/Directives.pm renamed to lib/BioX/Workflow/Command/run/Rules/Directives.pm

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
package BioX::Workflow::Command::run::Utils::Directives;
1+
package BioX::Workflow::Command::run::Rules::Directives;
22

33
use Moose;
4+
use namespace::autoclean;
5+
6+
with 'BioX::Workflow::Command::run::Rules::Directives::Types::HPC';
47

58
use BioX::Workflow::Command::Utils::Traits qw(ArrayRefOfStrs);
69
use MooseX::Types::Path::Tiny qw/Path Paths AbsPath AbsFile/;
@@ -14,18 +17,10 @@ use Scalar::Util 'blessed';
1417
use Try::Tiny;
1518
use Safe;
1619
use Storable qw(dclone);
17-
1820
# use File::Basename;
1921
use File::Spec;
20-
21-
use Moose::Util::TypeConstraints;
22-
class_type 'Path';
23-
class_type 'Paths';
24-
2522
use Memoize;
2623

27-
use namespace::autoclean;
28-
2924
our $c = new Safe;
3025

3126
=head2 File Options
@@ -443,6 +438,7 @@ sub create_attr {
443438
elsif($self->can($k)){
444439
next;
445440
}
441+
##TODO Clean this up for Types
446442
elsif ( $k =~ m/_list/ ) {
447443
$self->create_ITERABLE_attr( $meta, $k );
448444
}
@@ -661,6 +657,7 @@ sub my_broken {
661657
EOF
662658
}
663659

660+
##TODO Register Types
664661
sub walk_process_data {
665662
my $self = shift;
666663
my $keys = shift;
@@ -778,4 +775,5 @@ after 'BUILD' => sub {
778775
no Moose;
779776
__PACKAGE__->meta->make_immutable;
780777

778+
781779
1;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
use strict;
2+
use warnings;
3+
package BioX::Workflow::Command::run::Rules::Directives::Types;
4+
5+
1;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
use strict;
2+
use warnings;
3+
package BioX::Workflow::Command::run::Rules::Directives::Types::Array;
4+
5+
1;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
use strict;
2+
use warnings;
3+
package BioX::Workflow::Command::run::Rules::Directives::Types::CSV;
4+
5+
1;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
use strict;
2+
use warnings;
3+
package BioX::Workflow::Command::run::Rules::Directives::Types::Config;
4+
5+
1;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package BioX::Workflow::Command::run::Rules::Directives::Types::HPC;
2+
3+
use Moose::Role;
4+
5+
has 'HPC' => (
6+
is => 'rw',
7+
isa => 'HashRef|ArrayRef',
8+
default => sub { {} }
9+
);
10+
11+
1;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
use strict;
2+
use warnings;
3+
package BioX::Workflow::Command::run::Rules::Directives::Types::Hash;
4+
5+
1;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
use strict;
2+
use warnings;
3+
package BioX::Workflow::Command::run::Rules::Directives::Types::List;
4+
5+
1;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
use strict;
2+
use warnings;
3+
package BioX::Workflow::Command::run::Rules::Directives::Types::Path;
4+
5+
1;

0 commit comments

Comments
 (0)