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
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,31 @@ presets = [
43
43
44
44
1.5 For integration with VSCode, install [FineCode extension](https://github.com/finecode-dev/finecode-vscode)
45
45
46
+
## CLI
47
+
48
+
In virtualenv of your project you can use the following command:
49
+
50
+
`python -m finecode run [run_options] <list_of_actions> [actions_payload]`
51
+
52
+
Available run options:
53
+
54
+
-`--workdir="<path>"` ... use provided directory as work directory
55
+
-`--project="<name>"` ... run actions only in this project. Multiple projects can be selected by providing multiple `--project="<name>"` options
56
+
-`--concurrently` ... run actions concurrently. Single projects are always handled concurrently, this option determines whether actions inside of single project are run concurrently or not
If no projects are provided via options, FineCode will interpret working directory as workspace root, find all projects in it and run provided actions in all projects, in which they exist.
60
+
61
+
If projects are provided, actions are expected to exist in all of them.
62
+
63
+
Actions payload: if actions require payload or you want to run them with payload other than configured, you can provide it after names of actions.
64
+
65
+
Examples:
66
+
67
+
-`python -m finecode run --concurrently lint check_formatting` ... run `lint` and `check_formatting` actions concurrently in all projects in the workspace, root of which is in current working directory
68
+
-`python -m finecode --workdir="./finecode_extension_api" run lint check_formatting` ... run `lint` and `check_formatting` sequentially in `finecode_extension_api` directory (project is there)
69
+
-`python -m finecode --project="fine_python_mypy" --project="fine_python_ruff" run lint` ... run `lint` action in projects `fine_python_mypy` and `fine_python_ruff`. They should be discoverable from the working directory.
70
+
46
71
## Extensions from FineCode authors
47
72
48
73
### Presets
@@ -66,3 +91,20 @@ presets = [
66
91
IDE
67
92
68
93
TODO: list all from LSP
94
+
95
+
## Workspace with multiple subprojects
96
+
97
+
### Reusing config
98
+
99
+
To reuse configuration in multiple subprojects, put it in a separate package in your workspace and add it as dev dependency in all subprojects in which you want to use it.
100
+
101
+
Design decision: there are multiple ways to achieve the same result:
102
+
103
+
- separate package
104
+
- configuration of subprojects doesn't depend on file structure of the workspace. Subproject can be moved in another place or even outside of workspace and this will not affect its configuration, only if path to package with common configuration was file path, it should be changed.
105
+
- fully transparent: the full configuration is known in a subproject without searching workspace root and analyzing the workspace
106
+
- hierarchical configuration
107
+
- makes subprojects more dependent on workspace, in case of moving subproject, additional actions with configurations are needed to keep it the same
108
+
- letting to define reusable part on workspace level and provide it automatically to all subprojects
109
+
- not transparent, part of configuration is implicit
110
+
- FineCode needs to check whether it was started in workspace or in subproject, go deeper in file tree and find workspace root to resolve all configurations
0 commit comments