From d31d70540703aabcb8acc5586747ad57ef5f9b06 Mon Sep 17 00:00:00 2001 From: Bagatur <22008038+baskaryan@users.noreply.github.com> Date: Sun, 29 Oct 2023 16:22:18 -0700 Subject: [PATCH] update contributing (#12532) --- .github/CONTRIBUTING.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ff8c70ec42..91f1faf305 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -136,12 +136,19 @@ Run these locally before submitting a PR; the CI system will check also. Formatting for this project is done via a combination of [Black](https://black.readthedocs.io/en/stable/) and [ruff](https://docs.astral.sh/ruff/rules/). -To run formatting for this project: +To run formatting for docs, cookbook and templates: ```bash make format ``` +To run formatting for a library, run the same command from the relevant library directory: + +```bash +cd libs/{LIBRARY} +make format +``` + Additionally, you can run the formatter only on the files that have been modified in your current branch as compared to the master branch using the format_diff command: ```bash @@ -154,9 +161,16 @@ This is especially useful when you have made changes to a subset of the project Linting for this project is done via a combination of [Black](https://black.readthedocs.io/en/stable/), [ruff](https://docs.astral.sh/ruff/rules/), and [mypy](http://mypy-lang.org/). -To run linting for this project: +To run linting for docs, cookbook and templates: + +```bash +make lint +``` + +To run linting for a library, run the same command from the relevant library directory: ```bash +cd libs/{LIBRARY} make lint ```