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

Skip CSV output for x-y points #1198

Merged
merged 2 commits into from
Jun 16, 2023
Merged

Skip CSV output for x-y points #1198

merged 2 commits into from
Jun 16, 2023

Conversation

nfahlgren
Copy link
Member

Describe your changes
json2csv checks for list and tuple data types and unpacks them into a long-format CSV output file. But when the value is a list of tuples, for storing coordinates, it was outputting the comma-delimited coordinates into the CSV output, which caused the table to be parsed with an uneven number of columns.

This PR checks the type of the data contained in the enclosing list or tuple and skips it if it is also a list or tuple.

Type of update
Is this a: Bug fix

Associated issues
#1191

For the reviewer
See this page for instructions on how to review the pull request.

  • PR functionality reviewed in a Jupyter Notebook
  • All tests pass
  • Test coverage remains 100%
  • Documentation tested
  • New documentation pages added to plantcv/mkdocs.yml
  • Changes to function input/output signatures added to updating.md
  • Code reviewed
  • PR approved

@nfahlgren nfahlgren added the bugfix Bug fixes label Jun 15, 2023
@nfahlgren nfahlgren added this to the PlantCV v3.15 milestone Jun 15, 2023
@nfahlgren nfahlgren added this to In progress in PlantCV3 via automation Jun 15, 2023
@codecov
Copy link

codecov bot commented Jun 15, 2023

Codecov Report

Merging #1198 (6139ff3) into main (ee42f4f) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main     #1198   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          141       141           
  Lines         6023      6024    +1     
=========================================
+ Hits          6023      6024    +1     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

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

Impacted Files Coverage Δ
plantcv/utils/converters.py 100.00% <100.00%> (ø)

@nfahlgren nfahlgren merged commit 58777cb into main Jun 16, 2023
6 checks passed
PlantCV3 automation moved this from In progress to Done Jun 16, 2023
@nfahlgren nfahlgren deleted the fix-json2csv-coords branch June 16, 2023 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Bug fixes
Projects
No open projects
PlantCV3
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants