Food-Static-Data / sd

Food static data wrapper
GNU General Public License v3.0
9 stars 14 forks source link

json-schema modification [addon] #423

Closed atherdon closed 5 years ago

atherdon commented 5 years ago

1) Move json schemes into the separated variable outside of describe block. it will make tests looks less complicated 2) move out example into the separated file, move out scheme into the separated file - maybe it should be one file with 2 exported variables... 3) configure rollup bundler, so with build -> we copy only json files from data folder at build, and skip tests/schemas/examples...

22

atherdon commented 5 years ago

@siddharthp538 you can grab it tell me if you need more information

siddharthp538 commented 5 years ago

cool. will do it

siddharthp538 commented 5 years ago
  1. Move json schemes into the separated variable outside of describe block. it will make tests looks less complicated
  2. move out example into the separated file, move out scheme into the separated file - maybe it should be one file with 2 exported variables...
  3. configure rollup bundler, so with build -> we copy only json files from data folder at build, and skip tests/schemas/examples...

    22

@atherdon what exactly do u mean by the 3rd point?

siddharthp538 commented 5 years ago

i'm done with the first 2, i'm not understanding what exactly needs to be done for the 3rd one? @atherdon

atherdon commented 5 years ago

can you open a pull request with that changes?

atherdon commented 5 years ago

and i think you did it pretty quick - especially that we need those changes for each test file - that was updated... And before going into point 2 i was hoping to see all files working after changes of point 1

siddharthp538 commented 5 years ago

oh, i am sorry. I made a PR. Have a look. @atherdon

atherdon commented 5 years ago

no problem - all is fine - this is why i'm assigning these tasks for you - so you can have more practice

atherdon commented 5 years ago

@AndrewSerra this task touch a lot of files, so you can jump into it and help Siddharth

atherdon commented 5 years ago

can you open a pull request with that changes?

siddharthp538 commented 5 years ago

@atherdon a little busy right now. Will do it once I'm free. Sorry for the delay

atherdon commented 5 years ago

let's start with first one and i'll elaborate lately the last one

siddharthp538 commented 5 years ago

just explain what needs to be done. I'll try to do it ASAP

siddharthp538 commented 5 years ago

Can you tell me what was wrong with my last PR? Didn't they solve the first two points?

AndrewSerra commented 5 years ago

So is there only the third step left?

atherdon commented 5 years ago

@AndrewSerra nope. please start with step one only and apply it for a few test files

atherdon commented 5 years ago

@siddharthp538 problem with your latest PR is simple - few days ago, when you fork our repo you apply some changes. Then Adebowale updates one file that I merged to master. you change the same file with Adebowale, but you didn't sync your fork with his changes. it creating merge conflict. and i asked you to rebase your pull request(branch) in order to get changes from Adebowale and I was able to approve your changes. in future - each time when you want to make code changes - you need tosync your fork and pull changes to your repository

atherdon commented 5 years ago

@siddharthp538 it maybe solves the first two points - but it was done for one test file(and we have a lot of files and each one require these changes) and it creates merge conflict,

siddharthp538 commented 5 years ago

Okay. Got it

atherdon commented 5 years ago

@siddharthp538 for some reasons your message didn't appears here. I'll put it here

for the shema of the first file, allergy.test.js "Seafood-Free", "Gluten-Free" all these should have value of 1 or 0 right?

@Edebo can you advise, because i'm not quite sure

siddharthp538 commented 5 years ago

@atherdon I'm done with the option 1, but only with those files who were already tested. Should I make a PR? or You'll review it tomorrow directly after i'm done for all files?

atherdon commented 5 years ago

yes, please open a PR so I can take a look

siddharthp538 commented 5 years ago

@atherdon i'm not able to make a PR. "Create Pull Request" button is disabled. Any help?

atherdon commented 5 years ago

@atherdon i'm not able to make a PR. "Create Pull Request" button is disabled. Any help?

Hmm, maybe you didn't commit/push your changes to your fork?

siddharthp538 commented 5 years ago

I did, you can see the changes at my forked repo

On Sat, Jun 1, 2019, 9:08 AM Arthur Tkachenko notifications@github.com wrote:

@atherdon https://github.com/atherdon i'm not able to make a PR. "Create Pull Request" button is disabled. Any help?

