-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into 1390-dpl-916-pbmc-donor-pooling-create-plate
- Loading branch information
Showing
57 changed files
with
2,346 additions
and
510 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Test compilation | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
env: | ||
BUNDLE_WITHOUT: 'test lint' | ||
|
||
jobs: | ||
Build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: nelonoel/[email protected] | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
|
||
# Actually run our build | ||
- name: Create Build | ||
run: ./compile-build | ||
|
||
# Create a release tag based on the branch name and .release-version file | ||
- name: Set release tag | ||
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable | ||
# On the develop branch this might create RELEASE_VERSION=2.4.6-987654321-develop | ||
# On the master branch this would then only create RELEASE_VERSION=2.4.6 | ||
run: echo "RELEASE_VERSION=$(printf -- '%s%s\n' $(cat .release-version) $([ ${BRANCH_NAME} = "develop" ] && printf -- '-%s-develop' ${GITHUB_RUN_ID} || echo ""))" >> $GITHUB_ENV | ||
|
||
# Do not actually save build or create release itself |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Javascript testing | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
js_test: | ||
runs-on: ubuntu-latest | ||
env: | ||
TZ: Europe/London | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- name: Node Information | ||
run: node --version | ||
- name: Install | ||
run: yarn install | ||
- name: Run yarn test | ||
run: yarn test | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
flags: javascript,${{ github.event_name }} | ||
fail_ci_if_error: true | ||
disable_search: true | ||
files: ${{ github.workspace }}/app/javascript/coverage/lcov.info | ||
# Note: see codecov.yml for more additional settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,9 +27,17 @@ jobs: | |
# example if you need more control over bundler. | ||
- name: Additional setup | ||
run: bin/setup | ||
- name: Test & publish code coverage | ||
- name: Run rspec | ||
run: bundle exec rspec | ||
- name: Publish code coverage to Code Climate | ||
uses: paambaati/[email protected] | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID || '1735fdb62543d410c5ed4469e402641a7986f1ebf62ff7398f3ab8ccc98069ef' }} | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
coverageCommand: bundle exec rspec | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
flags: ruby,${{ github.event_name }} | ||
fail_ci_if_error: true | ||
disable_search: true | ||
files: ${{ github.workspace }}/lcov.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.45.0 | ||
3.47.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
Copyright (c) 2011-2021 Genome Research Ltd. | ||
MIT License | ||
|
||
Author: | ||
Eduardo Martin Rojo <[email protected]> | ||
James Glover <[email protected]> | ||
Matthew Denner <[email protected]> | ||
Sean Dunn <[email protected]> | ||
Stephen Inglis <[email protected]> | ||
Yana Proskurina <[email protected]> | ||
Copyright (c) 2024 Wellcome Sanger Institute - PSD | ||
|
||
This program is free software: you can redistribute it and/or modify it under | ||
the terms of the GNU General Public License as published by the Free Software | ||
Foundation; either version 3 of the License, or (at your option) any later | ||
version. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
This program is distributed in the hope that it will be useful, but WITHOUT | ||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
details. | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
You should have received a copy of the GNU General Public License along with | ||
this program. If not, see <http://www.gnu.org/licenses/>. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
app/models/labware_creators/pcr_cycles_binned_plate/csv_file/duplex_seq/row.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# frozen_string_literal: true | ||
|
||
# Part of the Labware creator classes | ||
module LabwareCreators | ||
require_dependency 'labware_creators/pcr_cycles_binned_plate/csv_file_for_duplex_seq' | ||
|
||
module PcrCyclesBinnedPlate::CsvFile | ||
# | ||
# This version of the row is for the Duplex Seq pipeline. | ||
# | ||
class DuplexSeq::Row < RowBase | ||
include ActiveModel::Validations | ||
|
||
SUB_POOL_NOT_BLANK = 'has a value when Submit for Sequencing is N, it should be empty, in %s' | ||
SUBMIT_FOR_SEQ_INVALID = 'is empty or has an unrecognised value (should be Y or N), in %s' | ||
COVERAGE_MISSING = 'is missing but should be present when Submit for Sequencing is Y, in %s' | ||
COVERAGE_NEGATIVE = 'is negative but should be a positive value, in %s' | ||
|
||
attr_reader :submit_for_sequencing, :sub_pool, :coverage | ||
|
||
validate :submit_for_sequencing_has_expected_value | ||
validate :sub_pool_within_expected_range | ||
validates :coverage, | ||
presence: { | ||
message: ->(object, _data) { COVERAGE_MISSING % object } | ||
}, | ||
numericality: { | ||
greater_than: 0, | ||
message: ->(object, _data) { COVERAGE_NEGATIVE % object } | ||
}, | ||
unless: -> { empty? || !submit_for_sequencing? } | ||
|
||
delegate :submit_for_sequencing_column, :sub_pool_column, :coverage_column, to: :header | ||
|
||
def initialize_pipeline_specific_columns | ||
@submit_for_sequencing_as_string = @row_data[submit_for_sequencing_column]&.strip&.upcase | ||
@sub_pool = @row_data[sub_pool_column]&.strip&.to_i | ||
@coverage = @row_data[coverage_column]&.strip&.to_i | ||
end | ||
|
||
def submit_for_sequencing? | ||
@submit_for_sequencing ||= (@submit_for_sequencing_as_string == 'Y') | ||
end | ||
|
||
def submit_for_sequencing_has_expected_value | ||
return if empty? | ||
|
||
return if %w[Y N].include? @submit_for_sequencing_as_string | ||
|
||
errors.add('submit_for_sequencing', format(SUBMIT_FOR_SEQ_INVALID, to_s)) | ||
end | ||
|
||
def sub_pool_within_expected_range | ||
return if empty? | ||
|
||
# check the value is within range when we do expect a value to be present | ||
if submit_for_sequencing? | ||
in_range('sub_pool', sub_pool, @row_config.sub_pool_min, @row_config.sub_pool_max) | ||
else | ||
# expect sub-pool field to be blank, possible mistake by user if not | ||
return if sub_pool.blank? | ||
|
||
# sub-pool is NOT blank and should be | ||
errors.add('sub_pool', format(SUB_POOL_NOT_BLANK, to_s)) | ||
end | ||
end | ||
end | ||
end | ||
end |
34 changes: 34 additions & 0 deletions
34
...odels/labware_creators/pcr_cycles_binned_plate/csv_file/duplex_seq/well_details_header.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# frozen_string_literal: true | ||
|
||
# Part of the Labware creator classes | ||
module LabwareCreators | ||
require_dependency 'labware_creators/pcr_cycles_binned_plate/csv_file_for_duplex_seq' | ||
|
||
module PcrCyclesBinnedPlate::CsvFile | ||
# | ||
# Class WellDetailsHeader provides a simple wrapper for handling and validating | ||
# the plate barcode header row from the customer csv file | ||
# | ||
class DuplexSeq::WellDetailsHeader < WellDetailsHeaderBase | ||
# Return the index of the respective column. | ||
attr_reader :submit_for_sequencing_column, :sub_pool_column, :coverage_column | ||
|
||
SUBMIT_FOR_SEQUENCING_COLUMN = 'Submit for sequencing (Y/N)?' | ||
SUB_POOL_COLUMN = 'Sub-Pool' | ||
COVERAGE_COLUMN = 'Coverage' | ||
NOT_FOUND = 'could not be found in: ' | ||
|
||
validates :submit_for_sequencing_column, presence: { message: ->(object, _data) { "#{NOT_FOUND}'#{object}'" } } | ||
validates :sub_pool_column, presence: { message: ->(object, _data) { "#{NOT_FOUND}'#{object}'" } } | ||
validates :coverage_column, presence: { message: ->(object, _data) { "#{NOT_FOUND}'#{object}'" } } | ||
|
||
private | ||
|
||
def initialize_pipeline_specific_columns | ||
@submit_for_sequencing_column = index_of_header(SUBMIT_FOR_SEQUENCING_COLUMN) | ||
@sub_pool_column = index_of_header(SUB_POOL_COLUMN) | ||
@coverage_column = index_of_header(COVERAGE_COLUMN) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.