SIMSBIOHUB-562: Export Survey Data
Links to Jira Tickets
https://apps.nrs.gov.bc.ca/int/jira/browse/SIMSBIOHUB-562
Description of Changes
API
New endpoint that fetches and uploads survey data to s3, and returns a pre-signed url to download it.
APP
New dialog (under survey settings dropdown button) that allows users to execute an export. Currently restricted to project coordinators and collaborators (and system/data admins).
Testing Notes
Pre-req: S3 credentials in .env
From the settings button at the top of the survey page, clicking export pops a dialogue, which lets you choose which data to export. Data is exported to a zip file in S3, and immediately downloaded to the users local machine.
To Do
API
Currently the export only supports survey metadata and observations (which both just make a very basic select query, and leave the response as json).
APP
The dialogue is fairly basic, with no loading bars, etc, for longer exports. It also just auto-downloads the file, which is maybe not what we want if its large. Might be better to just show a link, and let the user trigger it in their browser separately.
Openshift URLs for the PR Deployment:
- App Route: https://biohubbc-app-1273-af2668-dev.apps.silver.devops.gov.bc.ca/
- Api Route: https://biohubbc-api-1273-af2668-dev.apps.silver.devops.gov.bc.ca/
- Pods: https://console.apps.silver.devops.gov.bc.ca/k8s/ns/af2668-dev/pods?name=1273
Codecov Report
Attention: Patch coverage is 73.03371% with 72 lines in your changes missing coverage. Please review.
Project coverage is 48.57%. Comparing base (
556ba8d) to head (0577889). Report is 1 commits behind head on dev.
Additional details and impacted files
@@ Coverage Diff @@
## dev #1273 +/- ##
==========================================
+ Coverage 48.28% 48.57% +0.28%
==========================================
Files 763 771 +8
Lines 20465 20704 +239
Branches 3124 3135 +11
==========================================
+ Hits 9882 10056 +174
- Misses 10431 10496 +65
Partials 152 152
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Quality Gate failed
Failed conditions
1 Security Hotspot
3.8% Duplication on New Code (required ≤ 3%)
Openshift URLs for the PR Deployment:
- App Route: https://biohubbc-app-1273-af2668-dev.apps.silver.devops.gov.bc.ca/
- Api Route: https://biohubbc-api-1273-af2668-dev.apps.silver.devops.gov.bc.ca/
- Pods: https://console.apps.silver.devops.gov.bc.ca/k8s/ns/af2668-dev/pods?name=1273
Quality Gate failed
Failed conditions
1 Security Hotspot
3.7% Duplication on New Code (required ≤ 3%)
Openshift URLs for the PR Deployment:
- App Route: https://biohubbc-app-1273-af2668-dev.apps.silver.devops.gov.bc.ca/
- Api Route: https://biohubbc-api-1273-af2668-dev.apps.silver.devops.gov.bc.ca/
- Pods: https://console.apps.silver.devops.gov.bc.ca/k8s/ns/af2668-dev/pods?name=1273
Added some unit tests
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
2.0% Duplication on New Code