Hmm, maybe you didn't commit/push your changes to your fork?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/GroceriStar/sd/issues/423?email_source=notifications&email_token=AFMDZC7NYI3L6DXI4B5SZ5LPYHVM7A5CNFSM4HRGRVWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWWXZOA#issuecomment-497908920, or mute the thread https://github.com/notifications/unsubscribe-auth/AFMDZC3DBUXFBEU2Q6LH5W3PYHVM7ANCNFSM4HRGRVWA .

siddharthp538 commented 5 years ago

@atherdon i made a PR. Have a look

atherdon commented 5 years ago

jump into next thing while i'm figure out what is going on :) falling asleep

AndrewSerra commented 5 years ago

I've worked on eleven files on the version I have forked. Should I continue with all of them or should go to the second step? because I'm not sure which ones @siddharthp538 has completed.

AndrewSerra commented 5 years ago

@atherdon also sorry I was a bit slow, I was going through the airbnb style guide

atherdon commented 5 years ago

@AndrewSerra no problem - it's not an issue, because it's hard to jump into new project, with changes that we made also quickly. you'll get that pace - just will take some time

atherdon commented 5 years ago

@ijb87 you can join this task as well

AndrewSerra commented 5 years ago

Should I continue with all the files or would you like to have a look at the ones I have done?

atherdon commented 5 years ago

show me what you done. i like small steps approach, especially when we have a lot of people, working on this particular task @AndrewSerra

ijb87 commented 5 years ago

@AndrewSerra @siddharthp538 do any of you guys have a discord or something we can communicate through in order to make sure we're on the same page?

atherdon commented 5 years ago

it's better to use GitHub for communication. because only here all team is connected. please use these comments for it.

atherdon commented 5 years ago

one of the easiest ways is to look at the last changes, that were made. check pull requests - that I merge and mentioned at this thread, then you'll be able to see what was done. then compare file that was updated with another file and you'll find out are the same(i.e both completed) or not. just made some groundwork and research code more and everything will be clear

AndrewSerra commented 5 years ago

@atherdon to show you what I have completed should I create a pull request? Currently, I forked the repository and made changes there. How do we do the checking?

atherdon commented 5 years ago

watch this https://github.com/ChickenKyiv/awesome-git-article#forking-pull-requests

AndrewSerra commented 5 years ago

Thanks. I'm working on it now, there are some conflicts that I have to resolve

atherdon commented 5 years ago

you will need to sync your fork

AndrewSerra commented 5 years ago

Once I did the sync I most of the files are done in a different way already or the files were deleted but I have gone through all the files and realized that not all of them have the same style, should I change them so they are consistent in style?

AndrewSerra commented 5 years ago

I now have the repository properly set up so I hopefully won't have the same problem again my bad.

atherdon commented 5 years ago

i don't usually understand when i don't see code. if you think there should be some update in "style" - do it and open a pull request. then i'll see it and tell if it ok or not

and i think good lesson here - don't wait a lot and submit changes quickly

AndrewSerra commented 5 years ago

Okay since my files were done I'll so some small quick changes so all files match and open a pull request

atherdon commented 5 years ago

@AndrewSerra your files not gone. this is why git and github is a good thing. you can see your history of commits or roll soeme changes back - i don't want to lose your previous work. let's think how we can bring it back - if it's not duplicate of someone e;se work

AndrewSerra commented 5 years ago

@atherdon It is very similar that's why I did not mind. Right now the schemes and examples change for the same variable name. I had all examples and schemes as their own constant since the second step of the issue says the can be exported from different files. Maybe I misunderstood task two.

siddharthp538 commented 5 years ago

@atherdon i'm done with testing of almost of all files. That ends option 1 as well. I have made a PR. I'm starting with option 2. cool?

siddharthp538 commented 5 years ago

@AndrewSerra @ijb87 can we start with the second task? It's simple enough but a repetitive thing, we can distribute it and get our stuff done quickly, I feel.

AndrewSerra commented 5 years ago

@siddharthp538 sure I'll start it but I didn't fully understand what is meant

siddharthp538 commented 5 years ago

@siddharthp538 sure I'll start it but I didn't fully understand what is meant

This is the task : move out example into the separated file, move out scheme into the separated file - maybe it should be one file with 2 exported variables...

Still any doubt? let me know