question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 7 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
lheagycommented, Apr 18, 2017

A few naming thoughts on the base class

  • nC --> ncells, similarly nF --> nfaces, nE --> nedges
  • nEx --> nedges_x, etc
  • vnC --> vec_ncells, or vector_ncells ?
  • x0 stays? or x0 --> origin
1reaction
leouiedacommented, Mar 21, 2017

This package was my first exposure to the Python language. I was young, naive, and fancy free.

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found