Skip to content

Latest commit

 

History

History
45 lines (38 loc) · 2.52 KB

CONTRIBUTING.md

File metadata and controls

45 lines (38 loc) · 2.52 KB

Contribution

If you wish to contribute to DJ Tools, please follow these development rules:

  1. Development branches must:
    1. be linked to an Issue
    2. branch from release/*
    3. have a concise name for the feature or bugfix specifically targeted by that branch (e.g. xml-track-randomization or improve-spotify-stability)
  2. Commits must:
    1. have messages that follow the Conventional Commits standard
    2. (if non-trivial) have messages that include a Why? and What? section in the body describing the reason for and specifics of the commit
    3. (if relevant) include updates to the docs

CI

On push events (with **.py changes) to feature branches, the format Action will run the black code formatter and commit changes if there are any.

On pull_request events (with src/**.py or tests/**.py changes) the test-lint Action is triggered. For build checks to pass on the PR, this Action must have 100% test passing and coverage and a 10.00/10 linting score:

  • if you're unable to pass tests with 100% coverage, please open an issue
  • if you're not getting a 10.00/10 lint score, first attempt to correct the errors before resorting to messages control

On push events to release/** the following Actions are triggered:

On push events to main, for the same file change patterns, the deploy-prod-docs and release-prod Actions are triggered.

Local testing (run from DJ-Tools repo)

Setup dev environment:

pyenv virtualenv $(pyenv global) djtools-dev && \
pyenv activate djtools-dev && \
pip install -e ".[dev]"

Test suite & coverage reporting:

pytest --cov --cov-report term-missing

Linting check:

pylint $(git ls-files '*.py')

Format code:

black .