Skip to content

Commit ea4c05a

Browse files
committed
new vscode workspace
1 parent c07ebb6 commit ea4c05a

38 files changed

+563
-471
lines changed

.github/workflows/backend_checks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ jobs:
6060
docker compose -f compose.ray.yml build
6161
docker compose -f compose.ray.yml up --wait
6262
fi
63-
COMPOSE_PROFILES="weaviate,rq,backend" docker compose build
64-
COMPOSE_PROFILES="weaviate,rq" docker compose up --wait --quiet-pull
63+
COMPOSE_PROFILES="rq,backend" docker compose build
64+
COMPOSE_PROFILES="rq" docker compose up --wait --quiet-pull
6565
- name: Check 1 - pytest runs without errors
6666
working-directory: docker
6767
run: |
@@ -89,7 +89,7 @@ jobs:
8989
working-directory: docker
9090
run: |
9191
source .env
92-
COMPOSE_PROFILES="weaviate,rq,backend" docker compose up --wait --quiet-pull
92+
COMPOSE_PROFILES="rq,backend" docker compose up --wait --quiet-pull
9393
- name: Check 6 - Test End-2-End importer script
9494
working-directory: backend
9595
env:

.github/workflows/frontend_checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
env:
1616
API_WORKERS: 1
1717
VITE_APP_SERVER: http://localhost:13120
18-
COMPOSE_PROFILES: "weaviate,rq,backend,frontend"
18+
COMPOSE_PROFILES: "rq,backend,frontend"
1919
BACKEND_HAS_CHANGED: false
2020
RAY_HAS_CHANGED: false
2121
steps:

.pre-commit-config.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,20 @@ repos:
1414
hooks:
1515
# Run the linter.
1616
- id: ruff
17+
name: "Ruff (backend)"
1718
args: [--fix, --config=backend/pyproject.toml]
19+
files: ^backend/.*\.py$
1820
# Run the formatter.
1921
- id: ruff-format
22+
name: "Ruff Format (backend)"
23+
files: ^backend/.*\.py$
2024
- repo: local
2125
hooks:
22-
- id: pyright
23-
name: "Pyright"
26+
- id: pyright-backend
27+
name: "Pyright (backend)"
2428
entry: bash -c 'source backend/.venv/bin/activate && pyright --project backend "$@"' --
2529
language: system
26-
files: \.py$
30+
files: ^backend/.*\.py$
2731
- repo: https://github.com/pre-commit/mirrors-eslint
2832
rev: v9.22.0
2933
hooks:
@@ -41,10 +45,10 @@ repos:
4145
rev: "v4.0.0-alpha.8"
4246
hooks:
4347
- id: prettier
44-
files: \.([jt]sx?|json)$ # *.js, *.jsx, *.ts, *.tsx, *.json
48+
files: \.([jt]sx?|json|ya?ml)$ # *.js, *.jsx, *.ts, *.tsx, *.json, *.yml, *.yaml
4549
args: [
46-
--print-width,
47-
"120",
50+
"--config",
51+
".prettierrc.yaml",
4852
# Without this, prettier will create a `node_modules` folder in the repository root
4953
"--cache-location",
5054
"frontend/node_modules/.cache/prettier",

.prettierrc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "printWidth": 120 }

