From cd668203a067311304bae6c888ca6c35d4e41415 Mon Sep 17 00:00:00 2001 From: Thanh Nguyen Date: Tue, 19 Mar 2019 23:47:10 -0500 Subject: [PATCH] feat(required): force some links required --- .travis.yml | 1 + gdcdictionary/schemas/imaging_file.yaml | 26 ++++++++--------- gdcdictionary/schemas/imaging_study.yaml | 3 +- .../schemas/submitted_unaligned_reads.yaml | 26 ++++++++--------- gdcdictionary/schemas/summary_drug_use.yaml | 26 ++++++++--------- gdcdictionary/schemas/summary_lab_result.yaml | 28 +++++++++---------- .../schemas/summary_mutation_panel.yaml | 3 +- .../schemas/summary_socio_demographic.yaml | 26 ++++++++--------- 8 files changed, 66 insertions(+), 73 deletions(-) diff --git a/.travis.yml b/.travis.yml index c8575b5..069995b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ python: before_script: - yes | python setup.py install - git clone https://github.com/uc-cdis/dictionaryutils; cd dictionaryutils +- git checkout c0ecf93c024ccc311ed8f02ed2df3b55fceae709 script: - ./run_tests.sh deploy: diff --git a/gdcdictionary/schemas/imaging_file.yaml b/gdcdictionary/schemas/imaging_file.yaml index eefc357..56b15e3 100644 --- a/gdcdictionary/schemas/imaging_file.yaml +++ b/gdcdictionary/schemas/imaging_file.yaml @@ -21,21 +21,18 @@ systemProperties: - updated_datetime links: - - exclusive: false + - name: core_metadata_collections + backref: imaging_files + label: data_from + target_type: core_metadata_collection + multiplicity: many_to_one + required: false + - name: imaging_exams + backref: imaging_files + label: data_for + target_type: imaging_exam + multiplicity: many_to_one required: true - subgroup: - - name: core_metadata_collections - backref: imaging_files - label: data_from - target_type: core_metadata_collection - multiplicity: many_to_one - required: false - - name: imaging_exams - backref: imaging_files - label: data_for - target_type: imaging_exam - multiplicity: many_to_one - required: false uniqueKeys: @@ -50,6 +47,7 @@ required: - data_format - md5sum - data_category + - imaging_exams properties: $ref: "_definitions.yaml#/data_file_properties" diff --git a/gdcdictionary/schemas/imaging_study.yaml b/gdcdictionary/schemas/imaging_study.yaml index 3d44b34..94ef95c 100644 --- a/gdcdictionary/schemas/imaging_study.yaml +++ b/gdcdictionary/schemas/imaging_study.yaml @@ -32,7 +32,7 @@ links: label: performed_at target_type: follow_up multiplicity: many_to_one - required: false + required: true uniqueKeys: @@ -43,6 +43,7 @@ required: - submitter_id - type - subjects + - follow_ups properties: $ref: "_definitions.yaml#/ubiquitous_properties" diff --git a/gdcdictionary/schemas/submitted_unaligned_reads.yaml b/gdcdictionary/schemas/submitted_unaligned_reads.yaml index a3a3a07..d73d7f2 100644 --- a/gdcdictionary/schemas/submitted_unaligned_reads.yaml +++ b/gdcdictionary/schemas/submitted_unaligned_reads.yaml @@ -22,21 +22,18 @@ systemProperties: - error_type links: - - exclusive: false + - name: core_metadata_collections + backref: submitted_unaligned_reads_files + label: data_from + target_type: core_metadata_collection + multiplicity: many_to_one + required: false + - name: read_groups + backref: submitted_unaligned_reads_files # pretty ugly + label: data_from + target_type: read_group + multiplicity: many_to_one required: true - subgroup: - - name: core_metadata_collections - backref: submitted_unaligned_reads_files - label: data_from - target_type: core_metadata_collection - multiplicity: many_to_one - required: false - - name: read_groups - backref: submitted_unaligned_reads_files # pretty ugly - label: data_from - target_type: read_group - multiplicity: many_to_one - required: false required: - type @@ -48,6 +45,7 @@ required: - data_type - data_format - experimental_strategy + - read_groups uniqueKeys: - [ id ] diff --git a/gdcdictionary/schemas/summary_drug_use.yaml b/gdcdictionary/schemas/summary_drug_use.yaml index 1049ee8..c017f50 100644 --- a/gdcdictionary/schemas/summary_drug_use.yaml +++ b/gdcdictionary/schemas/summary_drug_use.yaml @@ -21,21 +21,18 @@ systemProperties: - updated_datetime links: - - exclusive: false + - name: follow_ups + backref: summary_drug_uses + label: performed_at + target_type: follow_up + multiplicity: one_to_one required: true - subgroup: - - name: follow_ups - backref: summary_drug_uses - label: performed_at - target_type: follow_up - multiplicity: one_to_one - required: false - - name: treatments - backref: summary_drug_uses - label: associate_with - target_type: treatment - multiplicity: one_to_one - required: false + - name: treatments + backref: summary_drug_uses + label: associate_with + target_type: treatment + multiplicity: one_to_one + required: false uniqueKeys: - [id] @@ -44,6 +41,7 @@ uniqueKeys: required: - submitter_id - type + - follow_ups properties: $ref: "_definitions.yaml#/ubiquitous_properties" diff --git a/gdcdictionary/schemas/summary_lab_result.yaml b/gdcdictionary/schemas/summary_lab_result.yaml index b4ceecb..aa23ed1 100644 --- a/gdcdictionary/schemas/summary_lab_result.yaml +++ b/gdcdictionary/schemas/summary_lab_result.yaml @@ -28,22 +28,19 @@ systemProperties: - updated_datetime links: - - exclusive: false + - name: follow_ups + backref: summary_lab_results + label: performed_at + target_type: follow_up + multiplicity: one_to_one required: true - subgroup: - - name: follow_ups - backref: summary_lab_results - label: performed_at - target_type: follow_up - multiplicity: many_to_one - required: false - - - name: samples - backref: summary_lab_results - label: performed_on - target_type: sample - multiplicity: one_to_one - required: false + + - name: samples + backref: summary_lab_results + label: performed_on + target_type: sample + multiplicity: one_to_one + required: false uniqueKeys: - [id] @@ -52,6 +49,7 @@ uniqueKeys: required: - submitter_id - type + - follow_ups properties: $ref: "_definitions.yaml#/ubiquitous_properties" diff --git a/gdcdictionary/schemas/summary_mutation_panel.yaml b/gdcdictionary/schemas/summary_mutation_panel.yaml index aa8cb12..3f2925a 100644 --- a/gdcdictionary/schemas/summary_mutation_panel.yaml +++ b/gdcdictionary/schemas/summary_mutation_panel.yaml @@ -32,7 +32,7 @@ links: label: derived_from target_type: submitted_unaligned_reads multiplicity: many_to_one - required: false + required: true uniqueKeys: - [id] @@ -42,6 +42,7 @@ required: - submitter_id - type - subjects + - submitted_unaligned_reads_files properties: $ref: "_definitions.yaml#/ubiquitous_properties" diff --git a/gdcdictionary/schemas/summary_socio_demographic.yaml b/gdcdictionary/schemas/summary_socio_demographic.yaml index b9d30fb..d8e6fae 100644 --- a/gdcdictionary/schemas/summary_socio_demographic.yaml +++ b/gdcdictionary/schemas/summary_socio_demographic.yaml @@ -21,21 +21,18 @@ systemProperties: - updated_datetime links: - - exclusive: false + - name: subjects + backref: summary_socio_demographics + label: performed_on + target_type: subject + multiplicity: one_to_one + required: false + - name: follow_ups + backref: summary_socio_demographics + label: performed_at + target_type: follow_up + multiplicity: one_to_one required: true - subgroup: - - name: subjects - backref: summary_socio_demographics - label: performed_on - target_type: subject - multiplicity: one_to_one - required: false - - name: follow_ups - backref: summary_socio_demographics - label: performed_at - target_type: follow_up - multiplicity: one_to_one - required: false uniqueKeys: - [id] @@ -44,6 +41,7 @@ uniqueKeys: required: - submitter_id - type + - follow_ups properties: $ref: "_definitions.yaml#/ubiquitous_properties"