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

fix: error handling for parsing iteration data files #2700

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

elit-altum
Copy link
Contributor

@elit-altum elit-altum commented Apr 8, 2021

This PR separately handles #2688 (comment)

  1. Uses the path.extname method for getting the extension of the file being used for providing iteration data -d
  2. If the filetype is .json -> liquidJSON is used to parse and report any errors.
  3. If the filetype is .csv -> parseCSV is used to parse and report any errors.
  4. If none, the fallback informs the user to use only .json/.csv files.

@shamasis @codenirvana Please review!

@codecov
Copy link

codecov bot commented Apr 8, 2021

Codecov Report

Merging #2700 (8ea83cb) into develop (2a57036) will increase coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2700      +/-   ##
===========================================
+ Coverage    91.55%   91.65%   +0.09%     
===========================================
  Files           21       21              
  Lines         1113     1114       +1     
  Branches       339      340       +1     
===========================================
+ Hits          1019     1021       +2     
+ Misses          94       93       -1     
Flag Coverage Δ
cli 82.22% <60.00%> (-0.17%) ⬇️
integration 41.83% <80.00%> (-0.13%) ⬇️
library 61.13% <100.00%> (+1.02%) ⬆️
unit 76.92% <60.00%> (-0.16%) ⬇️

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

Impacted Files Coverage Δ
lib/run/options.js 96.18% <100.00%> (+0.76%) ⬆️
lib/util.js 95.29% <100.00%> (+0.05%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a57036...8ea83cb. Read the comment docs.

@elit-altum
Copy link
Contributor Author

@codenirvana @shamasis Please review this once, if you find the time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants