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

update findCsvFiles fn and add pkg.json scripts for parsing csv files #264

Merged
merged 5 commits into from
Nov 16, 2019

Conversation

ebrahim-2
Copy link
Contributor

@ebrahim-2 ebrahim-2 commented Nov 16, 2019

Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

What types of changes does your code introduce to static food data?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Further comments

PR purpose:
1- update findCsvFiles fn
2- create a pkg.json script for every dataset to parse CSV files
3- fix the raw path problem

@codeclimate
Copy link

codeclimate bot commented Nov 16, 2019

Code Climate has analyzed commit 6f31e0a and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

View more on Code Climate.

@atherdon atherdon self-requested a review November 16, 2019 17:19
@@ -11,6 +11,8 @@ async function findCsvFiles(dirPath) {

// eslint-disable-next-line no-shadow
async function helper(dirPath) {
if (dirPath.includes('.json') || dirPath.includes('.md')) return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

i don't like these short versions. make it casual

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will make it as regex pattern

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok

@atherdon
Copy link
Collaborator

another thing - maybe we dont need a separated file for our new method? because in the end it will be bundles to one file.

and tell me if you need help with calling scripts from pkg.json - not sure if you solve it or not

@atherdon
Copy link
Collaborator

will merge it and release a new version at npm

@atherdon atherdon merged commit 12e1f4e into Food-Static-Data:master Nov 16, 2019
@atherdon
Copy link
Collaborator

new version released

@ebrahim-2
Copy link
Contributor Author

and tell me if you need help with calling scripts from pkg.json - not sure if you solve it or not

I didn't make it in that way I added the same script in every package.json file

@atherdon
Copy link
Collaborator

atherdon commented Nov 16, 2019 via email

@atherdon
Copy link
Collaborator

Btw, this is not what you're trying to do -
https://github.com/GroceriStar/food-datasets-csv-parser/blob/master/package/src/fileSystem.js#L36?

Looks pretty similar

@atherdon
Copy link
Collaborator

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