Skip to content

Commit

Permalink
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -111,7 +111,7 @@
],
"outFiles": ["${workspaceFolder}/out/**/*.*"],
"sourceMaps": true,
"preLaunchTask": "Start Jupyter Server",
"preLaunchTask": "Start Jupyter Server", // Update the env variables for this script in tasks.json with a remote URI to use your own
"postDebugTask": "Stop Jupyter Server",
"presentation": {
"group": "2_tests",
3 changes: 2 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -87,7 +87,8 @@
"problemMatcher": [],
"options": {
"env": {
"CI_PYTHON_PATH": "" // Update with path to real python interpereter used for testing.
"CI_PYTHON_PATH": "", // Update with path to real python interpereter used for testing.
"EXISTING_JUPYTER_URI": "", // Update with a server that you started yourself to avoid this script doing it
}
}
},
9 changes: 7 additions & 2 deletions build/preDebugWebTest.js
Original file line number Diff line number Diff line change
@@ -8,8 +8,13 @@ const jsonc = require('jsonc-parser');

const settingsFile = path.join(__dirname, '..', 'src', 'test', 'datascience', '.vscode', 'settings.json');
async function go() {
const { server, url } = await startJupyter(true);
fs.writeFileSync(path.join(__dirname, '..', 'temp', 'jupyter.pid'), server.pid.toString());
let url = process.env.EXISTING_JUPYTER_URI;
if (!url) {
const { server, url } = await startJupyter(true);
fs.writeFileSync(path.join(__dirname, '..', 'temp', 'jupyter.pid'), server.pid.toString());
} else {
console.log('Jupyter server URL provided in env args, no need to start one');
}
const settingsJson = fs.readFileSync(settingsFile).toString();
const edits = jsonc.modify(settingsJson, ['jupyter.DEBUG_JUPYTER_SERVER_URI'], url, {});
const updatedSettingsJson = jsonc.applyEdits(settingsJson, edits);

0 comments on commit 1fc2003

Please sign in to comment.