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

Document our code_style_guide rules for python #2465

Closed
jwnimmer-tri opened this issue May 27, 2016 · 12 comments
Closed

Document our code_style_guide rules for python #2465

jwnimmer-tri opened this issue May 27, 2016 · 12 comments

Comments

@jwnimmer-tri
Copy link
Collaborator

We need to document our code_style_guide.rst rules for python code. We have C++, Java, and MATLAB rules now, but not python.

For the record, in #1741 we choose googlestyle for C++ but didn't appear to discuss other languages. I don't think there's anything else major we've missed, though.

@jwnimmer-tri
Copy link
Collaborator Author

For starters, I think its obvious to elect PEP-8 as the basic rules. We can tack on more beyond that if we start to care.

Probably also worth documenting how to run the pep8 style-checker tool.

@liangfok
Copy link
Contributor

+1 for PEP-8.

@jamiesnape
Copy link
Contributor

jamiesnape commented May 27, 2016

Would you like me to run flake8 or pylint on PR's?

@jamiesnape
Copy link
Contributor

jamiesnape commented May 27, 2016

The Google style guide for Python seems reasonable. As far as I can tell, it is PEP8 plus a few other things.

@jwnimmer-tri
Copy link
Collaborator Author

Would you like me to run flake8 or pylint on PR's?

Possibly in the future, but for now I'd suggest that someone to test it locally and in integrate into drake-distro first, and then toss it into jenkins. Also there's not that much python code in Drake, so probably not a high priority.

@david-german-tri
Copy link
Contributor

Sounds reasonable to me.

@rdeits
Copy link
Contributor

rdeits commented Jun 6, 2016

FYI: the pep8 package has been renamed to the more-readable pycodestyle package going forward.

@jamiesnape
Copy link
Contributor

There is also yapf to autoformat Python files in the same spirit as clang-format.

@jwnimmer-tri
Copy link
Collaborator Author

Let me try kicking this over to @david-german-tri, since I'm not foresee-ably going to work on it, ever.

@david-german-tri
Copy link
Contributor

I'm never going to work on this either. Dropping it to the backlog.

@jwnimmer-tri
Copy link
Collaborator Author

I wonder if @rpoyner-tri would be interested in taking a stab at this, and perhaps relating it to TRI python style?

@rpoyner-tri
Copy link
Contributor

Sure.

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

6 participants