Style and formatting
Code style
Ibis uses several code linters, like ruff
, shellcheck
, statix
, nixpkgs-fmt
and others, that are enforced by CI. Developers should run them locally before submitting a PR.
- Install
pre-commit
pip install pre-commit
- Run
pre-commit run --all-files
Some of the packages needed to run the pre-commit
linting can not be installed automatically (e.g. prettier
, actionlint
, shellcheck
), and they need to be installed through a system package manager.
Optionally, you may want to setup the pre-commit
hooks to run automatically when making a git commit. To do this, run the following from the root of the Ibis repository:
pre-commit install
This will run the code linters automatically when you make a git commit. If you want to skip these checks, do git commit --no-verify
If you use nix-shell
, all of these are already setup for you and ready to use, and you don’t need to do anything to install these tools.
Docstrings
We use numpydoc as our standard format for docstrings.