.vscode/dats.code-workspace

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"folders": [
3+
{
4+
"name": "dats",
5+
"path": "..",
6+
},
7+
{
8+
"name": "backend",
9+
"path": "../backend",
10+
},
11+
{
12+
"name": "frontend",
13+
"path": "../frontend",
14+
},
15+
],
16+
// global workspace settings
17+
"settings": {
18+
// general
19+
"editor.formatOnSave": true,
20+
"editor.codeActionsOnSave": {
21+
"source.organizeImports": "explicit",
22+
},
23+
"files.insertFinalNewline": true,
24+
// ruff
25+
"ruff.enable": true,
26+
"ruff.nativeServer": "on",
27+
"ruff.importStrategy": "useBundled",
28+
"ruff.configuration": "ruff.toml",
29+
// formatting
30+
"[yaml]": {
31+
"editor.tabSize": 2,
32+
"editor.insertSpaces": true,
33+
},
34+
"[python]": {
35+
"editor.defaultFormatter": "charliermarsh.ruff",
36+
},
37+
"[dockercompose]": {
38+
"editor.defaultFormatter": "esbenp.prettier-vscode",
39+
},
40+
"[javascript]": {
41+
"editor.defaultFormatter": "esbenp.prettier-vscode",
42+
},
43+
"[typescript]": {
44+
"editor.defaultFormatter": "esbenp.prettier-vscode",
45+
},
46+
"[javascriptreact]": {
47+
"editor.defaultFormatter": "esbenp.prettier-vscode",
48+
},
49+
"[typescriptreact]": {
50+
"editor.defaultFormatter": "esbenp.prettier-vscode",
51+
},
52+
"[json]": {
53+
"editor.defaultFormatter": "esbenp.prettier-vscode",
54+
},
55+
// python
56+
"python.analysis.autoFormatStrings": true,
57+
"python.analysis.typeCheckingMode": "basic",
58+
"python.analysis.diagnosticMode": "workspace",
59+
// pytest
60+
"python.testing.autoTestDiscoverOnSaveEnabled": false,
61+
},
62+
"extensions": {
63+
"recommendations": [
64+
// copilot
65+
"github.copilot",
66+
"github.copilot-chat",
67+
// docker
68+
"ms-azuretools.vscode-containers",
69+
// git
70+
"eamodio.gitlens",
71+
"github.vscode-github-actions",
72+
// backend
73+
"ms-python.python",
74+
"ms-python.debugpy",
75+
"ms-python.vscode-pylance",
76+
"charliermarsh.ruff",
77+
// frontend
78+
"dbaeumer.vscode-eslint",
79+
"esbenp.prettier-vscode",
80+
],
81+
},
82+
}

.vscode/extensions.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

.vscode/launch.json

Lines changed: 0 additions & 100 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 11 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,18 @@
11
{
22
// general
3-
"editor.formatOnSave": true,
4-
"editor.codeActionsOnSave": {
5-
"source.organizeImports": "explicit"
3+
"files.exclude": {
4+
"airflow": true,
5+
"backend": true,
6+
"frontend": true
67
},
7-
"files.insertFinalNewline": true,
8-
9-
// python
10-
"python.envFile": "${workspaceFolder}/backend/.env",
11-
"python.autoComplete.extraPaths": ["${workspaceFolder}/backend/src"],
12-
"python.analysis.diagnosticMode": "workspace",
13-
"python.analysis.extraPaths": ["${workspaceFolder}/backend/src"],
14-
"python.analysis.autoFormatStrings": true,
15-
"python.analysis.typeCheckingMode": "basic",
16-
"python.analysis.pyrightVersion": "1.1.385", // this has to match pyproject.toml
17-
"python.analysis.exclude": ["**/node_modules", "**/__pycache__", ".git", "**/.venv", "**/docker"],
18-
19-
// pytest
20-
"python.testing.unittestEnabled": false,
21-
"python.testing.pytestEnabled": true,
22-
"python.testing.cwd": "${workspaceFolder}/backend",
23-
"python.testing.pytestArgs": ["-c", "pyproject.toml"],
24-
"python.testing.autoTestDiscoverOnSaveEnabled": false,
25-
26-
// ruff (python linter)
27-
"ruff.configuration": "./backend/pyproject.toml",
28-
29-
// frontend
30-
"javascript.preferences.importModuleSpecifierEnding": "js",
31-
"typescript.preferences.importModuleSpecifierEnding": "js",
328

339
// prettier
34-
"prettier.prettierPath": "./frontend/node_modules/prettier",
35-
"prettier.configPath": "./frontend/package.json",
10+
"prettier.prettierPath": "frontend/node_modules/prettier",
11+
"prettier.configPath": ".prettierrc.yaml",
3612

37-
// formatting
38-
"[yaml]": {
39-
"editor.tabSize": 2,
40-
"editor.insertSpaces": true
41-
},
42-
"[dockercompose]": {
43-
"editor.defaultFormatter": "esbenp.prettier-vscode"
44-
},
45-
"[javascript]": {
46-
"editor.defaultFormatter": "esbenp.prettier-vscode"
47-
},
48-
"[typescript]": {
49-
"editor.defaultFormatter": "esbenp.prettier-vscode"
50-
},
51-
"[javascriptreact]": {
52-
"editor.defaultFormatter": "esbenp.prettier-vscode"
53-
},
54-
"[typescriptreact]": {
55-
"editor.defaultFormatter": "esbenp.prettier-vscode"
56-
},
57-
"[json]": {
58-
"editor.defaultFormatter": "esbenp.prettier-vscode"
59-
}
13+
// ruff
14+
"ruff.interpreter": ["${workspaceFolder:backend}/.venv/bin/python"],
15+
16+
// python
17+
"python.analysis.exclude": ["*"]
6018
}

0 commit comments

Comments
 (0)