You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To serve the HIP public space, the public.dataset.clone command and the clone_dataset(input_data, output_file)method need to be implemented.
Input(s)
input_data: Path to the input data file in JSON format with the following specified parameters:
"source_dataset": absolute path of the source dataset of the public space.
"target_dataset": absolute path of the directory of the private space where we want to clone the source dataset.
"target_version": version tag at which we want to checkout the cloned dataset
Output(s)
output_file: Path to the output file in JSON format generated by the command that contains the dataset summary or an error message.
Description
Clone a public a BIDS dataset to the private space of the user.
This should perform the following steps depicted in the diagram below:
Check if the target directory where the public dataset will be cloned already exists. If yes, return an error message.
Install / clone the public dataset with datalad install ....
Checkout the cloned dataset at the version tag specified by the parameter "target_version" specified in the input_data file
Get a summary of the cloned dataset in JSON format
Return the dataset summary in the output_file.
Process diagram for the clone_dataset(input_data, output_file) method
flowchart LR
in0(["input_data"])
c1{"Target dataset exists?"}
p2["Install/clone dataset with Datalad"]
p3["Checkout version tag on cloned dataset"]
p4["Get JSON dataset summary"]
out0(["output_file"])
err0(["error"])
subgraph "input"
in0
end
in0-->c1
subgraph "`clone_dataset()`"
c1-->|YES|p2-->p3-->p4
end
subgraph "output"
p4-->out0
c1-->|NO|err0
end
To serve the HIP public space, the
public.dataset.clonecommand and theclone_dataset(input_data, output_file)method need to be implemented.Input(s)
input_data: Path to the input data file in JSON format with the following specified parameters:"source_dataset": absolute path of the source dataset of the public space."target_dataset": absolute path of the directory of the private space where we want to clone the source dataset."target_version": version tag at which we want to checkout the cloned datasetOutput(s)
output_file: Path to the output file in JSON format generated by the command that contains the dataset summary or an error message.Description
Clone a public a BIDS dataset to the private space of the user.
This should perform the following steps depicted in the diagram below:
datalad install ...."target_version"specified in theinput_datafileoutput_file.Process diagram for the
clone_dataset(input_data, output_file)methodflowchart LR in0(["input_data"]) c1{"Target dataset exists?"} p2["Install/clone dataset with Datalad"] p3["Checkout version tag on cloned dataset"] p4["Get JSON dataset summary"] out0(["output_file"]) err0(["error"]) subgraph "input" in0 end in0-->c1 subgraph "`clone_dataset()`" c1-->|YES|p2-->p3-->p4 end subgraph "output" p4-->out0 c1-->|NO|err0 end