cannawen / metric_units_reddit_bot

Reddit bot converting imperial units to metric units
https://www.reddit.com/user/metric_units
GNU General Public License v3.0
77 stars 34 forks source link

Knots should be converted to metric speed #24

Closed cannawen closed 7 years ago

cannawen commented 7 years ago

metric_units is a sassy reddit bot that finds imperial units, and replies with a metric conversion.

Knots should be converted to metric speed (i.e. km/h)

See this commit for an example of how to add a new conversion

cannawen commented 7 years ago

@devshiva619 would you like to pick up this issue instead?

devesh-verma commented 7 years ago

@cannawen sure why not. But right it says already assigned. If you haven't already assigned anyone I will surely work on this.

cannawen commented 7 years ago

My mistake with the tag.

It's all yours, thanks! Let me know if you need any help getting started

devesh-verma commented 7 years ago

@cannawen thankyou. have you assigned this to me ?

devesh-verma commented 7 years ago

hey, @cannawen I sm having problem in setting up the project. Can you help me with it.

cannawen commented 7 years ago

Sure, what problem are you running into?

devesh-verma commented 7 years ago

@cannawen sorry for replying late, I had made the app in reddit, but from where do I download the source-code from ?

cannawen commented 7 years ago

Press the "fork" button in the top right corner of this page, and then you want to use git to download your version of metric_units_reddit_bot

devesh-verma commented 7 years ago

@cannawen sorry I think I wasn't clear, I meant I have cloned the repo and created the app in readdit. What am I supposed to do next?

cannawen commented 7 years ago

Ah, the instructions are in the readme. Have you created the ./private/environment.yaml file?

devesh-verma commented 7 years ago

@cannawen I wanted to know from where do I need to download the source-code

chazzlabs commented 7 years ago

@devshiva619 You should fork the repository by clicking the "fork" button on the top right of the page. This will create a fork of the repo in your personal account. From there, git clone your fork onto your computer.

cannawen commented 7 years ago

Hey @devshiva619 are you still having problems downloading the source code? Maybe if you include some screenshots of the errors you are encountering, we can help?

Also FYI we have just added a CONTRIBUTING.md doc, please check it out when you have time! Sections "Etiquette", "Work on an issue" and "Make a PR" are most important

devesh-verma commented 7 years ago

@cannawen Hey I am attaching the screenshots:

  1. Reddit app.
  2. environment.yaml.
  3. error I encountered while trying to run, without making changes to source-code. 3

Also please let me know which version of JavaScript are you using int this?

cannawen commented 7 years ago
  1. Sorry, I've deleted some of your screenshots because they contained passwords
  2. Your oauth username should be the "esv8...." string. I can improve the README documentation to make this more clear!
  3. You do not need to have your bot hitting production servers for this issue (but you can if you want to be super thorough!), you can work on the issue by just running "npm test"
  4. What is your node version? I have it running on both v6.2.1 (Mac) and v8.2.1 (Ubuntu)

Based on my Google-fu, I think this might be a node version problem. Can you try updating node? Also, have you run npm install yet?

devesh-verma commented 7 years ago

@cannawen ok I will leave the running part, and work on the issue. For working on the issue how do I start about it?

cannawen commented 7 years ago

You would have to add something similar to this, except for knots instead of psi.

Do you have npm test working?

devesh-verma commented 7 years ago

@cannawen I am getting this error when I run npm test npm_test_screenshot

cannawen commented 7 years ago

It looks like npm install did not work. Can you try running that again, and waiting for it to finish? Thanks for the screenshot, it was very helpful :D

devesh-verma commented 7 years ago

@cannawen That was by mistake I had already done that

cannawen commented 7 years ago

Try npm install -g mocha --save-dev? I'm not sure if it'll work, I'm just googling over here, since I can't repro the issue on my machines haha

devesh-verma commented 7 years ago

@cannawen npm install -g mocha --save-dev. The command ran successfully but npm test still gives me error, I tried searching but no luck :disappointed:
npm install -g mocha --save-dev

cannawen commented 7 years ago

Can you run node --version? What does that give you?

devesh-verma commented 7 years ago

@cannawen v4.2.6

cannawen commented 7 years ago

Ah, I think that's the problem. The minimum version of node required is 6.2.1 Try updating node!

devesh-verma commented 7 years ago

@cannawe I have updated node to version 8.6.0 Now I am getting this new error. new_error

cannawen commented 7 years ago

Hey, that's progress ;)

try npm update and npm install again?

devesh-verma commented 7 years ago

@cannawen yay, its running, just need your confirmation. woohoo

devesh-verma commented 7 years ago

"imperialUnits" : [/-?psi/, /-?pounds?[ -]?(?:force)?[- ]?(?:per|an?[/])[- ]?squared? inch/], can you explain me this code, so that I can start working.

cannawen commented 7 years ago

Wooo, green tests! Very nice :D

This is an array of regular expressions, used for matching text.

I learned about them following this tutorial, I think this hands-on approach to learning would be a lot better than me explaining it in a text comment :)

devesh-verma commented 7 years ago

@cannawen thanks a lot for helping me. Hopefully I will try to send the PR by today. :smile:

cannawen commented 7 years ago

No, thank you for contributing!!

I'm going to sleep soon, but feel free to comment if you have more questions, I'll get back to you in the morning (or maybe one of the other lovely members of this community will answer... hint hint)

devesh-verma commented 7 years ago

@cannawen do I need to add my name in contributors.md. Even I will be going off to sleep now its 2:34am in India I have not yet slept :smile:

cannawen commented 7 years ago

It is your decision if you want to add your name to .all-contributorsrc, that step is optional.

nalinbhardwaj commented 7 years ago

@devshiva619 ping.

Are you still working on this?

devesh-verma commented 7 years ago

@nalinbhardwaj Yes, I will start working from tomorrow as I wasn't well till now had a severe viral fever.

cannawen commented 7 years ago

Feel better, @devshiva619! Take care of your health first :)

Closing issue due to inactivity, we can open it back up at a later date (perhaps after we finish refactoring how all conversions are parsed)