Skip to content

Commit

Permalink
devex: check in recommended vscode settings (cohere-ai#691)
Browse files Browse the repository at this point in the history
* check in recommended vscode settings

* Update settings.default.json

* Add extensions recommendations

* Update extensions.json

* Add readme
  • Loading branch information
mkozakov authored Aug 23, 2024
1 parent 3ef949f commit ca5ab66
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ wandb/
secrets.toml

# VScode settings
.vscode/
.vscode/*
!.vscode/extensions.json
!.vscode/settings.default.json

.DS_Store

Expand Down
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"charliermarsh.ruff"
]
}
8 changes: 8 additions & 0 deletions .vscode/settings.default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"notebook.source.fixAll": "explicit",
// uncomment this if you don't want the editor to automatically organize imports
// "source.organizeImports": "never"
}
}
10 changes: 9 additions & 1 deletion docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,16 @@ If you also need to install the community features, run:
poetry install --with community
```

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

To check for linter and formatter errors, run

```
make lint
```

To apply automatic fixes, run

```
make lint-fix
```
Expand All @@ -271,11 +273,17 @@ Run type checker:
- Run with `pyright`
- Configure in [pyproject.toml](../pyproject.toml) under `[tool.pyright]`

### VSCode recommendations

- Install the [Ruff VSCode Extension](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff)
- Copy the contents of `.vscode/settings.default.json` into `.vscode/settings.json`

## Setting up the Environment Variables

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

You have two methods to set up the environment variables:

1. Run `make setup` and follow the instructions to configure it.
2. Copy the contents of `configuration.template.yaml` and `secrets.template.yaml` files to new `configuration.yaml` and `secrets.yaml` files.

Expand Down

0 comments on commit ca5ab66

Please sign in to comment.