Contributing code to Briefcase¶
Setting up your development environment¶
The recommended way of setting up your development environment for Briefcase is to use a virtual environment, install the required dependencies and start coding:
To install all the development version of Briefcase, along with all it’s requirements, run the following commands within your virtual environment:
Now you are ready to start hacking! Have fun!
By default this will run the test suite multiple times, once on each Python version supported by Briefcase, as well as running some pre-commit checks of code style and validity. This can take a while, so if you want to speed up the process while developing, you can run the tests on one Python version only:
Or, to run using a specific version of Python, e.g. when you want to use Python 3.7:
substituting the version number that you want to target. You can also specify one of the pre-commit checks flake8, docs or package to check code formatting, documentation syntax and packaging metadata, respectively.
Add change information for release notes¶
Briefcase uses towncrier to automate
building release notes. To support this, every pull request needs to have a
corresponding file in the
changes/ directory that provides a short
description of the change implemented by the pull request.
This description should be a high level summary of the change from the perspective of the user, not a deep technical description or implementation detail. It should also be written in past tense (i.e., “Added an option to enable X” or “Fixed handling of Y”).
See News Fragments
for more details on the types of news fragments you can add. You can also see
existing examples of news fragments in the