NBISweden / sda-cli

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

List datasets more info #444

Closed MalinAhlberg closed 3 months ago

MalinAhlberg commented 3 months ago

Related issue(s) and PR(s)
This PR closes #438 .

Description sda-cli list -datasets will print number of files and dataset size:

DatasetID                                    Files   Size
https://doi.example/ty009.sfrrss/600.45asasga    3   3.1 MB
https://doi.example/ty009.sfrrss/Dataset         1   1.1 MB

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

bash .github/integration/setup/setup.sh

(note to future self: if it does not work, remove all containers and run docker volume rm -f $(docker volume ls -f "dangling=true")). Then run:

./sda-cli list -config testing/s3cmd-download.conf -datasets -url http://localhost:8080 

And get

DatasetID                                    Files   Size
https://doi.example/ty009.sfrrss/600.45asasga    3   3.1 MB
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 0% with 19 lines in your changes missing coverage. Please review.

Project coverage is 38.79%. Comparing base (d24ea15) to head (d9de7b2).

Files with missing lines Patch % Lines
list/list.go 0.00% 19 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 #444 +/- ## ========================================== - Coverage 39.04% 38.79% -0.25% ========================================== Files 11 11 Lines 1903 1915 +12 ========================================== Hits 743 743 - Misses 1048 1060 +12 Partials 112 112 ``` | [Flag](https://app.codecov.io/gh/NBISweden/sda-cli/pull/444/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/444/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NBISweden) | `38.79% <0.00%> (-0.25%)` | :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.