Skip to content

Commit 5b36ba3

Browse files
authored
Merge pull request #35 from usegalaxy-eu/no_upload-fix
Generating md5 hash when not given with -no_upload flag
2 parents a7bc5d3 + b07f725 commit 5b36ba3

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ All supported arguments:
6666
--tool TOOL_NAME specify the name of the tool this submission is done with. Default: ena-upload-cli
6767
--tool_version TOOL_VERSION
6868
specify the version of the tool this submission is done with
69-
--no_upload Indicate if no upload should be performed and you like to submit a RUN object (e.g. if uploaded was done separately).
69+
--no_data_upload Indicate if no upload should be performed and you like to submit a RUN object (e.g. if uploaded was done separately).
7070
--secret SECRET .secret.yml file containing the password and Webin ID of your ENA account
7171
-d, --dev flag to use the dev/sandbox endpoint of ENA
7272
```
@@ -135,10 +135,10 @@ More information on how ENA wants to receive the files can be found [here](https
135135

136136
**Note for data upload:**
137137
Uploaded files are persistently stored on the ENA server after the upload for some time.
138-
Thus, if multiple test submission are performed, it is possible to skip the data upload with `--no_upload` in
138+
Thus, if multiple test submission are performed, it is possible to skip the data upload with `--no_data_upload` in
139139
subsequent submissions.
140140
This also allows uploading (large) datasets separately e.g. with [aspera](https://ena-docs.readthedocs.io/en/latest/submit/fileprep/upload.html).
141-
For the `--no_upload` argument, data file(s) still need to be provided with `--data`
141+
For the `--no_data_upload` argument, data file(s) still need to be provided with `--data`
142142
if a RUN object is submitted in order to generate MD5 sums.
143143

144144

ena_upload/ena_upload.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ def process_args():
613613
default=__version__,
614614
help='specify the version of the tool this submission is done with')
615615

616-
parser.add_argument('--no_upload',
616+
parser.add_argument('--no_data_upload',
617617
default=False,
618618
action="store_true",
619619
help='Indicate if no upload should be performed and you like to submit a RUN object (e.g. if uploaded was done separately).')
@@ -713,16 +713,12 @@ def main():
713713
# a dictionary of filename:file_path
714714
# ? do I have to define the absolute path
715715
df = schema_targets['run']
716-
717-
if args.no_upload:
718-
file_paths = {}
719-
print("No files will be uploaded, remove `--no_upload' argument to perform upload.")
720-
else: # check supplied datafiles only if doing upload
721-
file_paths = {os.path.basename(path): os.path.abspath(path)
722-
for path in args.data}
723-
# check if file names identical between command line and table
724-
# if not, system exits
725-
check_filenames(file_paths, df)
716+
717+
file_paths = {os.path.basename(path): os.path.abspath(path)
718+
for path in args.data}
719+
# check if file names identical between command line and table
720+
# if not, system exits
721+
check_filenames(file_paths, df)
726722

727723
# generate MD5 sum if not supplied in table
728724
if not check_file_checksum(df):
@@ -738,8 +734,10 @@ def main():
738734
schema_targets['run'] = df
739735

740736
# submit data to webin ftp server
741-
if not args.no_upload:
737+
if not args.no_data_upload:
742738
submit_data(file_paths, password, webin_id)
739+
else:
740+
print("No files will be uploaded, remove `--no_data_upload' argument to perform upload.")
743741

744742
# when adding sample
745743
# update schema_targets with taxon ids or scientific names

0 commit comments

Comments
 (0)