You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-9Lines changed: 38 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,23 +14,44 @@ With FineCode you can:
14
14
15
15
## Getting started: example how to setup linting and formatting in your project
16
16
17
-
1.1 Install FineCode. The exact command depends on the package manager you are using.
17
+
1.1 Install FineCode. We recommend using dependency groups ([PEP-735](https://peps.python.org/pep-0735/)) but not all package managers support them. We will show a recommended way with which you don't need package manager at all, only `pip`, but you can adapt it also for package manager used in your project.
18
18
19
-
`pip install finecode`
19
+
1.1.1 Add `dev_workspace` dependency group to `pyproject.toml`:
20
20
21
-
1.2 Create `finecode.sh` in root of your project with path to python executable from virtualenv of the project. We recommend also to add it to .gitignore. Example:
1.1.3 Activate this venv and install dependencies from `dev_workspace` group:
29
+
```
30
+
source .venvs/dev_workspace/bin/activate
31
+
python -m pip install --group="dev_workspace"
32
+
```
26
33
27
-
Install package with the preset, for example:
34
+
NOTE: `pip install` supports `--group` parameter since pip 25.1. Make sure you have new enough version, otherwise update it: `python -m pip install --upgrade pip`.
28
35
29
-
`pip install fine_python_recommended`
36
+
1.2 Using existing preset
37
+
38
+
1.2.1 Add `dev_no_runtime` dependency group and put `fine_python_recommended` dependency in it:
For list of presets from FineCode authors see 'Presets' section below.
32
47
33
-
1.4 Enable finecode and preset
48
+
1.2.1 Run `prepare_env` finecode action:
49
+
50
+
```bash
51
+
python -m finecode run prepare_env
52
+
```
53
+
54
+
1.3 Enable finecode and preset
34
55
35
56
```toml
36
57
[tool.finecode]
@@ -39,7 +60,15 @@ presets = [
39
60
]
40
61
```
41
62
42
-
1.5 For integration with VSCode, install [FineCode extension](https://github.com/finecode-dev/finecode-vscode)
63
+
1.4 That's it! Now you can lint and format your codebase by running `lint` and `format` actions(see 'IDE Integration' and 'CLI' sections for more details).
64
+
65
+
You can customize preset, create your own, implement own actions, action handlers and more. All these possibilities are explained in details below.
66
+
67
+
## IDE Integration
68
+
69
+
### VSCode
70
+
71
+
For integration with VSCode, install [FineCode extension](https://github.com/finecode-dev/finecode-vscode)
0 commit comments