Skip to content

Commit

Permalink
SCHEMA: Add schema.rules.directories to specify directory layouts (bi…
Browse files Browse the repository at this point in the history
…ds-standard#1693)

* SCHEMA: Add schema.rules.directories to specify directory layouts

* Alternative layout

* ENH: Adopt the alternative structure, add derivative

* STY: Fix Latin and indentation
  • Loading branch information
effigies authored Feb 23, 2024
1 parent 830dbcb commit dcbcbbf
Showing 1 changed file with 112 additions and 0 deletions.
112 changes: 112 additions & 0 deletions src/schema/rules/directories.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
---
# This file defines layouts of directories.
#
# A layout defines a collection of directory specifiers.
# Each specifier has a naming convention, requirement level, opacity, and subdirectories.
#
# Naming conventions may take three forms:
# - name: The directory name has exactly this value.
# - entity: The directory name takes the form of {key}-{value} for the specified entity
# - value: The directory name takes the form of {value} for the specified term (like datatype)
#
# The requirement level indicates whether a directory MUST (required) or MAY (optional) exist.
#
# The opaque field indicates whether the contents of the directory are specified.
#
# The special "root" specifier describes the root of the dataset and only defines subdirectories.
# No naming convention applies, and the requirement level and opacity would be superfluous.
#
raw:
root:
subdirs:
- code
- derivatives
- phenotype
- sourcedata
- stimuli
- subject
code:
name: code
level: optional
opaque: true
derivatives:
name: derivatives
level: optional
opaque: true
phenotype:
name: phenotype
level: optional
opaque: false
sourcedata:
name: sourcedata
level: optional
opaque: true
stimuli:
name: stimuli
level: optional
opaque: true
subject:
entity: subject
level: required
opaque: false
subdirs:
- oneOf:
- session
- datatype
session:
entity: session
level: optional
opaque: false
subdirs:
- datatype
datatype:
value: datatype
level: required
opaque: false

derivative:
root:
subdirs:
- code
- derivatives
- phenotype
- sourcedata
- stimuli
- subject
code:
name: code
level: optional
opaque: true
derivatives:
name: derivatives
level: optional
opaque: true
phenotype:
name: phenotype
level: optional
opaque: false
sourcedata:
name: sourcedata
level: optional
opaque: true
stimuli:
name: stimuli
level: optional
opaque: true
subject:
entity: subject
level: optional
opaque: false
subdirs:
- session
- datatype
session:
entity: session
level: optional
opaque: false
subdirs:
- datatype
datatype:
value: datatype
level: optional
opaque: false

0 comments on commit dcbcbbf

Please sign in to comment.