Skip to content

Commit

Permalink
Add docs on installing pre-commit in an env
Browse files Browse the repository at this point in the history
We give both the pipx and the venv+pip instructions.

Closes #270
  • Loading branch information
abelsiqueira committed Sep 10, 2024
1 parent ebc72c4 commit ec5b32f
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions docs/src/10-full-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,36 @@ If you decide to gradually adopt, do this:

### Things to install

#### EditorConfig

Install a plugin on your editor to use [EditorConfig](https://editorconfig.org).
This will ensure that your editor is configured with important formatting settings.

#### pre-commit

We recommend using [https://pre-commit.com](https://pre-commit.com) to run linters and formatters.
If you select the "recommended" options later on, you will need `pre-commit` installed.
To install `pre-commit`, we recommend using [pipx](https://pipx.pypa.io) as follows:

```bash
# Install pipx following the link
pipx install pre-commit
```
`pre-commit` is a python package, so there are a few ways to install.
We like one of these two ways:

1. Using [pipx](https://pipx.pypa.io) as follows:

```bash
pipx install pre-commit
```

2. Using `pip` in a virtual environment

```bash
python -m venv env
source env/bin/activate
pip install pre-commit
```

#### JuliaFormatter

In particular, the Julia code is formatted using [JuliaFormatter.jl](https://github.com/domluna/JuliaFormatter.jl), so please install it globally first:
When using `pre-commit`, the Julia code is formatted using [JuliaFormatter.jl](https://github.com/domluna/JuliaFormatter.jl), so please install it globally first:

```julia-repl
julia> # Press ]
Expand Down

0 comments on commit ec5b32f

Please sign in to comment.