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

Set up a virtual environment #4

Closed
abinashmeher999 opened this issue Nov 25, 2016 · 19 comments
Closed

Set up a virtual environment #4

abinashmeher999 opened this issue Nov 25, 2016 · 19 comments

Comments

@abinashmeher999
Copy link
Owner

An isolated environment to which developers can switch and then start contributing. I would prefer Python 3 environment. This might also require minor refactoring of the code too.

@ayuhsya
Copy link
Contributor

ayuhsya commented Dec 2, 2016

I'll start with this, this seems easy. :|

@abinashmeher999
Copy link
Owner Author

Great! Mention me if you run into any issues.

@ayuhsya
Copy link
Contributor

ayuhsya commented Dec 2, 2016

@abinashmeher999 I have made the environment. Just to be sure that I did that correctly, can you tell me how does one commit a virtual environment?

Also, what next?

@abinashmeher999
Copy link
Owner Author

abinashmeher999 commented Dec 2, 2016

This is the fun part. You can't commit all of the virtual environment. So it would be great if you could write a script(bash script would do) that creates the virtual environment and then prints the instructions to change into it.

Also you will need to freeze dependent packages into requirements.txt using pip freeze. Does that clarify?

@ayuhsya
Copy link
Contributor

ayuhsya commented Dec 2, 2016

Yes I've already created the requirements.txt file. Actually, that was the only new addition to the project after creating virtual environment as all others are in .gitignore.
Also, by bash script I assume you mean a MakeFile, so I'll create the same.

@abinashmeher999
Copy link
Owner Author

No not a makefile. A simple .sh file would do, with all the commands that you executed to create it. Also test the Python 3 environment once with the sample code.

@abinashmeher999
Copy link
Owner Author

@ayuhsya I see that you have committed the changes on the master branch itself. It is a bad practice to do so. Say you made all your changes to the master branch, you send the PR and let's assume didn't get merged because of some issues. Now you want to work on top of the latest master. Where do you pull that branch to? I hope you understand.

@harshcrop
Copy link

@abinashmeher999 can I setup virtual environment in python 2.7 I am very much familiar with this.

@abinashmeher999
Copy link
Owner Author

abinashmeher999 commented Dec 3, 2016

@harshcrop We will be using Python 3 in the future because since we are dealing with wikipedia here and there will lots of unicode characters. And handling unicode is lot less painful in Python 3. Besides making a virtualenv for Python 3 is not very different from how you would do that for Python 2.7.

@ayuhsya Has already completed doing it. It would be pointless to the same thing again. Pull @ayuhsya's commits from his master into a new branch and see if you can complete the PR.

@harshcrop
Copy link

@abinashmeher999 okay make new branch again can check his repo

@abinashmeher999
Copy link
Owner Author

Sorry didn't get you.

@harshcrop
Copy link

@abinashmeher999 I am asking that what I have to do now if this task is completed so, can I set up virtual environment for me in my repo and push into my branch and start working on new issue. That what I am asking you??

@abinashmeher999
Copy link
Owner Author

Yeah you can go ahead. Try #3

@harshcrop
Copy link

okay doing it

@ayuhsya
Copy link
Contributor

ayuhsya commented Dec 3, 2016

@abinashmeher999 Yes I know that we don't work on the master branch. But this task wasn't that major so I didn't bother creating a new branch. 😐

@abinashmeher999
Copy link
Owner Author

abinashmeher999 commented Dec 3, 2016

@ayuhsya You will realise that even a small task doesn't justify working on the master once you are on your second PR(not first) to this repo. Because the work needed then just to clean up is more than just creating a new branch. It's a small change, so no worries 😄. Better clean it up before it becomes a headache.

Maybe you can move those commits to a new branch. You can google it on how to do that. It's not uncommon to commit on your master by mistake.

@ayuhsya
Copy link
Contributor

ayuhsya commented Dec 3, 2016

Okay, I'll do things on new branch now. But what do I do to send pull request/what else is left to do in this issue?

@abinashmeher999
Copy link
Owner Author

@ayuhsya Have a look at this.

@abinashmeher999
Copy link
Owner Author

Addressed in #11.

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

No branches or pull requests

3 participants