Skip to content

Commit

Permalink
rename src/ to lab/ as legacy algorithm laboratory
Browse files Browse the repository at this point in the history
  • Loading branch information
ikluft committed Sep 6, 2024
1 parent 0fed3dd commit 872434e
Show file tree
Hide file tree
Showing 116 changed files with 17 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test-perl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Perl
# yamllint disable rule:line-length
on: # yamllint disable-line rule:truthy
push:
paths: ['src/perl/**', '.github/workflows/test-perl.yml']
paths: ['lab/perl/**', '.github/workflows/test-perl.yml']
pull_request:
paths: ['src/perl/**', '.github/workflows/test-perl.yml']
paths: ['lab/perl/**', '.github/workflows/test-perl.yml']
workflow_dispatch:
# schedule:
# - cron: '42 5 * * *'
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
my $retcode = system( "cpanm", "--notest", @deps );
return (($retcode >> 8) == 0);
}
chdir "src/perl";
chdir "lab/perl";
my $topdir = getcwd();
my $success = 1;
for my $subdir ( qw(prefvote stv schulze rankedpairs) ) {
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
run: |
use feature qw(say);
use POSIX qw(getcwd);
chdir "src/perl";
chdir "lab/perl";
my $topdir = getcwd();
$ENV{PERL5LIB} .= ":$topdir/prefvote/lib";
my $success = 1;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ sub compute_condorcet
}
}

# set result order


# TODO
return;
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/acr-compare
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use IPC::Run qw(run);
Readonly::Array my @methods => qw(Core STV Schulze RankedPairs);
Readonly::Scalar my $pvroot => dirname($FindBin::RealBin);
Readonly::Scalar my $datadir => "$pvroot/test/inputs/100-rcv-test";
Readonly::Scalar my $count_script => "$pvroot/src/perl/prefvote/bin/vote-count";
Readonly::Scalar my $count_script => "$pvroot/lab/perl/prefvote/bin/vote-count";

# global flags
my $html_mode = 0;
Expand Down
2 changes: 1 addition & 1 deletion test/blackbox-recalibrate
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use IPC::Run qw(run);
Readonly::Array my @methods => qw(Core STV Schulze RankedPairs);
Readonly::Scalar my $progname => $0;
Readonly::Scalar my $pvroot => dirname($Bin);
Readonly::Scalar my $count_script => "$pvroot/src/perl/prefvote/bin/vote-count";
Readonly::Scalar my $count_script => "$pvroot/lab/perl/prefvote/bin/vote-count";

# configuration
$YAML::InlineSeries = 10;
Expand Down
14 changes: 7 additions & 7 deletions test/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@ Readonly::Hash my %config => (
build => 'dzil build',
whitebox => {
dirs => {
Core => '${pvroot}/src/perl/prefvote',
STV => '${pvroot}/src/perl/stv',
Schulze => '${pvroot}/src/perl/schulze',
RankedPairs => '${pvroot}/src/perl/rankedpairs',
Core => '${pvroot}/lab/perl/prefvote',
STV => '${pvroot}/lab/perl/stv',
Schulze => '${pvroot}/lab/perl/schulze',
RankedPairs => '${pvroot}/lab/perl/rankedpairs',
},
testdir => "t",
test_re => qr{\.t$},
tp_args => [switches => ['-Isrc/perl/prefvote/lib', '-Ilib']],
tp_args => [switches => ['-Ilab/perl/prefvote/lib', '-Ilib']],
},
prove_params => "--lib",
blackbox => {
env => {
PERL5LIB => '${cwd}/prefvote/lib:${cwd}/stv/lib:${env/PERL5LIB}',
},
cmd => [ '${pvroot}/src/perl/prefvote/bin/vote-count', "--test", '--method=${var/method}'],
tp_args => [switches => ['-Isrc/perl/prefvote/lib', '-Isrc/perl/stv/lib']],
cmd => [ '${pvroot}/lab/perl/prefvote/bin/vote-count', "--test", '--method=${var/method}'],
tp_args => [switches => ['-Ilab/perl/prefvote/lib', '-Ilab/perl/stv/lib']],
}
},
rust => {
Expand Down
2 changes: 1 addition & 1 deletion test/test-overview
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use IPC::Run qw(run);
# constants
Readonly::Array my @methods => qw(Core STV Schulze RankedPairs);
Readonly::Scalar my $pvroot => dirname($FindBin::RealBin);
Readonly::Scalar my $count_script => "$pvroot/src/perl/prefvote/bin/vote-count";
Readonly::Scalar my $count_script => "$pvroot/lab/perl/prefvote/bin/vote-count";
Readonly::Scalar my $acr_compare_script => "$pvroot/test/acr-compare";
Readonly::Array my @yaml_suffixes => qw(.yaml .yml);
Readonly::Scalar my $markdown_suffix => ".md";
Expand Down

0 comments on commit 872434e

Please sign in to comment.