datalad / datalad-ukbiobank

Resources for working with UKBiobank as a DataLad dataset
MIT License
6 stars 12 forks source link

`ukb-update` fails with `--drop extracted` if only non-zip data types #69

Closed loj closed 3 years ago

loj commented 3 years ago

Sometimes (rarely) participants have only non-zip data types available for download. If --drop extracted is used in this case, it will fail with

Remote 'datalad-archives' is not available. Command failed:                                              
RemoteNotAvailableError: 'annex drop --in datalad-archives --branch incoming-native --json --json-error-messages'

This is understandable given that datalad-archives was never enabled.

To reproduce:

❱ datalad create sub-0001234 && cd sub-0001234

❱ datalad ukb-init --bids 0001234 25747_2_0 25748_2_0 25749_2_0 

❱ datalad -c datalad.ukbiobank.keyfile=none ukb-update --merge --drop extracted 
[INFO   ] == Command start (output follows) ===== 
sending incremental file list
0001234_25747_2_0.adv
         86.06K 100%   50.83MB/s    0:00:00 (xfr#1, to-chk=0/1)

sent 86.20K bytes  received 35 bytes  172.46K bytes/sec
total size is 86.06K  speedup is 1.00
sending incremental file list
0001234_25748_2_0.txt
        133.69K 100%   96.25MB/s    0:00:00 (xfr#1, to-chk=0/1)

sent 133.84K bytes  received 35 bytes  267.75K bytes/sec
total size is 133.69K  speedup is 1.00
sending incremental file list
0001234_25749_2_0.ed2
         75.36K 100%   40.61MB/s    0:00:00 (xfr#1, to-chk=0/1)

sent 75.49K bytes  received 35 bytes  151.04K bytes/sec
total size is 75.36K  speedup is 1.00
[INFO   ] == Command exit (modification check follows) ===== 
ukb_update(ok): . (dataset)                                                                              
ukb_bidsify(ok): 25747_2_0.adv (file)                                                                    
ukb_bidsify(ok): 25748_2_0.txt (file)
ukb_bidsify(ok): 25749_2_0.ed2 (file)
Remote 'datalad-archives' is not available. Command failed:                                              
RemoteNotAvailableError: 'annex drop --in datalad-archives --branch incoming-native --json --json-error-messages'