-
Notifications
You must be signed in to change notification settings - Fork 96
Expand file tree
/
Copy pathfreesound.code-workspace
More file actions
174 lines (173 loc) · 4.51 KB
/
freesound.code-workspace
File metadata and controls
174 lines (173 loc) · 4.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
{
"folders": [
{
"name": "freesound",
"path": "."
},
{
"name": "freesound-deploy",
"path": "../freesound-deploy"
},
{
"name": "freesound-audio-analyzers",
"path": "../freesound-audio-analyzers"
},
{
"name": "freesound-data",
"path": "freesound-data"
}
],
"launch": {
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
"type": "python",
"request": "attach",
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "/code"
}
],
"port": 3000,
"host": "127.0.0.1",
}
]
},
"tasks": {
"version": "2.0.0",
"inputs": [
{
"id": "appName",
"type": "promptString",
"description": "Enter the Django app name or test module name to run tests (leave empty to run all tests)"
},
{
"id": "commandName",
"type": "promptString",
"description": "Enter the Django management command name to be run (leave empty to print list of available commands)"
}
],
"tasks": [
{
"label": "Docker compose build",
"type": "shell",
"command": "docker compose build",
"problemMatcher": []
},
{
"label": "Build static",
"type": "shell",
"command": "docker compose run --rm frontend_builder npm run build",
"problemMatcher": []
},
{
"label": "Clear caches",
"type": "shell",
"command": "rm freesound-data/_cache/*",
"problemMatcher": []
},
{
"label": "Create caches",
"type": "shell",
"command": "docker compose run --rm web python manage.py create_front_page_caches && docker compose run --rm web python manage.py create_random_sounds && docker compose run --rm web python manage.py generate_geotags_bytearray",
"problemMatcher": []
},
{
"label": "Run tests",
"type": "shell",
"command": "docker compose run --rm web pytest ${input:appName}",
"problemMatcher": []
},
{
"label": "Run tests verbose",
"type": "shell",
"command": "docker compose run --rm web pytest ${input:appName}-vv",
"problemMatcher": []
},
{
"label": "Run tests for search engine",
"type": "shell",
"command": "docker compose run --rm web pytest -m \"search_engine\"",
"problemMatcher": []
},
{
"label": "Migrate",
"type": "shell",
"command": "docker compose run --rm web python manage.py migrate",
"problemMatcher": []
},
{
"label": "Make migrations",
"type": "shell",
"command": "docker compose run --rm web python manage.py makemigrations",
"problemMatcher": []
},
{
"label": "Shell plus",
"type": "shell",
"command": "docker compose run --rm web python manage.py shell_plus",
"problemMatcher": []
},
{
"label": "Reindex search engine",
"type": "shell",
"command": "docker compose run --rm web python manage.py reindex_search_engine_sounds && docker compose run --rm web python manage.py reindex_search_engine_forum",
"problemMatcher": []
},
{
"label": "Reindex search engine (include sim vectors)",
"type": "shell",
"command": "docker compose run --rm web python manage.py reindex_search_engine_sounds --include-similarity-vectors && docker compose run --rm web python manage.py reindex_search_engine_forum",
"problemMatcher": []
},
{
"label": "Post dirty sounds to search engine",
"type": "shell",
"command": "docker compose run --rm web python manage.py post_dirty_sounds_to_search_engine",
"problemMatcher": []
},
{
"label": "Orchestrate analysis",
"type": "shell",
"command": "docker compose run --rm web python manage.py orchestrate_analysis",
"problemMatcher": []
},
{
"label": "Run management command",
"type": "shell",
"command": "docker compose run --rm web python manage.py ${input:commandName}",
"problemMatcher": []
},
{
"label": "Build API docs",
"type": "shell",
"command": "docker compose run --rm web bash -c \"cd _docs/api/ && make html\"",
"problemMatcher": []
},
{
"label": "Start API docs server",
"type": "shell",
"command": "cd _docs/api/build/html && python -m http.server 8008",
"problemMatcher": []
},
{
"label": "Run psql",
"type": "shell",
"command": "docker compose run --rm db psql -h db -U freesound -d freesound",
"problemMatcher": []
}
]
},
"settings": {
"python.defaultInterpreterPath": ".venv/bin/python",
"files.associations": {
"*.html": "django-html"
},
"[python]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "charliermarsh.ruff"
}
}
}