Skip to content

Feature/upgrade python#3

Open
johnnybarton411 wants to merge 6 commits into
CodyMDillinger:masterfrom
johnnybarton411:feature/upgrade-python
Open

Feature/upgrade python#3
johnnybarton411 wants to merge 6 commits into
CodyMDillinger:masterfrom
johnnybarton411:feature/upgrade-python

Conversation

@johnnybarton411
Copy link
Copy Markdown

@johnnybarton411 johnnybarton411 commented Mar 23, 2020

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/bin directory (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 ./vscode directory 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 diff everything 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!

Copy link
Copy Markdown
Author

@johnnybarton411 johnnybarton411 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CodyMDillinger, you'll want to review the changes in optimized_rrt.py

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant