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

Improve all taxonomies (CSET and GMF) CSV export #3082

Conversation

pdcp1
Copy link
Collaborator

@pdcp1 pdcp1 commented Sep 5, 2024

Part of #3023
On top of #3030

This PR changes the way that we export taxonomies CSV files.
Now it iterates through all taxonomies on the taxa collection, dynamically generating a CSV file based on the fields of each taxonomy and the data from the classifications collection.

Based on the current data, it will produce these 5 CSV files:

  • classifications_CSETv0.csv
  • classifications_CSETv1.csv
  • classifications_CSETv1_Annotator-1.csv
  • classifications_CSETv1_Annotator-2.csv
  • classifications_CSETv1_Annotator-3.csv
  • classifications_GMF.csv

Testing

To test these changes, please go to the Pablo's fork repository and run the GitHub Action manually:
https://github.com/pdcp1/aiid/actions/workflows/db-backup.yml

The backup file will be uploaded to a public test Cloudflare bucket account. To access the backup file use the public URL https://pub-daddb16dc28841779b83690f75eb5c57.r2.dev/[backup file]
i.e.: https://pub-daddb16dc28841779b83690f75eb5c57.r2.dev/backup-20240905204113.tar.bz2

Copy link

codecov bot commented Sep 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.34%. Comparing base (4046eb3) to head (27a6feb).
Report is 3 commits behind head on staging.

Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #3082      +/-   ##
===========================================
+ Coverage    79.25%   79.34%   +0.09%     
===========================================
  Files          165      165              
  Lines        13263    13263              
  Branches      1524     1527       +3     
===========================================
+ Hits         10511    10523      +12     
+ Misses        2459     2447      -12     
  Partials       293      293              

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

Copy link
Collaborator

@cesarvarela cesarvarela left a comment

Choose a reason for hiding this comment

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

Anywhere I can see this working?

@pdcp1
Copy link
Collaborator Author

pdcp1 commented Sep 5, 2024

Anywhere I can see this working?

@cesarvarela Yes, I just updated the PR description with the testing instructions.

Copy link
Collaborator

@cesarvarela cesarvarela left a comment

Choose a reason for hiding this comment

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

Looks good; my only question is if the array notation is expected for lists in CSV files:

image

I think it is usually comma-separated and without quotes.

@pdcp1
Copy link
Collaborator Author

pdcp1 commented Sep 10, 2024

@cesarvarela It's ready for another review. Now it convert Array of values into comma-separated values as you suggested.
An example of CSV exports is here https://pub-daddb16dc28841779b83690f75eb5c57.r2.dev/backup-20240910002252.tar.bz2

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.

2 participants