Skip to content

Commit

Permalink
Introduce a model of a Commit
Browse files Browse the repository at this point in the history
This is intentionally a Git Term. The `DataladDatasetVersion` is just an
alias. We should be able to declare it that way.
  • Loading branch information
mih committed Nov 28, 2023
1 parent 3a19088 commit 82711bd
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 32 deletions.
55 changes: 23 additions & 32 deletions src/examples/datalad-dataset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,38 +74,29 @@ graph:
outputs.txt:
content: MD5E-s4--ba1f2511fc30423bdbb183fe33f3dd0f.txt
type: file
# # annotate availability of the entire tree
# available_at:
# # map storage to storage-specific identifier
# # here the "remote" identifier is the same as for the tree, because
# # the storage is a clone of the repo
# - access: 27f0483a-8c70-11ee-b9d6-3b5dd1955fcc
# # the whole directory also exists as a copy in a remote zipfile
# # the zipfile only contains this directory
# - access: 6860c9e8-8c76-11ee-8f18-bb3625743f23
# storage_id: .
#
## particular dataset version
#- id: 7726424f50c6e9a70ba31e8d44c5d86fc46170da
# type: commit
# # entrypoint to the content
# content: fb715e5f3c368ae50cf16c9b6a8e5ca23a353ea4
# # some other metadata
# # the next too could be instances of an `Agent`
# author:
# - name: Michael Hanke
# - email: [email protected]
# creator:
# - name: Michael Hanke
# - email: [email protected]
# # ISO timestamp
# created: 2023-11-25T12:04:53+01:00
# # commit subject
# title: Initial commit
# # commit message body
# description: Something elaborate, as usual
# # previous versions
# parent_commits:

# particular dataset version
- id: 7726424f50c6e9a70ba31e8d44c5d86fc46170da
objtype: Commit
# entrypoint to the content
tree: fb715e5f3c368ae50cf16c9b6a8e5ca23a353ea4
# some other metadata
# the next too could be instances of an `Agent`
author:
name: Michael Hanke
email: [email protected]
committer:
name: Michael Hanke
email: [email protected]
# ISO timestamp
created: 2023-11-25T12:04:53+01:00
# commit subject
title: Initial commit
# commit message body
description: Something elaborate, as usual
# previous versions
# TODO we need the parent commits to have sortable versions
#parent_commits:

# object access methods
# they can be rather heterogeneous, different parameters, etc
Expand Down
39 changes: 39 additions & 0 deletions src/linkml/datalad-datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ id: https://concepts.datalad.org/datalad-datasets
name: datalad-datasets
prefixes:
dlco: https://concepts.datalad.org/
dct: http://purl.org/dc/terms/
imports:
- datasets
- types
Expand Down Expand Up @@ -168,6 +169,44 @@ classes:
- range: Directory
# TODO: commit/dataset

Commit:
is_a: TypedThing
mixins:
- IdentifiedThing
attributes:
tree:
# we want content to come in separate, identified records, always.
# this enables referencing across multiple containers (versions,
# datasets).
inlined: false
description: >-
Tree referenced by the commit.
range: Directory
author:
slot_uri: dct:author
# TODO dedicated class for a GitAgent
range: GitAgent
committer:
slot_uri: dct:creator
range: GitAgent
created:
slot_uri: dct:created
# TODO ISO date type
range: string
title:
range: string
description:
range: string

GitAgent:
description: >-
Agent representation in a Git context
attributes:
name:
range: string
email:
# TODO email
range: string

# DataladDataset:
# is_a: Dataset
Expand Down

0 comments on commit 82711bd

Please sign in to comment.