owned this note
owned this note
Published
Linked with GitHub
### Manifest Changes for Versioning
#### Background
With the notion of Tale versions, we need a way to encode
1. The name of the version
2. The author of the version
3. The date that the version was last modified?
a. Is this relevant since it will be modified when it's recreated on import?
so that on Tale import the version can be re-created.
#### Proposed Change
In the spirit of keeping things schema.org compliant, we can make use of `schema:schemaVersion` and `schema:version`.
`schema:version` is currently used to describe the schema version, this needs to be changed to `schema:schemaVersion`.
```
schema:version: {
"@id": "https://girder.local.wholetale.org/api/v1/folder/600f0f02e1b8489f740af145",
"@type": "schema:Dataset",
"schema:name": "Version Where Things Work",
"schema:dateModified": "2021-01-22T04:27:57.064000+00:00"
"schema:author": {
"@id": "https://orcid.org/0000-0002-4291-7023",
"@type": "schema:Person",
"schema:givenName": "Christopher",
"schema:familyName": "Lortie"
}
}
```
Note that the range of `schema:version` _isn't_ the expcted schema.org _string or number_. The [docs](https://schema.org/docs/datamodel.html#conformance) state that although the domain is not expected in this case-tools shouldn't consider it an error.
Also note that [Dataset](https://schema.org/Dataset): `A body of structured information describing some topic(s) of interest.` is used as the version type.
##### Importing
While importing, we'll need to check if `schema:schemaVersion` exists. If it does, then we know that we're working with the "new" manifest format. If `schema:schemaVersion` doesn't exist then we know we're working with a legacy manifest and need to create a default version.
##### API Changes
The exporting API will need to be changed to take the name of the version as an optional parameter. Since names are unique, this should be a sensible way
#### Example
```
{
"@context": [
"https://w3id.org/bundle/context",
{
"schema": "http://schema.org/"
},
{
"DataCite": "http://datacite.org/schema/kernel-4"
},
{
"Datasets": {
"@type": "@id"
}
}
],
"@id": "https://data.wholetale.org/api/v1/tale/5d082326cc895d0f7434f937",
"createdOn": "2019-06-17 23:32:54.595000",
"schema:name": "Resource Selection Models on Species in the Carrizo Plain",
"schema:description": "#### Markdown Editor",
"schema:category": "Ecology",
"schema:identifier": "5d082326cc895d0f7434f937",
"schema:version": {
"@id": "https://girder.local.wholetale.org/api/v1/folder/600ba8e9887fc50ef7754ff3",
"@type": "schema:Dataset",
"schema:name": "Version 1",
"schema:dateModified": "2021-01-22T04:27:57.064000+00:00"
}
"schema:schemaVersion": 8
"schema:image": "https://github.com/cjlortie/Resource_selection_Carrizo/blob/master/bnll.jpg?raw=true",
"aggregates": [
{
"uri": "../data/workspace/data/Carrizo_telemetry_with_shrub_density.csv",
"md5": "60d2fef3a7ef2fc9729fe1826ec7219b",
"mimeType": "text/csv",
"size": 605920
},
{
"uri": "../data/workspace/data/data_no_replace.csv",
"md5": "757d05b35f72fb00941c6e178164fab0",
"mimeType": "text/csv",
"size": 852561
},
{
"uri": "../data/workspace/data/data_with_replace.csv",
"md5": "19508dcff2e097aa49a24b14077f6d70",
"mimeType": "text/csv",
"size": 2126873
},
{
"uri": "../data/workspace/data/Fishnet20m.shp",
"md5": "10153d6c9ea4ceda4e8eb152f28b1157",
"mimeType": "application/octet-stream",
"size": 11017188
},
{
"uri": "../data/workspace/data/log_odds.csv",
"md5": "32b460dacc5d914c411c3ef90d0ed317",
"mimeType": "text/csv",
"size": 199826
},
{
"uri": "../data/workspace/data/mcp20m.csv",
"md5": "dd1c642328147eef82a89e651ea5c387",
"mimeType": "text/csv",
"size": 1972240
},
{
"uri": "../data/workspace/data/odds.csv",
"md5": "f5f5906695a6fd3aa7f2814a31ba6fbb",
"mimeType": "text/csv",
"size": 466585
},
{
"uri": "../data/workspace/data/relocations.csv",
"md5": "7030636d2d0bbd2dabe3be6941a03c0a",
"mimeType": "text/csv",
"size": 328913
},
{
"uri": "../data/workspace/data/telemetryexportPR.shp",
"md5": "aea78f9bacf6e364d825b09015ed5885",
"mimeType": "application/octet-stream",
"size": 99360
},
{
"uri": "../data/workspace/data/tidy_data.csv",
"md5": "33a4764172972af2ef426203a01cd1a5",
"mimeType": "text/csv",
"size": 805720
},
{
"uri": "../data/workspace/results/index.html",
"md5": "46c94c3a004b684d244e6b9f207dfdc4",
"mimeType": "application/octet-stream",
"size": 4227312
},
{
"uri": "../data/workspace/index.Rmd",
"md5": "f0be107344cd9d172b3d9f3081a61959",
"mimeType": "application/octet-stream",
"size": 3733
},
{
"uri": "../data/workspace/README.md",
"md5": "13a4e2001d385eba135fe8140a7b7c0c",
"mimeType": "application/octet-stream",
"size": 143
},
{
"uri": "../data/workspace/wrangle.R",
"md5": "f420443e5540e096e936f10eb7ba8be6",
"mimeType": "application/octet-stream",
"size": 2187
},
{
"uri": "../data/workspace/run.sh",
"md5": "278dc56d9d36363d2d9ae21bdfcc1ba4",
"mimeType": "application/octet-stream",
"size": 102
},
{
"uri": "../data/workspace/install.R",
"md5": "0f05d97ee3e0eace1e6b4de553498b1d",
"mimeType": "application/octet-stream",
"size": 231
},
{
"uri": "../data/workspace/bnll.jpg",
"md5": "5305ef203de0a152f6caa8b31045888d",
"mimeType": "image/jpeg",
"size": 41001
},
{
"uri": "../data/LICENSE",
"schema:license": "CC-BY-4.0",
"md5": "81faaedac351f28092bd845a48c6d0a5",
"mimeType": "text/plain",
"size": 170
}
],
"Datasets": [],
"createdBy": {
"@id": "thelen@nceas.ucsb.edu",
"@type": "schema:Person",
"schema:givenName": "Thomas",
"schema:familyName": "T",
"schema:email": "thelen@nceas.ucsb.edu"
},
"schema:author": [
{
"@id": "https://orcid.org/0000-0002-4291-7023",
"@type": "schema:Person",
"schema:givenName": "Christopher",
"schema:familyName": "Lortie"
}
],
"DataCite:relatedIdentifiers": [],
"schema:hasPart": [
{
"@id": "https://github.com/whole-tale/repo2docker_wholetale",
"@type": "schema:SoftwareApplication",
"schema:softwareVersion": "wholetale/repo2docker_wholetale:v0.9"
}
]
}
```
#### Extending to Runs
In the future, we'll need to encode run information in the manifest. This location is naturally tied in with the version. Before implimenting the version changes to the manifest, we should make sure that we can sensibly encode run information in it.
##### Background
Runs have names and dates associated with them; these should be encoded in the manifest.
[schema:hasPart](https://schema.org/hasPart) can be used to denote that a version has a run within. The domain and range of `hasPart` is valid for schema:Dataset objects. Since a Run is a "topic of interest", the type of its manninfest object can be schema:Dataset.
###### Example
```
schema:version: {
"@id": "https://girder.local.wholetale.org/api/v1/folder/600f0f02e1b8489f740af145",
"@type": "schema:Dataset",
"schema:name": "Version Where Things Work",
"schema:dateModified": "2021-01-22T04:27:57.064000+00:00",
"schema:author": {
"@id": "https://orcid.org/0000-0002-4291-7023",
"@type": "schema:Person",
"schema:givenName": "Christopher",
"schema:familyName": "Lortie"
}
"schema:hasPart": {
"@id": "https://girder.local.wholetale.org/api/v1/folder/600a544da8bad312467f7684",
"@type": "schema:Dataset",
"schema:name": "My first recorded run",
"schema:dateCreated": "2021-02-22T04:27:57.064000+00:00"
}
}
```