From c66257eac7f344814d95bc45243f30659d767350 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Tue, 12 Mar 2024 12:50:41 -0400 Subject: [PATCH] Update readme for recent tooling changes - `make lint` no longer lints without making changes. This has been the case since #1862, because `--fix` is used. (I don't think anyone was really using `make lint`, but just in case, we should avoid saying it still never changes any files.) With #1865, there will be more ways that files can be changed. - `black` is no longer used, having been replaced by `ruff`. This will be the case as of #1865. This also reorganizes the "Specific tools" list, since they are all configured in pyproject.toml now (only flake8 was not before, and it was removed in favor of ruff in #1862). In doing so, I've also added brief parenthesized phrases to characterize what each of these four tools is for, so readers don't have to look around as much to understand most of the tooling GitPython has set up. --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2f06206be..30af532db 100644 --- a/README.md +++ b/README.md @@ -156,14 +156,13 @@ To test, run: pytest ``` -To lint, and apply automatic code formatting, run: +To lint, and apply some linting fixes as well as automatic code formatting, run: ```sh pre-commit run --all-files ``` -- Linting without modifying code can be done with: `make lint` -- Auto-formatting without other lint checks can be done with: `black .` +This includes the linting and autoformatting done by Ruff, as well as some other checks. To typecheck, run: @@ -173,7 +172,7 @@ mypy -p git #### CI (and tox) -The same linting, and running tests on all the different supported Python versions, will be performed: +Style and formatting checks, and running tests on all the different supported Python versions, will be performed: - Upon submitting a pull request. - On each push, *if* you have a fork with GitHub Actions enabled. @@ -181,10 +180,12 @@ The same linting, and running tests on all the different supported Python versio #### Configuration files -Specific tools: +Specific tools are all configured in the `./pyproject.toml` file: -- Configurations for `mypy`, `pytest`, `coverage.py`, and `black` are in `./pyproject.toml`. -- Configuration for `ruff` is in the `pyproject.toml` file. +- `pytest` (test runner) +- `coverage.py` (code coverage) +- `ruff` (linter and formatter) +- `mypy` (type checker) Orchestration tools: