Skip to content

Latest commit

 

History

History
46 lines (39 loc) · 2.63 KB

File metadata and controls

46 lines (39 loc) · 2.63 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 ruff 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 zero lint errors:

  • if you're unable to pass tests with 100% coverage, please open an issue
  • if you're not passing linting, first attempt to correct the errors before resorting to noqa comments

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:

uv sync && uv run pre-commit install

pre-commit hooks:

Installing pre-commit enables testing, linting, and formatting checks defined in .pre-commit-config.yaml. You can run these same checks at any time with the following commands:

Test with pytest

uv run pytest --cov --cov-report term-missing

Lint with ruff

uv run ruff check .

Format code with ruff

uv run ruff format .