How to run this project in a local development environment and make contributions to it.
- Getting started
- Dependency management
- Linting and formatting
- Pull request guidance
- Publishing to PyPI
- Contribution licensing
We recommend the use of Docker for local development.
Experienced developers may opt to set up a Python virtual environment for the application and connect to your own PostgreSQL, S3-like object storage, and Redis services.
- Clone this repository and go into its directory
- Launch the Docker cluster:
make start
- Open the dashboard:
make dashboard
When saving Python files, the application will automatically reload itself in the container.
Our Python package requirements workflow, based on “A Better Pip Workflow™” by Kenneth Reitz:
launchbox/requirements/requirements-to-freeze.txt
specifies pinned versions of our top-level dependencies.launchbox/requirements.txt
contains the output ofpip freeze
after runningpip install -r requirements/ requirements-to-freeze.txt
(within the app container, which mounts thelaunchbox
folder).- For normal installation, use
pip install -r requirements.txt
(within the app container).
Steps for updating dependencies:
- Make updates to top-level dependencies in
launchbox/requirements/requirements-to-freeze.txt
- Attach to the app container:
make terminal
- Uninstall all currently-installed dependencies:
pip freeze | xargs pip uninstall -y
- Install updated top-level dependencies and subdependencies:
pip install -r requirements/requirements-to-freeze.txt
- Update the complete list of pinned dependencies:
pip freeze > requirements.txt
- Test the updates!
We follow a standard npm-based workflow for managing our frontend dependencies.
This project uses Flake8, isort, and Black for Python linting and formatting.
This project uses ESLint, Prettier, and Stylelint for frontend linting and formatting.
We strongly encourage using the pre-commit package to ensure coding standards are enforced prior to committing your code. Here's how to set it up for this project:
- Install pre-commit if you have not already.
- If you had previously install it, verify the installation and
ensure you're running the latest version:
pre-commit --version
- Install the Git hooks in this project:
pre-commit install
- Now, every time you go to make a commit,
pre-commit
will run automatically. If it fails, the commit will not be executed, and you will have to fix the identified problems to continue.
This repository employs the Release Drafter GitHub Actions workflow to automatically build draft release notes as pull requests are merged. Release Drafter will categorize the main type of changes in each PR within the release notes and also determine what the version number of the next release should be (depending on whether the release is a major, minor, or patch release).
Release Drafter's ability to do this correctly depends on PRs being tagged with certain labels. Most PRs should include at least two labels:
- A label for the category of the changes included in the PR (
feature
,fix
,docs
, ormaintenance
) - A label for the significance of the chance
(
major
,minor
, orpatch
, per Semantic Versioning definitions)
Release Drafter will attempt to automatically apply the category label to a new PR based on its branch name, title, or paths of files that were changed. Please check that it did this sensibly, and modify the labels as necessary. Try to avoid having two major category labels on a PR, because it will then be added to both of those categories in the list.
The quality of the generated release notes also depends on PRs having good human-readable titles.
In cases where a PR is not worth noting in the release notes, you can also
tell Release Drafter not to add an entry for it by labeling it with skip-changelog
.
Finally, don't fret about this too much! The Release Drafter configuration and labeling scheme may take some time to fine-tune, and the drafted release notes can always be manually edited before final publication.
[To be completed after initial release on PyPI.]
All contributions to this project will be released under the same MIT License as the overall project. By submitting a pull request, you are agreeing to comply with these terms.