Skip to content

Commit

Permalink
feat(collection): require at least one link
Browse files Browse the repository at this point in the history
  • Loading branch information
philloooo committed Dec 11, 2018
1 parent 95b4678 commit 6ea8418
Show file tree
Hide file tree
Showing 11 changed files with 131 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ python:
- '2.7'
before_script:
- yes | python setup.py install
- git clone https://github.com/uc-cdis/dictionaryutils; cd dictionaryutils
- git clone https://github.com/uc-cdis/dictionaryutils; cd dictionaryutils;
script:
- ./run_tests.sh
deploy:
Expand Down
3 changes: 0 additions & 3 deletions dev-requirements.txt

This file was deleted.

25 changes: 14 additions & 11 deletions gdcdictionary/schemas/aligned_reads_index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,21 @@ systemProperties:
- error_type

links:
- name: submitted_aligned_reads_files
backref: aligned_reads_indexes
label: derived_from
target_type: submitted_aligned_reads
multiplicity: one_to_one
- exclusive: false
required: true
- name: core_metadata_collections
backref: aligned_reads_indexes
label: data_from
target_type: core_metadata_collection
multiplicity: many_to_many
required: false
subgroup:
- name: submitted_aligned_reads_files
backref: aligned_reads_indexes
label: derived_from
target_type: submitted_aligned_reads
multiplicity: one_to_one
required: false
- name: core_metadata_collections
backref: aligned_reads_indexes
label: data_from
target_type: core_metadata_collection
multiplicity: many_to_many
required: false

required:
- submitter_id
Expand Down
21 changes: 16 additions & 5 deletions gdcdictionary/schemas/experimental_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,21 @@ systemProperties:
- error_type

links:
- name: experiments
backref: experiment_metadata_files
label: derived_from
target_type: experiment
multiplicity: many_to_many
- exclusive: false
required: true
subgroup:
- name: core_metadata_collections
backref: experiment_metadata_files
label: data_from
target_type: core_metadata_collection
multiplicity: many_to_many
required: false
- name: experiments
backref: experiment_metadata_files
label: derived_from
target_type: experiment
multiplicity: many_to_many
required: false

required:
- submitter_id
Expand Down Expand Up @@ -63,3 +72,5 @@ properties:
- string
experiments:
$ref: "_definitions.yaml#/to_one"
core_metadata_collections:
$ref: "_definitions.yaml#/to_many"
25 changes: 14 additions & 11 deletions gdcdictionary/schemas/slide_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,21 @@ systemProperties:
- error_type

links:
- name: slides
backref: slide_images
label: data_from
target_type: slide
multiplicity: many_to_one
- exclusive: false
required: true
- name: core_metadata_collections
backref: slide_images
label: data_from
target_type: core_metadata_collection
multiplicity: many_to_many
required: false
subgroup:
- name: slides
backref: slide_images
label: data_from
target_type: slide
multiplicity: many_to_one
required: false
- name: core_metadata_collections
backref: slide_images
label: data_from
target_type: core_metadata_collection
multiplicity: many_to_many
required: false

required:
- submitter_id
Expand Down
25 changes: 14 additions & 11 deletions gdcdictionary/schemas/submitted_aligned_reads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,21 @@ systemProperties:
- error_type

links:
- name: read_groups
backref: submitted_aligned_reads_files # pretty ugly
label: data_from
target_type: read_group
multiplicity: one_to_many
- exclusive: false
required: true
- name: core_metadata_collections
backref: submitted_aligned_reads_files
label: data_from
target_type: core_metadata_collection
multiplicity: many_to_many
required: false
subgroup:
- name: read_groups
backref: submitted_aligned_reads_files # pretty ugly
label: data_from
target_type: read_group
multiplicity: one_to_many
required: false
- name: core_metadata_collections
backref: submitted_aligned_reads_files
label: data_from
target_type: core_metadata_collection
multiplicity: many_to_many
required: false

required:
- submitter_id
Expand Down
37 changes: 24 additions & 13 deletions gdcdictionary/schemas/submitted_copy_number.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,30 @@ systemProperties:
- error_type

