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

fileSystem, read method upgrade #194

Closed
atherdon opened this issue Jul 29, 2019 · 26 comments
Closed

fileSystem, read method upgrade #194

atherdon opened this issue Jul 29, 2019 · 26 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed in-process

Comments

@atherdon
Copy link
Contributor

Is your feature request related to a problem? Please describe.
We have one unfinished task

  • rename this method to 'read'
  • export it at index.js
  • by using examples of write or save - extend this method, so it can accept promises as our other 3 methods doing
  • add one test cover for this method at filesystem.test.js

We using promises for returning true/false and that value can be received at our tests.
Later we'll change it for accepting data from the outside of this method and will use Promises for more advanced cases.

at one of the next steps we'll pass data into generator from the outside of
our module, so methods, like we have in generateArray or measurements.js,
will be obsolete to keep from the inside

In order to get more information about this task, please compare how other
methods was upgraded with promises and make a similar one. same with tests

Method: https://github.com/GroceriStar/food-static-files-generator/blob/master/src/fileSystem.js#L11
Test: https://github.com/GroceriStar/food-static-files-generator/blob/master/tests/fileSystem.test.js#L5

Method: https://github.com/GroceriStar/food-static-files-generator/blob/master/src/fileSystem.js#L55
Test: https://github.com/GroceriStar/food-static-files-generator/blob/master/tests/fileSystem.test.js#L13

@sarthakvijayvergiya you can take this task

@atherdon
Copy link
Contributor Author

ask a more specific question, please.

For sure it's hard from beginning to jump into a working project. don't worry - if something is not clear - we always open for discussion

@atherdon
Copy link
Contributor Author

@svr8 @vadim9999 can you advice here?

@atherdon
Copy link
Contributor Author

atherdon commented Jul 31, 2019 via email

@atherdon
Copy link
Contributor Author

atherdon commented Jul 31, 2019 via email

@atherdon
Copy link
Contributor Author

atherdon commented Jul 31, 2019 via email

@atherdon
Copy link
Contributor Author

atherdon commented Aug 4, 2019

tell me if you need help

@atherdon
Copy link
Contributor Author

atherdon commented Aug 6, 2019

you assigned to this task. you can proceed with your pull request

@atherdon
Copy link
Contributor Author

atherdon commented Aug 6, 2019

follow this link https://github.com/GroceriStar

@atherdon
Copy link
Contributor Author

atherdon commented Aug 8, 2019

while you not asking specific question - i need to refuse.
hope it's ok - i'm busy and also don't like calls/scheduled meetups

@atherdon
Copy link
Contributor Author

atherdon commented Aug 8, 2019

@sarthakvijayvergiya I made a video at #209

@sarthakvijayvergiya sarthakvijayvergiya removed their assignment Aug 19, 2019
@atherdon
Copy link
Contributor Author

@saphal1998 check this task. i'm not sure if it was completed or not.
let's go step by step and figure it out together

@saphal1998
Copy link
Contributor

Screenshot 2019-09-16 at 04 01 14

I think this code is correct. Please let me know if you see any mistakes. I tried it on my local machine and it seems to work.

We using promises for returning true/false and that value can be received at our tests.
Later we'll change it for accepting data from the outside of this method and will use Promises for more advanced cases.

I'm not quite sure what this meant. Does this mean I change the resolve and reject parameters here? Please let me know.

@atherdon
Copy link
Contributor Author

I'm not quite sure what this meant. Does this mean I change the resolve and reject parameters here? Please let me know.

No, I think this part of was actually done. Code is not formatted, but correct.

Maybe small perfectionistic improve - inside of if make !err, so important part of code goes first and error handle will go after that.


what about other things? other sub-tasks is covered as well? you mentioned tests - do we have test for this method? I just not remember - can you take a look?

@atherdon
Copy link
Contributor Author

quick notes:

  1. I made some changes recently at master branch. please sync your fork in order to catch them. changes related to generation process. now code looks more pretty. if you'll have issues with sync process - tell me, i'll help

  1. I find another quick task for you - move methods from writeFile into utils. but you should do it in a smart way, so nothing will go broken because of import changes

  1. I made a few courses related to git. Did I share them with you? I think courses completion will also help to grow your skills. tell me if you interested, i'll share a link

@saphal1998
Copy link
Contributor

Screenshot 2019-09-16 at 13 50 58

I made some changes recently at master branch. please sync your fork in order to catch them. changes related to generation process. now code looks more pretty. if you'll have issues with sync process - tell me, I'll help

I'm getting this error. Not sure how to solve this. Please advise.

I find another quick task for you - move methods from writeFile into utils. but you should do it in a smart way, so nothing will go broken because of import changes

Alright, I'll look into this, and get back to you if I have any queries.

I made a few courses related to git. Did I share them with you? I think courses completion will also help to grow your skills. tell me if you interested, i'll share a link

No you haven't shared them with me. Please do. I think they will be very useful for me, my git skills need some improvement.

@saphal1998
Copy link
Contributor

No, I think this part of was actually done. Code is not formatted, but correct.

The code for the read method was synchronous, I just made that Asynchronous using Promises. I wanted to push that, but I'm getting the error in the 'pretty-quick' stage while committing my changes. So I can't make the PR, please advise on that.

what about other things? other sub-tasks is covered as well? you mentioned tests - do we have test for this method? I just not remember - can you take a look

There's already a test written for the method in fileSystem.test.js

@atherdon
Copy link
Contributor Author

atherdon commented Sep 16, 2019

@saphal1998 will take a look. can you share with me link to your forked repository?
I think one test is not enough. especially if we upgrade that method.
Will you be able to create a few more tests related to read?

@saphal1998
Copy link
Contributor

This is my forked repo

I think one test is not enough. especially if we upgrade that method.
Will you be able to create a few more tests related to read?

Yes, but, I'll need some time. Never created tests before. I want to learn, so give me 2 days or so. I need to look into it. If you could suggest some resources for that as well, I'd appreciate it.

@atherdon
Copy link
Contributor Author

atherdon commented Sep 16, 2019 via email

@atherdon
Copy link
Contributor Author

please merge PR and re-install packages locally https://github.com/saphal1998/food-static-files-generator/pull/1

I tried to check your changes, but I can`t - because issue with prettier and lint-staged prevent you actually to commit to GitHub.

maybe you can save your changes at some other place(anoter branch) and then remove your changes and try slowly, file by file add changes and then try to commit them in order to debug an issue.


another way is:

  1. try to run yarn lint in order to check lint locally
  2. try to run yarn lint-staged -c lint-staged.config.js - it will run another checker locally and you maybe will see more detailed output that will help you to solve it

@saphal1998
Copy link
Contributor

I made a few courses related to git. Did I share them with you? I think courses completion will also help to grow your skills. tell me if you interested, i'll share a link

Could you send me this?

@saphal1998
Copy link
Contributor

Will you be able to create a few more tests related to read?

I've written a couple of tests which you can find on my forked repo. They are working locally and have some linting issues only. Can you please advise as to how to proceed? I have not been able to remove these errors.
Screenshot 2019-09-20 at 06 34 47

@atherdon
Copy link
Contributor Author

atherdon commented Sep 20, 2019 via email

@atherdon
Copy link
Contributor Author

@saphal1998 I think i can close this task, right?

@saphal1998
Copy link
Contributor

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed in-process
Projects
None yet
Development

No branches or pull requests

3 participants