This is a guide to setting up git repos for python code that take advantage of as many automatic code linting, testing, and continuous improvement tools (CI) as I have found useful. There are certainly more. I work in a linux-based environment, and the following was tested on Ubuntu 18.04 LTS assuming you have admin privileges.
Most repos are built as packages and therefore should take advantage of python's use of __init__.py
files to indicate structure. This makes writing documentation, tests, and use of the code itself (importing it externally) rational and readable. Python includes a nice discussion about this here with examples on how to configure your code as a package. To be brief, here is the basic layout by example:
my_repository/