add repo templates, fix s3 export
This commit is contained in:
parent
b6053a4c47
commit
ad5eb5bbb6
|
|
@ -426,19 +426,21 @@ def export_to_s3(
|
||||||
# TODO: check if we can reuse a single bucket (or per study) with fileprefix
|
# TODO: check if we can reuse a single bucket (or per study) with fileprefix
|
||||||
# git-annex initremote remotename ...
|
# git-annex initremote remotename ...
|
||||||
remote_name = s3_url.hostname
|
remote_name = s3_url.hostname
|
||||||
bucket_name, path = pathlib.Path(s3_url.path).parts
|
_, bucket_name, *fileprefix = pathlib.Path(s3_url.path).parts
|
||||||
ds.repo.initremote(
|
fileprefix.append(session_metas['StudyInstanceUID']+'/')
|
||||||
|
ds.repo.init_remote(
|
||||||
remote_name,
|
remote_name,
|
||||||
S3_REMOTE_DEFAULT_PARAMETERS
|
S3_REMOTE_DEFAULT_PARAMETERS
|
||||||
+ [
|
+ [
|
||||||
f"host={s3_url.hostname}",
|
f"host={s3_url.hostname}",
|
||||||
f"bucket={bucket_name}",
|
f"bucket={bucket_name}",
|
||||||
f"fileprefix={'/'.join(path)}",
|
f"fileprefix={'/'.join(fileprefix)}",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
ds.repo.set_preferred_content(
|
ds.repo.set_preferred_content(
|
||||||
remote_name,
|
"wanted",
|
||||||
"include=**.{7z,tar.gz,zip}",
|
"include=*7z or include=*.tar.gz or include=*zip",
|
||||||
|
remote=remote_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
ds.push(to=remote_name)
|
ds.push(to=remote_name)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"files": [
|
||||||
|
"README"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
**/anat/*localizer*
|
||||||
|
**/anat/*scout*
|
||||||
|
**/*__dup*
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
qc/mriqc
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
**/.git* annex.largefiles=nothing
|
||||||
|
* annex.largefiles=(largerthan=100kb)
|
||||||
|
*.yml annex.largefiles=nothing
|
||||||
|
*.json annex.largefiles=nothing
|
||||||
|
*.txt annex.largefiles=nothing
|
||||||
|
*.tsv annex.largefiles=nothing
|
||||||
|
*.nii.gz annex.largefiles=anything
|
||||||
|
*.tgz annex.largefiles=anything
|
||||||
|
*_scans.tsv annex.largefiles=anything
|
||||||
|
# annex event files as they contain subjects behavioral responses
|
||||||
|
sub-*/**/*_events.tsv annex.largefiles=anything
|
||||||
|
*.bk2 annex.largefiles=anything
|
||||||
|
.bidsignore annex.largefiles=nothing
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
.pybids_cache/**
|
||||||
|
.heudiconv
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
include:
|
||||||
|
- project: 'unf/ni-dataops'
|
||||||
|
file:
|
||||||
|
- 'ci-pipelines/bids/bids_repo.yml'
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
# xyz dataset
|
||||||
|
|
||||||
|
## Contributors
|
||||||
|
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
||||||
|
<!-- prettier-ignore -->
|
||||||
|
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
**/.git* annex.largefiles=nothing
|
||||||
|
* annex.largefiles=(largerthan=100kb)
|
||||||
|
*.yml annex.largefiles=nothing
|
||||||
|
*.json annex.largefiles=nothing
|
||||||
|
*.txt annex.largefiles=nothing
|
||||||
|
*.tsv annex.largefiles=nothing
|
||||||
|
*.nii.gz annex.largefiles=anything
|
||||||
|
*.tgz annex.largefiles=anything
|
||||||
|
*_scans.tsv annex.largefiles=anything
|
||||||
|
# annex event files as they contain subjects behavioral responses
|
||||||
|
sub-*/**/*_events.tsv annex.largefiles=anything
|
||||||
|
*.bk2 annex.largefiles=anything
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
include:
|
||||||
|
- local: /ci-env.yml
|
||||||
|
- project: 'unf/ni-dataops'
|
||||||
|
file:
|
||||||
|
- 'ci-pipelines/sources/dicoms_study.yml'
|
||||||
Loading…
Reference in New Issue