You will need to lint and format your code using ruff. The easiest way
to automate linting/formatting of code prior to each commit is via the
pre-commit package, which simplifies management of git hooks.
If using pip, pre-commit will be installed when you install ursa in
editable mode via
pip install -e .[dev]If using uv, pre-commit will be installed in your default (dev)
environment.
To install the ruff git hook to your local .git/hooks folder, run
the following in the current directory:
# If using pip with venv, first activate your environment, then
pre-commit install
# If usign uv
uv run pre-commit installPrior to subsequent git commit calls, ruff will first lint/format code.
Instead of running git hooks, you can lint/format code manually via running the following in the current directory:
# Lint
ruff check --fix
# Format
ruff formatTo continually lint while developing, you can run the following in your terminal
ruff check --watchFor editor (e.g., vim, VSCode) integration, see here.
(You can install via ruff following instructions here.)
If code is not linted/formatted, PRs will be blocked.