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

Dev/issue 11311 csv format check #620

Merged
merged 1 commit into from
Sep 20, 2017
Merged

Conversation

mcantelon
Copy link
Member

Added way to safeguard against users attempting to import non-CSV files as CSV.

Given any text file can technically be a CSV file, created logic to check the CSV header row and check what
column(s) are found to determine whether something seems like a legitimate CSV import.

  • Added check of CSV header columns when attempting CSV importing, looking for columns
    specific to type of data being imported
  • Got rid of necessity of having more than one CSV import/export config file for each type of data
  • Updated CSV import/export config files so there's a place to find out what CSV columns can be used:
    • Added CSV import/export config files for some data types that didn't have one
    • Added specification of what CSV columns exist to base CSV import/export config files

Copy link
Contributor

@jraddaoui jraddaoui left a comment

Choose a reason for hiding this comment

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

Looks great @mcantelon!

Please, make sure to merge with squash and reference the ticket in the commit message.

@qubot qubot force-pushed the dev/issue-11311-csv-format-check branch from 452d099 to d4ff46b Compare September 20, 2017 20:38
* Allow actor export without specifying a standard (so we don't have to have
  two import/export config YAML files when just one will work)
* Made flatfile export config file reading function accessible beyond the class
* Added more import/export config YAML files (to describe the CSV columns that
  can be used when importing for AtoM data types that you can't yet export
* Added check for a valid CSV file, factoring in what AtoM data type is being
  imported, before attempting to import (one needs to actually compare columns
  given an text file can technically be a CSV file)
@qubot qubot force-pushed the dev/issue-11311-csv-format-check branch from d4ff46b to fdc7e99 Compare September 20, 2017 20:39
@qubot qubot merged commit fdc7e99 into qa/2.5.x Sep 20, 2017
@qubot qubot deleted the dev/issue-11311-csv-format-check branch September 20, 2017 20:42
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.

3 participants