Feature/upgrade python#3
Open
johnnybarton411 wants to merge 6 commits into
Open
Conversation
johnnybarton411
commented
Mar 23, 2020
Author
There was a problem hiding this comment.
@CodyMDillinger, you'll want to review the changes in optimized_rrt.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey bud. I don't know why I did this, but I do think it might help you with any of the intricate bugs that you see in Python. Basically, what I did, is add a virtual environment, upgrade to Python 3.7, and format some of the code based on the PEP 8 style guide.
Having a virtual environment is awesome. It allows you to manage your dependencies for a particular project. That way, when a user installs pygame, for example, it installs it at the project level, rather than the user level of the computer. This can save a ton of headaches if certain libraries aren't compatible. This also means that when you checkout the venv, it will use the python executable in the
./env/bindirectory (which is python 3.7, see below)When I created the venv, I used Python 3, since Python 2 is no longer supported as of January 1, 2020. The only things that required changing is the print functions.
I also installed pylint to the venv, which helps with styling the code to match the style guide mentioned in the link above.
All of this allows you to more tightly integrate with an IDE and get code completion, suggestions to make the code more pythonic, static error checking, and much more. I recommend Visual Studio Code, as it's pretty f'n sweet. Here's a start up guide.
You'll notice the
./vscodedirectory in the root directory. This contains any settings that allow VS Code to easily integrate with your Python project. If you need help getting that set up, let me know! I can guarantee that it will help you figure out bugs and write really awesome code, and will be a good learning experience for the future Python projects you write!That all being said, I haven't gotten this to run yet, so don't accept the PR lol. I just want to
git diffeverything and see what's going wrong / check with you to make sure I'm running everything right.P.S. - I didn't change how any of the code runs/works. I just wanted to make these minor changes because I think they will be super helpful in your development and debugging!