generated from ghga-de/microservice-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f262586
commit 3e9918e
Showing
22 changed files
with
549 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
tests/schemapack_/fixtures/example_content_schemas/Dataset.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"additionalProperties": false, | ||
"description": "A dataset that is a collection of files.", | ||
"properties": { | ||
"alias": { | ||
"type": "string" | ||
}, | ||
"dac_contact": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"alias" | ||
], | ||
"type": "object" | ||
} |
17 changes: 17 additions & 0 deletions
17
tests/schemapack_/fixtures/example_content_schemas/Experiment.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"additionalProperties": false, | ||
"description": "An experiment containing one or multiple samples.", | ||
"properties": { | ||
"alias": { | ||
"type": "string" | ||
}, | ||
"description": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"alias" | ||
], | ||
"type": "object" | ||
} |
30 changes: 30 additions & 0 deletions
30
tests/schemapack_/fixtures/example_content_schemas/File.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"additionalProperties": false, | ||
"description": "A file is an object that contains information generated from a process, either an Experiment or an Analysis.", | ||
"properties": { | ||
"alias": { | ||
"type": "string" | ||
}, | ||
"checksum": { | ||
"type": "string" | ||
}, | ||
"filename": { | ||
"type": "string" | ||
}, | ||
"format": { | ||
"type": "string" | ||
}, | ||
"size": { | ||
"type": "integer" | ||
} | ||
}, | ||
"required": [ | ||
"alias", | ||
"filename", | ||
"format", | ||
"checksum", | ||
"size" | ||
], | ||
"type": "object" | ||
} |
17 changes: 17 additions & 0 deletions
17
tests/schemapack_/fixtures/example_content_schemas/Sample.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"additionalProperties": false, | ||
"description": "A sample used to generate files in the context of an experiment.", | ||
"properties": { | ||
"alias": { | ||
"type": "string" | ||
}, | ||
"description": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"alias" | ||
], | ||
"type": "object" | ||
} |
56 changes: 56 additions & 0 deletions
56
tests/schemapack_/fixtures/example_data/advanced.datapack.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
datapack: 0.1.0 | ||
resources: | ||
File: | ||
file_a: | ||
content: | ||
alias: file_a | ||
filename: file_a.fastq | ||
format: FASTQ | ||
checksum: 1a5ac10ab42911dc0224172c118a326d9a4c03969112a2f3eb1ad971e96e92b8 | ||
size: 12321 | ||
file_b: | ||
content: | ||
alias: file_b | ||
filename: file_b.fastq | ||
format: FASTQ | ||
checksum: 2b5ac10ab42911dc0224172c118a326d9a4c03969112a2f3eb1ad971e96e92c9 | ||
size: 12314 | ||
file_c: | ||
content: | ||
alias: file_c | ||
filename: file_c.fastq | ||
format: FASTQ | ||
checksum: a9c24870071da03f78515e6197048f3a2172e90e597e9250cd01a0cb8f0986ed | ||
size: 12123 | ||
Dataset: | ||
dataset_1: | ||
content: | ||
alias: dataset_1 | ||
dac_contact: dac@example.org | ||
relations: | ||
files: | ||
- file_a | ||
- file_b | ||
- file_c | ||
Sample: | ||
sample_x: | ||
content: | ||
alias: sample_x | ||
relations: | ||
files: | ||
- file_a | ||
- file_b | ||
sample_y: | ||
content: | ||
alias: sample_y | ||
relations: | ||
files: | ||
- file_c | ||
Experiment: | ||
experiment_i: | ||
content: | ||
alias: experiment_i | ||
relations: | ||
samples: | ||
- sample_x | ||
- sample_y |
File renamed without changes.
31 changes: 31 additions & 0 deletions
31
tests/schemapack_/fixtures/example_models/advanced.schemapack.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# a simple schemapack with the content schemas being embedded | ||
schemapack: 0.1.0 | ||
classes: | ||
File: | ||
id: | ||
from_content: alias | ||
content: ../example_content_schemas/File.schema.json | ||
Dataset: | ||
id: | ||
from_content: alias | ||
content: ../example_content_schemas/Dataset.schema.json | ||
relations: | ||
files: | ||
to: File | ||
cardinality: many_to_many | ||
Sample: | ||
id: | ||
from_content: alias | ||
content: ../example_content_schemas/Sample.schema.json | ||
relations: | ||
files: | ||
to: File | ||
cardinality: one_to_many | ||
Experiment: | ||
id: | ||
from_content: alias | ||
content: ../example_content_schemas/Experiment.schema.json | ||
relations: | ||
samples: | ||
to: Sample | ||
cardinality: one_to_many |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
tests/schemapack_/fixtures/example_transformations/Readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!-- | ||
Copyright 2021 - 2023 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln | ||
for the German Human Genome-Phenome Archive (GHGA) | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
This directory contains test cases for testing builtin transformation. | ||
|
||
Names of sub-directories correspond to the transformation names. | ||
Each sub-sub-directory represents a test case. | ||
A test case is defined by following four files: | ||
- `config.yaml` - the transformation config | ||
- `input.datapack.yaml` - the input data for this transformation, if not present, | ||
the [../example_data/advanced.datapack.yaml](../example_data/advanced.datapack.yaml) | ||
is used | ||
- `input.schemapack.yaml` - the model for the input data, if not present, | ||
the | ||
[../example_models/advanced.schemapack.yaml](../example_models/advanced.schemapack.yaml) | ||
is used | ||
- `transformed.datapack.yaml` - the expected data output of the transformation | ||
- `transformed.schemapack.yaml` - the expected model output of the transformation |
5 changes: 5 additions & 0 deletions
5
...chemapack_/fixtures/example_transformations/infer_references/active_reference/config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
inferred_relations: | ||
Experiment: | ||
files: | ||
path: "Experiment(samples)>Sample(files)>File" | ||
expect_multiple: true |
60 changes: 60 additions & 0 deletions
60
...tures/example_transformations/infer_references/active_reference/transformed.datapack.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
datapack: 0.1.0 | ||
resources: | ||
File: | ||
file_a: | ||
content: | ||
alias: file_a | ||
filename: file_a.fastq | ||
format: FASTQ | ||
checksum: 1a5ac10ab42911dc0224172c118a326d9a4c03969112a2f3eb1ad971e96e92b8 | ||
size: 12321 | ||
file_b: | ||
content: | ||
alias: file_b | ||
filename: file_b.fastq | ||
format: FASTQ | ||
checksum: 2b5ac10ab42911dc0224172c118a326d9a4c03969112a2f3eb1ad971e96e92c9 | ||
size: 12314 | ||
file_c: | ||
content: | ||
alias: file_c | ||
filename: file_c.fastq | ||
format: FASTQ | ||
checksum: a9c24870071da03f78515e6197048f3a2172e90e597e9250cd01a0cb8f0986ed | ||
size: 12123 | ||
Dataset: | ||
dataset_1: | ||
content: | ||
alias: dataset_1 | ||
dac_contact: dac@example.org | ||
relations: | ||
files: | ||
- file_a | ||
- file_b | ||
- file_c | ||
Sample: | ||
sample_x: | ||
content: | ||
alias: sample_x | ||
relations: | ||
files: | ||
- file_a | ||
- file_b | ||
sample_y: | ||
content: | ||
alias: sample_y | ||
relations: | ||
files: | ||
- file_c | ||
Experiment: | ||
experiment_i: | ||
content: | ||
alias: experiment_i | ||
relations: | ||
samples: | ||
- sample_x | ||
- sample_y | ||
files: # <- | ||
- file_a | ||
- file_b | ||
- file_c |
33 changes: 33 additions & 0 deletions
33
...res/example_transformations/infer_references/active_reference/transformed.schemapack.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
schemapack: 0.1.0 | ||
classes: | ||
File: | ||
id: | ||
from_content: alias | ||
content: ../example_content_schemas/File.schema.json | ||
Dataset: | ||
id: | ||
from_content: alias | ||
content: ../example_content_schemas/Dataset.schema.json | ||
relations: | ||
files: | ||
to: File | ||
cardinality: many_to_many | ||
Sample: | ||
id: | ||
from_content: alias | ||
content: ../example_content_schemas/Sample.schema.json | ||
relations: | ||
files: | ||
to: File | ||
cardinality: one_to_many | ||
Experiment: | ||
id: | ||
from_content: alias | ||
content: ../example_content_schemas/Experiment.schema.json | ||
relations: | ||
samples: | ||
to: Sample | ||
cardinality: one_to_many | ||
files: # <- | ||
to: File | ||
cardinality: many_to_many |
5 changes: 5 additions & 0 deletions
5
...hemapack_/fixtures/example_transformations/infer_references/complex_reference/config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
inferred_relations: | ||
Dataset: | ||
samples: | ||
path: "Dataset(files)>File<(files)Sample" | ||
expected_multiple: true |
Oops, something went wrong.