NBISweden / sda-cli

User command line interface for the SDA
GNU Affero General Public License v3.0
5 stars 1 forks source link

Enhance/download from file #420

Closed kostas-kou closed 3 months ago

kostas-kou commented 3 months ago

Related issue(s) and PR(s)
This PR closes #402

Description With this Pr the user will be able to provide a text file with file paths that wants to download. A new flag was (--from-file) and the fileCase function was modified for doing this. It was the easiest way in order to avoid dublicates.

How to test From the root folder run the setup script:

bash .github/integration/setup/setup.sh

and then run the following command:

./sda-cli sda-download -config testing/s3cmd-download.conf -dataset-id https://doi.example/ty009.sfrrss/600.45asasga -url http://localhost:8080 -outdir download-from-file --from-file testing/file-list.txt
codecov-commenter commented 3 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 26.92308% with 19 lines in your changes missing coverage. Please review.

Project coverage is 41.24%. Comparing base (2be8956) to head (dff9929).

Files Patch % Lines
sda_download/sda_download.go 28.00% 16 Missing and 2 partials :warning:
helpers/helpers.go 0.00% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #420 +/- ## ========================================== - Coverage 41.60% 41.24% -0.36% ========================================== Files 13 13 Lines 2031 2051 +20 ========================================== + Hits 845 846 +1 - Misses 1067 1084 +17 - Partials 119 121 +2 ``` | [Flag](https://app.codecov.io/gh/NBISweden/sda-cli/pull/420/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NBISweden) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/NBISweden/sda-cli/pull/420/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NBISweden) | `41.24% <26.92%> (-0.36%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NBISweden#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.