Skip to content

Commit

Permalink
Merge pull request #4260 from sanger/develop
Browse files Browse the repository at this point in the history
develop into master
  • Loading branch information
sabrine33 authored Aug 7, 2024
2 parents 086d505 + e6077fe commit 7563bba
Show file tree
Hide file tree
Showing 21 changed files with 255 additions and 190 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/check_docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ jobs:

- name: Build image
run: >-
docker-compose build
docker compose build
- name: Start stack and wait for all healthy
run: |
RESET_DATABASE=true docker-compose -f docker-compose.yml up &
while docker-compose ps -q | xargs docker inspect --format '{{ .State.Health.Status }}' | grep -v '^healthy$' ; do
RESET_DATABASE=true docker compose -f docker-compose.yml up &
while docker compose ps -q | xargs docker inspect --format '{{ .State.Health.Status }}' | grep -v '^healthy$' ; do
sleep 30
echo "Waiting for healthy containers"
done
timeout-minutes: 5

- name: Stop stack
run: >-
docker-compose down
docker compose down
2 changes: 1 addition & 1 deletion .release-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.39.0
14.40.0
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ GEM
bootsnap (1.18.3)
msgpack (~> 1.2)
builder (3.3.0)
bullet (7.1.6)
bullet (7.2.0)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
bunny (2.22.0)
Expand Down Expand Up @@ -279,7 +279,7 @@ GEM
minitest-profiler (0.0.2)
activesupport (>= 4.1.0)
minitest (>= 5.3.3)
mocha (2.4.0)
mocha (2.4.5)
ruby2_keywords (>= 0.0.5)
msgpack (1.7.2)
multi_json (1.15.0)
Expand Down Expand Up @@ -387,7 +387,7 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.3.1)
rexml (3.3.4)
strscan
roo (2.10.1)
nokogiri (~> 1)
Expand Down Expand Up @@ -560,7 +560,7 @@ GEM
backports (>= 3.18)
rainbow
yard
zeitwerk (2.6.16)
zeitwerk (2.6.17)

PLATFORMS
arm64-darwin
Expand Down
1 change: 1 addition & 0 deletions app/api/io/study.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Io::Study < Core::Io::Base
study_metadata.commercially_available => commercially_available
study_metadata.data_release_study_type.name => data_release_sort_of_study
study_metadata.data_release_strategy => data_release_strategy
study_metadata.contaminated_human_data_access_group => contaminated_human_data_access_group
'
)
end
1 change: 1 addition & 0 deletions app/models/api/study_io.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,6 @@ def render_class
map_attribute_to_json_attribute(:hmdmc_approval_number, 'hmdmc_number')
map_attribute_to_json_attribute(:s3_email_list)
map_attribute_to_json_attribute(:data_deletion_period)
map_attribute_to_json_attribute(:contaminated_human_data_access_group)
end
end
5 changes: 5 additions & 0 deletions app/models/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,11 @@ def product_line
def manifest_processed!
end

def self.get_all_comments(request)
counts = Comment.counts_for_requests([request])
counts[request.id]
end

private

def calculate_next_request_type_id
Expand Down
1 change: 1 addition & 0 deletions app/models/study.rb
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ class Study < ApplicationRecord # rubocop:todo Metrics/ClassLength
# External Customers
custom_attribute(:s3_email_list)
custom_attribute(:data_deletion_period)
custom_attribute(:contaminated_human_data_access_group)

REMAPPED_ATTRIBUTES =
{
Expand Down
2 changes: 1 addition & 1 deletion app/views/requests/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% add :about, "This page displays details of requests" %>
<% add :menu, "View event history" => history_request_path(@request) -%>
<% add :menu, (pluralize @request.comments.size, "comment") => request_comments_path(@request) -%>
<% add :menu, (pluralize Request.get_all_comments(@request), "comment") => request_comments_path(@request) -%>
<% if can?(:cancel, @request) && @request.try(:may_cancel_before_started?) %>
<% add :menu, { "Cancel" => cancel_request_url(@request) }, { confirm: "Are you sure you want to cancel this request?" } -%>
Expand Down
4 changes: 2 additions & 2 deletions app/views/shared/_batch.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
<% end %>

<td><%= request.state.humanize %></td>

<td><%= link_to (pluralize request.comments.size, 'comment'), request_comments_url(request) %></td>
<td><%= link_to (pluralize Request.get_all_comments(request), 'comment'), request_comments_url(request) %></td>

</tr>
<% end -%>
Expand Down
1 change: 1 addition & 0 deletions app/views/shared/metadata/edit/_study.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<%= metadata_fields.text_field(:s3_email_list) %>
<%= metadata_fields.select(:data_deletion_period, ['','3 months']) %>
<%= metadata_fields.text_field(:contaminated_human_data_access_group) %>
<% metadata_fields.finalize_related_fields %>
<% end %>
Expand Down
1 change: 1 addition & 0 deletions app/views/shared/metadata/show/_study.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<% end %>
<%= metadata_fields.plain_value(:dac_policy_title) %>
<%= metadata_fields.plain_value(:dac_policy) %>
<%= metadata_fields.plain_value(:contaminated_human_data_access_group) %>
<% end %>
<% end %>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ limber_scrna_core_cdna_prep_input:
- LRC PBMC Pools Input
library_types:
- Chromium single cell GEM-X 5p v3 GE
limber_scrna_core_chromium_gem_x_5p_aggregation:
name: scRNA Core Chromium GEM-X 5p Aggregation
limber_scrna_core_aggregation:
name: scRNA Core Aggregation
asset_type: Well
order: 1
request_class_name: CustomerRequest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Submission templates for the aggregation and library prep parts of the scRNA Core pipeline.
---
Limber-Htp - scRNA Core Chromium GEM-X 5p Aggregation:
Limber-Htp - scRNA Core Aggregation:
submission_class_name: "LinearSubmission"
related_records:
request_type_keys: ["limber_scrna_core_chromium_gem_x_5p_aggregation"]
request_type_keys: ["limber_scrna_core_aggregation"]
product_line_name: Short Read
product_catalogue_name: scRNA Core
Limber-Htp - scRNA Core Library Prep:
Expand Down
3 changes: 3 additions & 0 deletions config/locales/metadata/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,9 @@ en:
data_deletion_period:
label: Data deletion period

contaminated_human_data_access_group:
label: Contaminated Human Data Access Group
help: "Allows specified Unix groups and users access to data segregated from the main data product, which is potentially contaminated with human data. This access is typically rarely used and is primarily for validating the separation process, as we may not have the ethical or legal clearance."
project:
metadata:
project_manager_id:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# frozen_string_literal: true
class AddContaminatedHumanDataAccessGroupToStudyMetadata < ActiveRecord::Migration[6.1]
def change
add_column :study_metadata, :contaminated_human_data_access_group, :string, default: nil
end
end
Loading

0 comments on commit 7563bba

Please sign in to comment.