Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 1.21 KB

File metadata and controls

22 lines (13 loc) · 1.21 KB

Python Guidelines

Basis: PEP-8

Python interpreters

We will support only the official Python implementation, often called CPython. Other choices (PyPy, Jython, IronPython, ...) do not have wide support and do not have good support for extension modules written for CPython, which are widespread.

Because numpy is a critical component of much of the scientific Python ecosystem, we will follow Scientific Python's SPEC 0 in deprecating old versions of Python and of numpy. This is because we do not have more resources than do the numpy developers to support numpy on older versions of Python.

Unit test library

pytest

Other utilities

As Python is a dynamically typed language, it does not support static checks that would normally be performed by a compiler. We will instead use the following tools:

  • code coverage tools such as Codecov including the use of branch coverage.
  • type annotations conforming to PEP 484 and checked by mypy