Skip to content

Commit

Permalink
Drop xml fixtures in tests for samplesheet generation (#753)
Browse files Browse the repository at this point in the history
* Samplesheet generation tests - move to mlwh driver.

Previously the tests uses XML feeds as a source of LIMS
data. All production code is using mlwh database as a
source of LIMS data. Amend tests to use mlwh data and
the default ml_warehouse lims driver.

Amended how an undefined sample public name is dealt with,
i.e. converted an error to a warning and assigned a sensible
fall-back value.

Some samplesheets are generated without names of study owners,
followers, etc. This is due to the fact that some studies
do not have fixtures for user data.

The database fixtures were generated from the current data,
this explains multiple differences between the old and new
content of the generated samplesheets.

In some tests newer production batches were used instead of
hand-crafted data.

Deleted tests for old scenarios that do not exist in production
any longer.

Deleted tests that are duplicated by similar tests with more
contemporary test data.

* Deleted now redundant XML test fixtures
  • Loading branch information
mgcam authored Sep 26, 2023
1 parent 3585391 commit d0ed22d
Show file tree
Hide file tree
Showing 157 changed files with 17,540 additions and 32,217 deletions.
151 changes: 6 additions & 145 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,10 @@ t/data/fixtures_stlims_wh/000-Study.yml
t/data/fixtures_stlims_wh/100-IseqFlowcell.yml
t/data/fixtures_stlims_wh/100-StudyUser.yml
t/data/fixtures_stlims_wh/200-IseqProductMetric.yml
t/data/fixtures_lims_wh_samplesheet/000-Sample.yml
t/data/fixtures_lims_wh_samplesheet/000-Study.yml
t/data/fixtures_lims_wh_samplesheet/100-StudyUser.yml
t/data/fixtures_lims_wh_samplesheet/100-IseqFlowcell.yml
t/data/gaii/staging/IL3/incoming/100622_IL3_01234/this_run_is_not_complete_yet
t/data/gaii/staging/IL5/incoming/not_a_dir
t/data/gaii/staging/IL999/incoming/100622_IL3_01234/Recipe_GA2-PEM_2x76Cycle_v7.7.xml
Expand Down Expand Up @@ -743,161 +747,18 @@ t/data/run_params/RunParameters.novaseq.xp.lite.xml
t/data/samplesheet/samplesheet_7753.csv
t/data/samplesheet/samplesheet_27483.csv
t/data/samplesheet/samplesheet_33990.csv
t/data/samplesheet/1control7libs_extended.csv
t/data/samplesheet/4pool4libs_extended.csv
t/data/samplesheet/6946_extended.csv
t/data/samplesheet/7007_extended.csv
t/data/samplesheet/8pools_extended.csv
t/data/samplesheet/dual_index_extended.csv
t/data/samplesheet/dual_index_default_new.csv
t/data/samplesheet/dual_index_extended_new.csv
t/data/samplesheet/miseq_default.csv
t/data/samplesheet/miseq_default_dual_index.csv
t/data/samplesheet/miseq_extended.csv
t/data/samplesheet/multilane.csv
t/data/samplesheet/novaseq_multirun.csv
t/data/samplesheet/st/batches/1.xml
t/data/samplesheet/st/batches/13994.xml
t/data/samplesheet/st/batches/14505.xml
t/data/samplesheet/st/batches/16537.xml
t/data/samplesheet/st/batches/16538.xml
t/data/samplesheet/st/batches/23798.xml
t/data/samplesheet/st/projects/1238.xml
t/data/samplesheet/st/projects/1366.xml
t/data/samplesheet/st/projects/1422.xml
t/data/samplesheet/st/projects/521.xml
t/data/samplesheet/st/projects/678.xml
t/data/samplesheet/st/projects/714.xml
t/data/samplesheet/st/samples/1255141.xml
t/data/samplesheet/st/samples/1289830.xml
t/data/samplesheet/st/samples/1289832.xml
t/data/samplesheet/st/samples/1289833.xml
t/data/samplesheet/st/samples/1289834.xml
t/data/samplesheet/st/samples/1289835.xml
t/data/samplesheet/st/samples/1289836.xml
t/data/samplesheet/st/samples/1289837.xml
t/data/samplesheet/st/samples/1289838.xml
t/data/samplesheet/st/samples/1289839.xml
t/data/samplesheet/st/samples/1289840.xml
t/data/samplesheet/st/samples/1289841.xml
t/data/samplesheet/st/samples/1289842.xml
t/data/samplesheet/st/samples/1289843.xml
t/data/samplesheet/st/samples/1392234.xml
t/data/samplesheet/st/samples/1392235.xml
t/data/samplesheet/st/samples/1392236.xml
t/data/samplesheet/st/samples/1392237.xml
t/data/samplesheet/st/samples/1392238.xml
t/data/samplesheet/st/samples/1660679.xml
t/data/samplesheet/st/samples/1660680.xml
t/data/samplesheet/st/samples/1694494.xml
t/data/samplesheet/st/samples/1694495.xml
t/data/samplesheet/st/samples/1694496.xml
t/data/samplesheet/st/samples/1694497.xml
t/data/samplesheet/st/samples/1694498.xml
t/data/samplesheet/st/samples/1694499.xml
t/data/samplesheet/st/samples/1706390.xml
t/data/samplesheet/st/samples/1706391.xml
t/data/samplesheet/st/samples/1706392.xml
t/data/samplesheet/st/samples/1706393.xml
t/data/samplesheet/st/samples/1706394.xml
t/data/samplesheet/st/samples/1706395.xml
t/data/samplesheet/st/samples/1706396.xml
t/data/samplesheet/st/samples/1706397.xml
t/data/samplesheet/st/samples/1706398.xml
t/data/samplesheet/st/samples/1706399.xml
t/data/samplesheet/st/samples/1706400.xml
t/data/samplesheet/st/samples/1706401.xml
t/data/samplesheet/st/samples/1706402.xml
t/data/samplesheet/st/samples/1706403.xml
t/data/samplesheet/st/samples/1706404.xml
t/data/samplesheet/st/samples/1706405.xml
t/data/samplesheet/st/samples/1706406.xml
t/data/samplesheet/st/samples/1706407.xml
t/data/samplesheet/st/samples/1706408.xml
t/data/samplesheet/st/samples/1706409.xml
t/data/samplesheet/st/samples/1706410.xml
t/data/samplesheet/st/samples/1706411.xml
t/data/samplesheet/st/samples/1706412.xml
t/data/samplesheet/st/samples/1706413.xml
t/data/samplesheet/st/samples/1706414.xml
t/data/samplesheet/st/samples/1706415.xml
t/data/samplesheet/st/samples/1706416.xml
t/data/samplesheet/st/samples/1706417.xml
t/data/samplesheet/st/samples/1706418.xml
t/data/samplesheet/st/samples/1706419.xml
t/data/samplesheet/st/samples/1706420.xml
t/data/samplesheet/st/samples/1706421.xml
t/data/samplesheet/st/samples/1706422.xml
t/data/samplesheet/st/samples/1706423.xml
t/data/samplesheet/st/samples/1706424.xml
t/data/samplesheet/st/samples/1706425.xml
t/data/samplesheet/st/samples/1706426.xml
t/data/samplesheet/st/samples/1706427.xml
t/data/samplesheet/st/samples/1706428.xml
t/data/samplesheet/st/samples/1706429.xml
t/data/samplesheet/st/samples/1706430.xml
t/data/samplesheet/st/samples/1706431.xml
t/data/samplesheet/st/samples/1706432.xml
t/data/samplesheet/st/samples/1706433.xml
t/data/samplesheet/st/samples/1706434.xml
t/data/samplesheet/st/samples/1706435.xml
t/data/samplesheet/st/samples/1706436.xml
t/data/samplesheet/st/samples/1706437.xml
t/data/samplesheet/st/samples/1706438.xml
t/data/samplesheet/st/samples/1706439.xml
t/data/samplesheet/st/samples/1706440.xml
t/data/samplesheet/st/samples/1706441.xml
t/data/samplesheet/st/samples/1706442.xml
t/data/samplesheet/st/samples/1706443.xml
t/data/samplesheet/st/samples/1706444.xml
t/data/samplesheet/st/samples/1706445.xml
t/data/samplesheet/st/samples/1706446.xml
t/data/samplesheet/st/samples/1706447.xml
t/data/samplesheet/st/samples/1706448.xml
t/data/samplesheet/st/samples/1706449.xml
t/data/samplesheet/st/samples/1706450.xml
t/data/samplesheet/st/samples/1706451.xml
t/data/samplesheet/st/samples/1706452.xml
t/data/samplesheet/st/samples/1706453.xml
t/data/samplesheet/st/samples/1706454.xml
t/data/samplesheet/st/samples/1706455.xml
t/data/samplesheet/st/samples/1706456.xml
t/data/samplesheet/st/samples/1706457.xml
t/data/samplesheet/st/samples/1706458.xml
t/data/samplesheet/st/samples/1706459.xml
t/data/samplesheet/st/samples/1706460.xml
t/data/samplesheet/st/samples/1706461.xml
t/data/samplesheet/st/samples/1706462.xml
t/data/samplesheet/st/samples/1706463.xml
t/data/samplesheet/st/samples/1706464.xml
t/data/samplesheet/st/samples/1706465.xml
t/data/samplesheet/st/samples/1706466.xml
t/data/samplesheet/st/samples/1706467.xml
t/data/samplesheet/st/samples/1706468.xml
t/data/samplesheet/st/samples/1706469.xml
t/data/samplesheet/st/samples/1706470.xml
t/data/samplesheet/st/samples/1706471.xml
t/data/samplesheet/st/samples/1706472.xml
t/data/samplesheet/st/samples/1706473.xml
t/data/samplesheet/st/samples/1706474.xml
t/data/samplesheet/st/samples/1706475.xml
t/data/samplesheet/st/samples/1706476.xml
t/data/samplesheet/st/samples/1706477.xml
t/data/samplesheet/st/samples/1706478.xml
t/data/samplesheet/st/samples/1706479.xml
t/data/samplesheet/st/samples/1706480.xml
t/data/samplesheet/st/samples/1706481.xml
t/data/samplesheet/st/samples/1706482.xml
t/data/samplesheet/st/samples/1706483.xml
t/data/samplesheet/st/samples/1706484.xml
t/data/samplesheet/st/samples/1706485.xml
t/data/samplesheet/st/samples/1712041.xml
t/data/samplesheet/st/studies/1697.xml
t/data/samplesheet/st/studies/198.xml
t/data/samplesheet/st/studies/1980.xml
t/data/samplesheet/st/studies/2239.xml
t/data/samplesheet/st/studies/2501.xml
t/data/samplesheet/st/studies/2658.xml
t/data/samplesheet/st/studies/521.xml
t/data/samplesheet/st/studies/700.xml
t/data/st_api_lims_new/st/assets/3033734.xml
t/data/st_api_lims_new/st/assets/3111688.xml
t/data/st_api_lims_new/st/batches/12141.xml
Expand Down
4 changes: 2 additions & 2 deletions lib/npg/samplesheet.pm
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,11 @@ sub _build__limsreflist {
foreach my $attr (qw/library_id sample_publishable_name/) {
my $value = _csv_compatible_value($tmpl->$attr);
if (!$value) {
croak sprintf '%s is not available for position %i %s',
carp sprintf '%s is not available for position %i %s',
$attr, $tmpl->position,
defined $tmpl->tag_index ? 'tag index ' . $tmpl->tag_index : q[];
}
if ($self->mkfastq) {
if (!$value || $self->mkfastq) {
# when making a samplesheet for mkfastq, replace value by run_position
$value = $self->id_run . q[_] . $tmpl->position;
if($self->_index_read) {
Expand Down
Loading

0 comments on commit d0ed22d

Please sign in to comment.