Skip to content

Commit

Permalink
rf(schema): Drop context.dataset.files (#1883)
Browse files Browse the repository at this point in the history
* fix(schema): Use exists() function instead of comparing to dataset.files

* rf(schema): Drop context.dataset.files; exists() is cleaner

* schema: Bump schema minor version
  • Loading branch information
effigies authored Aug 5, 2024
1 parent d2557e3 commit 3892f8e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/schema/SCHEMA_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.1-dev
0.11.0-dev
3 changes: 0 additions & 3 deletions src/schema/meta/context.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ properties:
dataset_description:
description: 'Contents of /dataset_description.json'
type: object
files:
description: 'List of all files in dataset'
type: array
tree:
description: 'Tree view of all files in dataset'
type: object
Expand Down
2 changes: 1 addition & 1 deletion src/schema/rules/checks/dataset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ SamplesTSVMissing:
- path == '/dataset_description.json'
- '"micr" in dataset.modalities'
checks:
- "'samples.tsv' in dataset.files"
- exists('samples.tsv', 'dataset')

UnknownVersion:
issue:
Expand Down
2 changes: 1 addition & 1 deletion src/schema/rules/dataset_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ derivative_description:
dataset_description_with_genetics:
selectors:
- path == "/dataset_description.json"
- intersects(dataset.files, ["/genetic_info.json"])
- exists('genetic_info.json', 'dataset')
fields:
Genetics: required

Expand Down

0 comments on commit 3892f8e

Please sign in to comment.