2222 }
2323 },
2424 {
25- "label" : " Build Docs " ,
25+ "label" : " Build Package " ,
2626 "type" : " shell" ,
27- "command" : " source ${workspaceRoot}/.env/bin/activate && sphinx-autobuild -E -a -b html docs/ docs/_build/" ,
28- "problemMatcher" : [],
27+ "command" : " ${config:python.pythonPath} -m tox -e pkg" ,
2928 "group" : " build" ,
30- "options" : {
31- "cwd" : " ${workspaceRoot}"
32- }
29+ "problemMatcher" : []
3330 },
3431 {
35- "label" : " Build Tutorial " ,
32+ "label" : " Jupyter " ,
3633 "type" : " shell" ,
37- "command" : " source ${workspaceRoot}/.env/bin/activate && sphinx-build -M nbtutorial docs/ docs/_build/ -E -a " ,
34+ "command" : " source ${workspaceRoot}/.env/bin/activate && jupyter-lab ${input:jupyterArgs} " ,
3835 "problemMatcher" : [],
3936 "group" : " build" ,
37+ "isBackground" : true ,
4038 "options" : {
41- "cwd" : " ${workspaceRoot }"
39+ "cwd" : " ${input:jupyterWd }"
4240 }
4341 },
4442 {
45- "label" : " Edit Gallery" ,
46- "type" : " shell" ,
47- "command" : " source ${workspaceRoot}/.env/bin/activate && jupyter-lab --no-browser" ,
48- "problemMatcher" : [],
49- "group" : " build" ,
50- "options" : {
51- "cwd" : " ${workspaceRoot}/blog/src/gallery"
52- }
53- },
54- {
55- "label" : " Edit Gallery (browser)" ,
43+ "label" : " Preview Blog" ,
5644 "type" : " shell" ,
57- "command" : " source ${workspaceRoot}/.env/bin/activate && jupyter-lab " ,
45+ "command" : " ${config:python.pythonPath} -m http.server 8001 " ,
5846 "problemMatcher" : [],
5947 "group" : " build" ,
6048 "options" : {
61- "cwd" : " ${workspaceRoot}/blog/src/gallery "
49+ "cwd" : " ${workspaceRoot}/blog/public "
6250 }
6351 },
6452 {
65- "label" : " Preview Blog " ,
53+ "label" : " Sphinx " ,
6654 "type" : " shell" ,
67- "command" : " ${config:python.pythonPath} -m http.server 8001 " ,
55+ "command" : " source ${workspaceRoot}/.env/bin/activate && make ${input:builder} " ,
6856 "problemMatcher" : [],
6957 "group" : " build" ,
7058 "options" : {
71- "cwd" : " ${workspaceRoot}/blog/public "
59+ "cwd" : " ${workspaceRoot}/docs "
7260 }
7361 },
7462 {
10391 "options" : {
10492 "cwd" : " ${workspaceRoot}"
10593 }
106- },
107- {
108- "label" : " Scratch Notebooks" ,
109- "type" : " shell" ,
110- "command" : " source ${workspaceRoot}/.env/bin/activate && jupyter-lab" ,
111- "problemMatcher" : [],
112- "group" : " build" ,
113- "options" : {
114- "cwd" : " ${workspaceRoot}/.scratch"
115- }
116- },
117- {
118- "label" : " Open Tutorial" ,
119- "type" : " shell" ,
120- "command" : " source ${workspaceRoot}/.env/bin/activate && jupyter-lab" ,
121- "problemMatcher" : [],
122- "group" : " build" ,
123- "options" : {
124- "cwd" : " ${workspaceRoot}/docs/_build/nbtutorial/users"
125- }
126- },
127- {
128- "label" : " Test File" ,
129- "type" : " shell" ,
130- "command" : " ${config:python.pythonPath} -m tox -e py38 -- ${file}" ,
131- "problemMatcher" : [],
132- "group" : " test" ,
133- "options" : {
134- "cwd" : " ${workspaceRoot}"
135- }
13694 }
13795 ],
13896 "inputs" : [
168126 ],
169127 "default" : " -e py38"
170128 },
129+ {
130+ "id" : " builder" ,
131+ "description" : " Sphinx builders" ,
132+ "type" : " pickString" ,
133+ "default" : " html" ,
134+ "options" : [
135+ {
136+ "label" : " Build HTML Docs" ,
137+ "value" : " html"
138+ },
139+ {
140+ "label" : " Build Gallery" ,
141+ "value" : " nbgallery"
142+ },
143+ {
144+ "label" : " Build Tutorial" ,
145+ "value" : " nbtutorial"
146+ },
147+ {
148+ "label" : " Test Examples" ,
149+ "value" : " doctest"
150+ },
151+ {
152+ "label" : " Test Links" ,
153+ "value" : " linkcheck"
154+ }
155+ ]
156+ },
171157 {
172158 "id" : " blogArgs" ,
173159 "description" : " Blog Arguments" ,
174160 "type" : " pickString" ,
161+ "default" : " --local" ,
175162 "options" : [
176163 {
177164 "label" : " Local" ,
189176 "label" : " Local, debug, skipping errors" ,
190177 "value" : " -vv --local --skip-failures"
191178 }
192- ],
193- "default" : " --local"
179+ ]
180+ },
181+ {
182+ "id" : " jupyterArgs" ,
183+ "description" : " Jupyter Arguments" ,
184+ "type" : " pickString" ,
185+ "default" : " " ,
186+ "options" : [
187+ {
188+ "label" : " Headless" ,
189+ "value" : " --no-browser"
190+ },
191+ {
192+ "label" : " In Browser" ,
193+ "value" : " "
194+ }
195+ ]
196+ },
197+ {
198+ "id" : " jupyterWd" ,
199+ "description" : " Working directory for jupyter" ,
200+ "type" : " pickString" ,
201+ "default" : " .scratch" ,
202+ "options" : [
203+ {
204+ "label" : " Scratch Folder" ,
205+ "value" : " .scratch"
206+ },
207+ {
208+ "label" : " Gallery" ,
209+ "value" : " blog/src/gallery"
210+ },
211+ {
212+ "label" : " Tutorial" ,
213+ "value" : " docs/_build/nbtutorial"
214+ }
215+ ]
194216 }
195217 ]
196218}
0 commit comments