links:
- exclusive: true
- exclusive: false
required: true
subgroup:
- name: aliquots
backref: submitted_copy_number_files
label: derived_from
target_type: aliquot
multiplicity: one_to_one
required: false
- name: read_groups
backref: submitted_copy_number_files
label: derived_from
target_type: read_group
multiplicity: many_to_many
required: false
- name: core_metadata_collections
backref: submitted_copy_number_files
label: data_from
target_type: core_metadata_collection
multiplicity: many_to_many
required: false
- exclusive: true
required: false
subgroup:
- name: aliquots
backref: submitted_copy_number_files
label: derived_from
target_type: aliquot
multiplicity: one_to_one
required: false
- name: read_groups
backref: submitted_copy_number_files
label: derived_from
target_type: read_group
multiplicity: many_to_many
required: false

required:
- submitter_id
Expand Down Expand Up @@ -77,3 +86,5 @@ properties:
$ref: "_definitions.yaml#/to_one"
read_groups:
$ref: "_definitions.yaml#/to_many"
core_metadata_collections:
$ref: "_definitions.yaml#/to_many"
21 changes: 16 additions & 5 deletions gdcdictionary/schemas/submitted_methylation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,21 @@ systemProperties:
- error_type

links:
- name: aliquots
backref: submitted_methylation_files
label: data_from
target_type: aliquot
multiplicity: many_to_one
- exclusive: false
required: true
subgroup:
- name: core_metadata_collections
backref: submitted_methylation_files
label: data_from
target_type: core_metadata_collection
multiplicity: many_to_many
required: false
- name: aliquots
backref: submitted_methylation_files
label: data_from
target_type: aliquot
multiplicity: many_to_one
required: false

required:
- submitter_id
Expand Down Expand Up @@ -73,3 +82,5 @@ properties:
- Illumina Infinium HumanMethylation450K
aliquots:
$ref: "_definitions.yaml#/to_one"
core_metadata_collections:
$ref: "_definitions.yaml#/to_many"
23 changes: 17 additions & 6 deletions gdcdictionary/schemas/submitted_somatic_mutation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,21 @@ systemProperties:
- error_type

links:
- name: read_groups
backref: submitted_somatic_mutations
label: derived_from
target_type: read_group
multiplicity: many_to_many
required: true
- exclusive: false
required: true
subgroup:
- name: core_metadata_collections
backref: submitted_somatic_mutations
label: data_from
target_type: core_metadata_collection
multiplicity: many_to_many
required: false
- name: read_groups
backref: submitted_somatic_mutations
label: derived_from
target_type: read_group
multiplicity: many_to_many
required: false

required:
- submitter_id
Expand Down Expand Up @@ -70,3 +79,5 @@ properties:
type: integer
read_groups:
$ref: "_definitions.yaml#/to_many"
core_metadata_collections:
$ref: "_definitions.yaml#/to_many"
25 changes: 14 additions & 11 deletions gdcdictionary/schemas/submitted_unaligned_reads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,21 @@ systemProperties:
- error_type

links:
- name: read_groups
backref: submitted_unaligned_reads_files # pretty ugly
label: data_from
target_type: read_group
multiplicity: many_to_one
- exclusive: false
required: true
- name: core_metadata_collections
backref: submitted_unaligned_reads_files
label: data_from
target_type: core_metadata_collection
multiplicity: many_to_many
required: false
subgroup:
- name: read_groups
backref: submitted_unaligned_reads_files # pretty ugly
label: data_from
target_type: read_group
multiplicity: many_to_one
required: false
- name: core_metadata_collections
backref: submitted_unaligned_reads_files
label: data_from
target_type: core_metadata_collection
multiplicity: many_to_many
required: false

required:
- submitter_id
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'dictionaryutils',
],
dependency_links=[
"git+https://github.com/uc-cdis/dictionaryutils.git@11cfcb2c8bd579960c76f2b8136f8f00db7a3c01#egg=dictionaryutils",
"git+https://github.com/uc-cdis/dictionaryutils.git@2.0.4#egg=dictionaryutils",
],
package_data={
"gdcdictionary": [
Expand Down

0 comments on commit 6ea8418

Please sign in to comment.