Skip to content

Commit

Permalink
Update readme for recent tooling changes
Browse files Browse the repository at this point in the history
- `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.
  • Loading branch information
EliahKagan committed Mar 12, 2024
1 parent a6a2a37 commit c66257e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -173,18 +172,20 @@ 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.
- Locally, if you run [`tox`](https://tox.wiki/) (this skips any Python versions you don't have installed).

#### 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:

Expand Down

0 comments on commit c66257e

Please sign in to comment.