Browse Source

initial commit

alecristia 1 year ago
parent
commit
b391937f5a

+ 1 - 0
.datalad/path

@@ -0,0 +1 @@
+/scratch1/data/laac_data/audio-test

+ 58 - 0
.datalad/procedures/setup.py

@@ -0,0 +1,58 @@
+#!/usr/bin/env python3
+
+import sys
+import os
+import re
+
+import datalad.api
+from datalad.distribution.dataset import require_dataset
+
+import argparse
+
+parser = argparse.ArgumentParser(description='setup the dataset siblings')
+parser.add_argument('path', help = 'path')
+parser.add_argument('--confidential', help = 'setup access to confidential data', action = 'store_true')
+
+args = parser.parse_args()
+
+ds = require_dataset(
+    args.path,
+    check_installed = True,
+    purpose = 'configuration'
+)
+
+datalad.api.siblings(
+    name = 'origin',
+    dataset = ds,
+    action = 'configure',
+    annex_wanted = '(include=*) and (exclude=**/confidential/*)',
+    annex_required = '(include=*) and (exclude=**/confidential/*)'
+)
+
+if args.confidential:
+    url = datalad.api.siblings(name = 'origin', dataset = ds)[0]['url']
+    confidential_url = os.path.splitext(url)[0] + '-confidential.git'
+
+    datalad.api.siblings(
+        name = 'confidential',
+        dataset = ds,
+        action = 'add',
+        url = confidential_url
+    )
+
+    datalad.api.siblings(
+        name = 'confidential',
+        dataset = ds,
+        action = 'configure',
+        annex_wanted = 'include=**/confidential/*',
+        annex_required = 'include=**/confidential/*'
+    )
+
+    datalad.api.siblings(
+        name = 'origin',
+        dataset = ds,
+        action = 'configure',
+        publish_depends = 'confidential'
+    )
+    
+

+ 4 - 0
.gitattributes

@@ -1,2 +1,6 @@
 * annex.backend=MD5E
 **/.git* annex.largefiles=nothing
+scripts/* annex.largefiles=nothing
+metadata/*.csv annex.largefiles=nothing
+recordings/* annex.largefiles=((mimeencoding=binary)and(largerthan=0))
+

+ 0 - 0
annotations/.gitignore


+ 0 - 0
extra/.gitignore


+ 0 - 0
metadata/.gitignore


+ 0 - 0
recordings/raw/.gitignore


+ 0 - 0
scripts/.gitignore