Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/download fileid #417

Merged
merged 6 commits into from
Jul 12, 2024
Merged

Feature/download fileid #417

merged 6 commits into from
Jul 12, 2024

Conversation

kostas-kou
Copy link
Contributor

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

Description
It was implemented in the sda_download that the user can download files by providing the file id.
This PR:

  • fixes the download path which was wrong when this case was used
  • added this case in the integration test
  • updated the readme file with info about downloading by providing the file id

How to test
Spin up containers by running:

bash .github/integration/setup/setup.sh

and then run:

./sda-cli sda-download -config testing/s3cmd-download.conf -dataset-id https://doi.example/ty009.sfrrss/600.45asasga -url http://localhost:8080 -outdir download-fileid urn:neic:001-001

and you should see the file in the download-fileid/main/subfolder/dummy_data path

When the file id is provided for downloading there is no filepath
argument so when the download function is called the file will be
downloaded and stored under the name of the file id and there will not
be stored in the filepath that it should
@kostas-kou kostas-kou requested a review from pahatz July 12, 2024 08:14
@kostas-kou kostas-kou self-assigned this Jul 12, 2024
Copy link
Contributor

@pahatz pahatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great!

sda_download/sda_download.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jul 12, 2024

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

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 41.60%. Comparing base (93e406c) to head (533cdcf).

Files Patch % Lines
sda_download/sda_download.go 83.33% 1 Missing ⚠️

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #417   +/-   ##
=======================================
  Coverage   41.60%   41.60%           
=======================================
  Files          13       13           
  Lines        2024     2024           
=======================================
  Hits          842      842           
  Misses       1063     1063           
  Partials      119      119           
Flag Coverage Δ
unittests 41.60% <83.33%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kostas-kou kostas-kou added this pull request to the merge queue Jul 12, 2024
Merged via the queue into main with commit 1bf0548 Jul 12, 2024
6 checks passed
@kostas-kou kostas-kou deleted the feature/download-fileid branch July 12, 2024 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Download file by giving the file id
3 participants