Shopify Python Standards

This repository describes Python development standards at Shopify, and provides some utilities to assist other Python repositories adhere to these standards.

Development Principles

Python Style

Shopify follows the Google Python Style Guide with the following exceptions:

Versioning

Projects that are producing libraries to be used in other projects should choose their release version numbers using Semantic Versioning 2.0.0, i.e.

Given a version number MAJOR.MINOR.PATCH, increment the:

MAJOR version when you make incompatible API changes, MINOR version when you add functionality in a backwards-compatible manner, and PATCH version when you make backwards-compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

Testing

All committed code requires quality tests that provide ample code coverage. Functionality that is not covered by tests should be assumed to be broken (and probably will be).

Code Review

Committing to master requires a code review, submitted in the form of a GitHub Pull Request. To be merged, a PR must have an explicit approval from a core team member and no outstanding questions.

Project Setup

To help you apply these principles this repository contains a pylint plugin and some example files to bootstrap a Python project. When beginning a Python project:

Contributing

Please refer to our Contribution Guidelines