Because I know that we should.
This could probably help ease us in: http://propertiespy.readthedocs.io/en/latest/content/renamed.html#renamed-property
I think that there are a number of handy properties that people use quite often that would need some thought:
nC, nF, vnE
etc. I think true PEP8 doesn’t even like the 2 letter variable names? For some of this stuff that is used constantly, I think that is fine?
faceDiv
--> face_div
Oh boy.
fatiando/fatiando#278
Thoughts @lheagy?
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
PEP 8 – Style Guide for Python Code
PEP 8 – Style Guide for Python Code · Introduction. This document gives coding conventions for the Python code comprising the standard library...
Read more >How to Write Beautiful Python Code With PEP 8 - Real Python
PEP 8, sometimes spelled PEP8 or PEP-8, is a document that provides guidelines and best practices on how to write Python code.
Read more >pep8 - PyPI
pep8 is a tool to check your Python code against some of the style conventions in PEP 8. Features. Plugin architecture: Adding new...
Read more >pep8's documentation — pep8 1.7.1 documentation
pep8 is a tool to check your Python code against some of the style conventions in PEP 8. Contents: Introduction · Features ·...
Read more >An Overview of The PEP 8 Style Guide - Towards Data Science
Python Enhancement Proposal 8 or PEP 8 is a comprehensive styling guide for your Python code. PEP 8's aim is to bring all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A few naming thoughts on the base class
nC
-->ncells
, similarlynF
-->nfaces
,nE
-->nedges
nEx
-->nedges_x
, etcvnC
-->vec_ncells
, orvector_ncells
?x0
stays? orx0
-->origin
@rowanc1 I’ve been there 😃 This got implemented in Fatiando right after Scipy 2014 in fatiando/fatiando#115
I used autopep8 but did it one file at a time to check that all tests and scripts were still working. I wouldn’t recommend running it on the entire library at once. A good way to start to put the pep8 check into a CI system and enforce it for new code.
I recently started running flake8 in TravisCI to catch any incompatibilities (fatiando/fatiando#382). Another useful tool is pylint with the
--py3k
argument to make sure new code is Python 3 compatible (mostly).@lheagy I’ve been very liberal with breaking backward compatibility in Fatiando. I should actually make it more clear in the docs about that. One thing that mitigates this is to always record and cite the version number in research projects. The code there will still work and produce the results from the paper, just not using the latest Fatiando. For example, I was working on this paper and this one in parallel and they both use different incompatible versions. But they both still work.