This is a collection of standard files that are typically needed for most Python-related repositories. Not all files in this repository may be needed for every Python project, but it's a good collection of common tools and configurations to which you can refer.
This is a just brief overview of the files.
This is a sample .gitignore
that just ignores all files. This is primarily here as a protection for this repository so that files need to be added to the repository forcefully using -f
. A normal repository will have a far less restrictive .gitignore
.
This is a config for pre-commit, which is a library to control pre-commit hooks for Git. These are just the standard ones BITS uses in Python repositories.
This is the BITS standard configuration file for the pylint Python linting application.
This is a sample TravisCI configuration file that can be used to run TravisCI jobs for commits to your repository for unit tests, linting, etc. It currently supports:
- Python versions 2.7, 3.4, 3.5, and 3.6
- Pip package installation using pipenv
- Unit tests using green
- A pre-flight stage that runs yamllint and pylama on the whole codebase
This is the BITS standard configuration file for the yamllint YAML linting application.
This is a sample Dockerfile
that can be used to create a Python container for use as a development environment for whatever Python]1 configuration you wish to use. By default, it uses Python 3.6 and pipenv to install packages.
The default license approved for use at the Broad Institute (BSD 3-Clause "New" or "Revised" License).
The file used by pipenv to install PyPi packages. This is a default list and is meant as a base configuration for your project. Obviously, more packages will probably be needed depending on the project.
This is a simple script that starts up or builds a development environment in Docker. The way it works is it looks for an image by the name specified at the top of the script. If that image doesn't exist, it uses the Dockerfile
in the local directory to build the image. You are then dropped into a bash shell inside that container under the /usr/src
path. The present working directory outside the container is volume mapped to /usr/src
inside the container as well.
This is the BITS standard configuration file for the pylama Python linting application.
If you use workspaces in VS Code, you can clone this repository in the base directory of your workspace. You can then use pipenv to install the packages listed in the Pipfile
. You will need to make sure pipenv installs into a .venv
directory under the workspace directory. To do this, you can run pipenv as follows:
PIPENV_VENV_IN_PROJECT=1 pipenv lock
PIPENV_VENV_IN_PROJECT=1 pipenv install --dev
The PIPENV_VENV_IN_PROJECT=1
environment variable setting makes sure that the virtual environment is stored in the local project directory instead of a different temporary directory pipenv typically uses.