Skip to content

Commit ca5ab66

Browse files
authored
devex: check in recommended vscode settings (#691)
* check in recommended vscode settings * Update settings.default.json * Add extensions recommendations * Update extensions.json * Add readme
1 parent 3ef949f commit ca5ab66

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ wandb/
136136
secrets.toml
137137

138138
# VScode settings
139-
.vscode/
139+
.vscode/*
140+
!.vscode/extensions.json
141+
!.vscode/settings.default.json
140142

141143
.DS_Store
142144

.vscode/extensions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"charliermarsh.ruff"
4+
]
5+
}

.vscode/settings.default.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"editor.defaultFormatter": "charliermarsh.ruff",
3+
"editor.codeActionsOnSave": {
4+
"notebook.source.fixAll": "explicit",
5+
// uncomment this if you don't want the editor to automatically organize imports
6+
// "source.organizeImports": "never"
7+
}
8+
}

docs/setup.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,16 @@ If you also need to install the community features, run:
252252
poetry install --with community
253253
```
254254

255-
The codebase is formatted and linted using [Ruff](https://docs.astral.sh/ruff/).
255+
The codebase is formatted and linted using [Ruff](https://docs.astral.sh/ruff/).
256256

257257
To check for linter and formatter errors, run
258+
258259
```
259260
make lint
260261
```
261262

262263
To apply automatic fixes, run
264+
263265
```
264266
make lint-fix
265267
```
@@ -271,11 +273,17 @@ Run type checker:
271273
- Run with `pyright`
272274
- Configure in [pyproject.toml](../pyproject.toml) under `[tool.pyright]`
273275

276+
### VSCode recommendations
277+
278+
- Install the [Ruff VSCode Extension](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff)
279+
- Copy the contents of `.vscode/settings.default.json` into `.vscode/settings.json`
280+
274281
## Setting up the Environment Variables
275282

276283
**Please confirm that you have at least one configuration of the Cohere Platform, SageMaker, Bedrock or Azure.**
277284

278285
You have two methods to set up the environment variables:
286+
279287
1. Run `make setup` and follow the instructions to configure it.
280288
2. Copy the contents of `configuration.template.yaml` and `secrets.template.yaml` files to new `configuration.yaml` and `secrets.yaml` files.
281289

0 commit comments

Comments
 (0)