Skip to content

Commit

Permalink
Merge pull request #28 from uc-cdis/fix/collections
Browse files Browse the repository at this point in the history
fix(collection): add test for collection link
  • Loading branch information
philloooo authored Dec 11, 2018
2 parents 2493453 + c49ca09 commit a2d5eb8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ rstr==2.2.6
-e git+https://[email protected]/NCI-GDC/cdisutils.git@8a8e599fdab5ade9bd8c586132d974a102e5d72d#egg=cdisutils
-e git+https://[email protected]/NCI-GDC/psqlgraph.git@7b5de7d56aa3159a9526940eb273579ddbf084ca#egg=psqlgraph
-e git+https://[email protected]/uc-cdis/data-simulator.git@c0bfbe7bdc2c3c15c0778b1be0254a76fd025d3f#egg=datasimulator
-e git+https://[email protected]/uc-cdis/[email protected].0#egg=gdcdatamodel
-e git+https://[email protected]/uc-cdis/[email protected].6#egg=gdcdatamodel
4 changes: 3 additions & 1 deletion dictionaryutils/schemas/metaschema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ definitions:
subgroup:
type: array
items:
$ref: "#/definitions/link"
oneOf:
- $ref: "#/definitions/link"
- $ref: "#/definitions/link_subgroup"

validator_def:
title: "Define a validator to be used on a property"
Expand Down
10 changes: 10 additions & 0 deletions tests/test_required_links.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from dictionaryutils import dictionary

def test_require_core_metadata_collections():
for schema in dictionary.schema.values():
if schema["category"].endswith("_file"):
assert (
"core_metadata_collections" in schema["properties"],
"core_metadata_collections is required for data node {}"
.format(schema["id"])
)

0 comments on commit a2d5eb8

Please sign in to comment.