Skip to content

Commit

Permalink
send program name tp the mlwh
Browse files Browse the repository at this point in the history
  • Loading branch information
sabrine33 committed Aug 9, 2024
1 parent 781eeb3 commit 2715eea
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
35 changes: 18 additions & 17 deletions app/api/io/study.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,27 @@ class Io::Study < Core::Io::Base

define_attribute_and_json_mapping(
'
name => name
ethically_approved => ethically_approved
state => state
abbreviation => abbreviation
name => name
ethically_approved => ethically_approved
state => state
abbreviation => abbreviation

Check warning on line 13 in app/api/io/study.rb

View check run for this annotation

Codecov / codecov/patch

app/api/io/study.rb#L10-L13

Added lines #L10 - L13 were not covered by tests
study_metadata.study_type.name => type
study_metadata.faculty_sponsor.name => sac_sponsor
study_metadata.reference_genome.name => reference_genome
study_metadata.study_ebi_accession_number => accession_number
study_metadata.study_description => description
study_metadata.study_abstract => abstract
study_metadata.study_type.name => type
study_metadata.faculty_sponsor.name => sac_sponsor
study_metadata.reference_genome.name => reference_genome
study_metadata.study_ebi_accession_number => accession_number
study_metadata.study_description => description
study_metadata.study_abstract => abstract

Check warning on line 20 in app/api/io/study.rb

View check run for this annotation

Codecov / codecov/patch

app/api/io/study.rb#L15-L20

Added lines #L15 - L20 were not covered by tests
study_metadata.contaminated_human_dna => contaminated_human_dna
study_metadata.remove_x_and_autosomes? => remove_x_and_autosomes
study_metadata.separate_y_chromosome_data => separate_y_chromosome_data
study_metadata.contains_human_dna => contains_human_dna
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_dna => contaminated_human_dna
study_metadata.remove_x_and_autosomes? => remove_x_and_autosomes
study_metadata.separate_y_chromosome_data => separate_y_chromosome_data
study_metadata.contains_human_dna => contains_human_dna
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

Check warning on line 28 in app/api/io/study.rb

View check run for this annotation

Codecov / codecov/patch

app/api/io/study.rb#L22-L28

Added lines #L22 - L28 were not covered by tests
study_metadata.contaminated_human_data_access_group => contaminated_human_data_access_group
study_metadata.program => program

Check warning on line 30 in app/api/io/study.rb

View check run for this annotation

Codecov / codecov/patch

app/api/io/study.rb#L30

Added line #L30 was not covered by tests
'
)
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 @@ -100,5 +100,6 @@ def render_class
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)
with_association(:program, lookup_by: :id) { map_attribute_to_json_attribute(:name, 'program') }

Check warning on line 103 in app/models/api/study_io.rb

View check run for this annotation

Codecov / codecov/patch

app/models/api/study_io.rb#L103

Added line #L103 was not covered by tests
end
end
2 changes: 2 additions & 0 deletions spec/models/api/study_io_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
array_express_accession_number: 'AE111',
ega_policy_accession_number: 'EGA222',
ega_dac_accession_number: 'DAC333',
program: create(:program, name: 'General'),
contaminated_human_data_access_group: 'contaminated human data access group test'
}
end
Expand Down Expand Up @@ -53,6 +54,7 @@
's3_email_list' => '[email protected];[email protected]',
'data_deletion_period' => '3 months',
'contaminated_human_data_access_group' => 'contaminated human data access group test',
'program' => 'General',
'manager' => [
{ login: manager.login, email: manager.email, name: manager.name },
{ login: manager2.login, email: manager2.email, name: manager2.name }
Expand Down

0 comments on commit 2715eea

Please sign in to comment.