-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add minimal dtool dataset metadata schema (#4246)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Edwin Kofler <edwin@kofler.dev>
- Loading branch information
1 parent
0a558b6
commit 3931db8
Showing
4 changed files
with
132 additions
and
2 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
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
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,89 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://json.schemastore.org/dtool-dataset-metadata-1.0.json", | ||
"title": "DToolDataset", | ||
"description": "Schema for metadata attached to a dtool dataset", | ||
"type": "object", | ||
"properties": { | ||
"uuid": { | ||
"type": "string", | ||
"format": "uuid" | ||
}, | ||
"base_uri": { | ||
"type": "string" | ||
}, | ||
"uri": { | ||
"type": "string" | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"type": { | ||
"type": "string" | ||
}, | ||
"readme": { | ||
"anyOf": [ | ||
{ "type": "string" }, | ||
{ | ||
"type": "object", | ||
"additionalProperties": true | ||
} | ||
] | ||
}, | ||
"manifest": { | ||
"type": "object", | ||
"properties": { | ||
"items": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "object", | ||
"properties": { | ||
"hash": { | ||
"type": "string" | ||
}, | ||
"relpath": { | ||
"type": "string" | ||
}, | ||
"size_in_bytes": { | ||
"type": "integer" | ||
}, | ||
"utc_timestamp": { | ||
"type": "number" | ||
} | ||
} | ||
} | ||
}, | ||
"hash_function": { | ||
"type": "string" | ||
}, | ||
"dtoolcore_version": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"creator_username": { | ||
"type": "string" | ||
}, | ||
"frozen_at": { | ||
"anyOf": [{ "type": "string" }, { "type": "number" }] | ||
}, | ||
"created_at": { | ||
"anyOf": [{ "type": "string" }, { "type": "number" }] | ||
}, | ||
"annotations": { | ||
"type": "object" | ||
}, | ||
"tags": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"number_of_items": { | ||
"type": "integer" | ||
}, | ||
"size_in_bytes": { | ||
"type": "integer" | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/test/dtool-dataset-metadata-1.0/dtool-dataset-metadata-1.0.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,28 @@ | ||
{ | ||
"annotations": { | ||
"software": "bowtie2" | ||
}, | ||
"base_uri": "s3://snow-white", | ||
"creator_username": "olssont", | ||
"frozen_at": "1536238185.881941", | ||
"manifest": { | ||
"dtoolcore_version": "3.7.0", | ||
"hash_function": "md5sum_hexdigest", | ||
"items": { | ||
"e4cc3a7dc281c3d89ed4553293c4b4b110dc9bf3": { | ||
"hash": "d89117c9da2cc34586e183017cb14851", | ||
"relpath": "U00096.3.rev.1.bt2", | ||
"size_in_bytes": 5741810, | ||
"utc_timestamp": 1536832115.0 | ||
} | ||
} | ||
}, | ||
"name": "my-dataset", | ||
"number_of_items": 1, | ||
"readme": "---\ndescription: test dataset", | ||
"size_in_bytes": 5741810, | ||
"tags": ["rnaseq"], | ||
"type": "dataset", | ||
"uri": "s3://snow-white/af6727bf-29c7-43dd-b42f-a5d7ede28337", | ||
"uuid": "af6727bf-29c7-43dd-b42f-a5d7ede28337" | ||
} |