File tree Expand file tree Collapse file tree
src/client/datascience/jupyter Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # -------------------------------------------------------------------------------------------------------------
2+ # Copyright (c) Microsoft Corporation. All rights reserved.
3+ # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
4+ # -------------------------------------------------------------------------------------------------------------
5+
6+ FROM node:8
7+
8+ # Configure apt
9+ ENV DEBIAN_FRONTEND=noninteractive
10+ RUN apt-get update \
11+ && apt-get -y install --no-install-recommends apt-utils 2>&1
12+
13+ # Verify git and needed tools are installed
14+ RUN apt-get install -y git procps
15+
16+ # Remove outdated yarn from /opt and install via package
17+ # so it can be easily updated via apt-get upgrade yarn
18+ RUN rm -rf /opt/yarn-* \
19+ && rm -f /usr/local/bin/yarn \
20+ && rm -f /usr/local/bin/yarnpkg \
21+ && apt-get install -y curl apt-transport-https lsb-release \
22+ && curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]' )/pubkey.gpg | apt-key add - 2>/dev/null \
23+ && echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
24+ && apt-get update \
25+ && apt-get -y install --no-install-recommends yarn
26+
27+ # Install tslint and typescript
28+ RUN npm install -g tslint typescript
29+
30+ # Clean up
31+ RUN apt-get autoremove -y \
32+ && apt-get clean -y \
33+ && rm -rf /var/lib/apt/lists/*
34+ ENV DEBIAN_FRONTEND=dialog
Original file line number Diff line number Diff line change 1+ // See https://aka.ms/vscode-remote/devcontainer.json for format details.
2+ {
3+ "name" : " Node.js 8 & TypeScript" ,
4+ "dockerFile" : " Dockerfile" ,
5+ "extensions" : [
6+ " ms-vscode.vscode-typescript-tslint-plugin"
7+ ]
8+ }
Original file line number Diff line number Diff line change 22{
33 "version" : " 0.1.0" ,
44 "configurations" : [
5+ {
6+ "name" : " Extension inside container" ,
7+ "type" : " extensionHost" ,
8+ "request" : " launch" ,
9+ "runtimeExecutable" : " ${execPath}" ,
10+ "args" : [
11+ " --extensionDevelopmentPath=${workspaceFolder}" , " ${workspaceFolder}/data"
12+ ],
13+ "stopOnEntry" : false ,
14+ "smartStep" : true ,
15+ "sourceMaps" : true ,
16+ "outFiles" : [
17+ " ${workspaceFolder}/out/**/*"
18+ ],
19+ "preLaunchTask" : " Compile"
20+ },
521 {
622 "name" : " Python: Current File with iPython" ,
723 "type" : " python" ,
Original file line number Diff line number Diff line change 1+ {
2+ "python.pythonPath" : " /usr/bin/python3"
3+ }
Load diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1+ #%%
2+ print ('hello' )
Original file line number Diff line number Diff line change 1+ Fix problems if other language kernels are installed that are using python under the covers (bash is one such example).
Original file line number Diff line number Diff line change @@ -590,14 +590,17 @@ export class JupyterExecutionBase implements IJupyterExecution {
590590 const spec = specs [ i ] ;
591591 let score = 0 ;
592592
593- if ( spec && spec . path && spec . path . length > 0 && info && spec . path === info . path ) {
594- // Path match
595- score += 10 ;
596- }
593+ // First match on language. No point if not python.
597594 if ( spec && spec . language && spec . language . toLocaleLowerCase ( ) === 'python' ) {
598595 // Language match
599596 score += 1 ;
600597
598+ // See if the path matches. Don't bother if the language doesn't.
599+ if ( spec && spec . path && spec . path . length > 0 && info && spec . path === info . path ) {
600+ // Path match
601+ score += 10 ;
602+ }
603+
601604 // See if the version is the same
602605 if ( info && info . version && specDetails [ i ] ) {
603606 const details = specDetails [ i ] ;
You can’t perform that action at this time.
0 commit comments