Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
2b7580a
Set up UI button
joyceerhl Jul 4, 2019
3b78f6f
Add gather files
joyceerhl Jul 4, 2019
0245d13
Fix typo
joyceerhl Jul 4, 2019
9fa557c
Add GatherExecution to JupyterServer
joyceerhl Jul 4, 2019
ba0924e
Set up sending messages from MainPanel to InteractiveWindow
joyceerhl Jul 4, 2019
8f57458
Delete unnecessary files
joyceerhl Jul 4, 2019
14b806b
Add missing types to @phosphor/coreutils .d.ts file
joyceerhl Jul 4, 2019
b7896c8
Fix compilation errors
joyceerhl Jul 4, 2019
8f0a75a
Merge branch 'master' into t-huer/gather2
joyceerhl Jul 4, 2019
a4751d1
Implement INotebookExecutionLogger interface
joyceerhl Jul 5, 2019
a34304c
Cast vscodeLanguageClient.CompletionItem to any to fix build err
joyceerhl Jul 5, 2019
31778fd
Await on method calls for gatherExecution
joyceerhl Jul 5, 2019
7a8c39b
Add GatherExecution to ServiceRegistry
joyceerhl Jul 5, 2019
ecdb52b
Add jison and parser build script
joyceerhl Jul 5, 2019
ab55fd0
Temporarily disable tsc checks
joyceerhl Jul 5, 2019
af21426
Define IGatherExecution after INotebookExecutionLogger
joyceerhl Jul 5, 2019
7ea8067
Regen package-lock
joyceerhl Jul 5, 2019
b2a2bbb
Add gather svg
joyceerhl Jul 5, 2019
636d592
Add missing type to @phosphor/coreutils .d.ts file
joyceerhl Jul 5, 2019
36b1e0d
Delete gather tests for now
joyceerhl Jul 5, 2019
04da72a
Resolve merge conflicts, regen package-lock.json
joyceerhl Jul 5, 2019
10d3c83
Add @jupyterlab dependencies
joyceerhl Jul 5, 2019
ff24947
Correctly implement INotebookExecutionLogger
joyceerhl Jul 7, 2019
0e8c197
Remove wip gulp task
joyceerhl Jul 7, 2019
df04c20
Copy parser to out as part of gulp compile task
joyceerhl Jul 8, 2019
f7306ab
Remove unnecessary signal emission
joyceerhl Jul 8, 2019
4d63d68
Remove deepCopy() call since convertVscToGatherCell does the same
joyceerhl Jul 8, 2019
db42a41
Restore tsconfig settings
joyceerhl Jul 8, 2019
9b2b674
Move perf timing back into executeObservable
joyceerhl Jul 8, 2019
64d994d
Rm unused import
joyceerhl Jul 8, 2019
cc78b49
Resolve merge conflicts
joyceerhl Jul 8, 2019
926bf56
Rm unused import
joyceerhl Jul 8, 2019
5fc80a4
Make sure we get the same instance of GatherExecution
joyceerhl Jul 9, 2019
1be55a2
Works!
joyceerhl Jul 9, 2019
fbd9795
Fix bug in lexer
joyceerhl Jul 9, 2019
5b90d8f
Merge branch 'master' into t-huer/gather2
joyceerhl Jul 9, 2019
2b96d9e
Use traceInfo and traceError instead of this.logger
joyceerhl Jul 9, 2019
dccda38
Exclude functions which don't modify their args
joyceerhl Jul 9, 2019
4b41d98
Do not render gather button on edit cell
joyceerhl Jul 9, 2019
f1e1273
Resolve merge conflicts
joyceerhl Jul 9, 2019
f3a365c
Add newline after each slice for readability
joyceerhl Jul 9, 2019
9c7553c
Remove console.log calls
joyceerhl Jul 9, 2019
2efdd3d
Ignore df.tail
joyceerhl Jul 9, 2019
25dbd08
Only render gather code button for code cells with outputs
joyceerhl Jul 9, 2019
348ecff
Add unit tests
joyceerhl Jul 10, 2019
785fd41
Rename to *.unit.test.ts
joyceerhl Jul 10, 2019
afc0d43
Move cell marker stripping back
joyceerhl Jul 10, 2019
9b489bc
Render gather button on all code cells
joyceerhl Jul 10, 2019
cec5f4a
Add jsdoc comments to GatherExecution
joyceerhl Jul 10, 2019
7858172
Move cell marker stripping back
joyceerhl Jul 11, 2019
89236d9
Parser TypeErrors on empty string
joyceerhl Jul 11, 2019
443d130
Merge branch 'viewhist' into t-huer/gather2
joyceerhl Jul 11, 2019
612431e
Open gathered code over origin file, another visible editor, or besid…
joyceerhl Jul 11, 2019
4634655
Merge branch 'master' into t-huer/gather2
joyceerhl Jul 11, 2019
daf3901
Update build script since settingregistry.d.ts for @jupyterlab/coreut…
joyceerhl Jul 11, 2019
8a3426a
Merge branch 'master' into t-huer/gather2
joyceerhl Jul 11, 2019
b43c64c
Add traceInfo, rename executionLogger, add comment at top of gathered…
joyceerhl Jul 12, 2019
99b36ae
Don't set the language of the gathered script as intellisense + codel…
joyceerhl Jul 12, 2019
46283e5
Merge branch 'master' into t-huer/gather2
joyceerhl Jul 12, 2019
6b8b1d8
Bug fix, ensure that IPython get_ipython is imported
joyceerhl Jul 12, 2019
5a84e69
Fix bug where gathered code was opening on top of interactive window …
joyceerhl Jul 12, 2019
2db11a0
Merge branch 'master' into t-huer/gather2
joyceerhl Jul 12, 2019
4a171b2
Follow what's done in interactiveWindowCommandListener.viewDocument
joyceerhl Jul 12, 2019
b9be267
Merge branch 'master' into t-huer/gather2
joyceerhl Jul 13, 2019
154d8cd
Merge branch 'master' into t-huer/gather2
joyceerhl Jul 15, 2019
33fcafa
Remove verbose logging
joyceerhl Jul 16, 2019
7e560e3
Merge master
joyceerhl Jul 17, 2019
b227693
Merge t-huer/gather2
joyceerhl Jul 17, 2019
62077b8
Add function test
joyceerhl Jul 17, 2019
18cf37d
Minor linter fix
joyceerhl Jul 17, 2019
50f9934
Get functional test passing
joyceerhl Jul 18, 2019
7892437
Fix failing tests
joyceerhl Jul 18, 2019
3d14cd1
Wrap gatherCode function with public facing implementation
joyceerhl Jul 18, 2019
26e90ab
Add test for gather code button
joyceerhl Jul 18, 2019
d5a8bfb
Merge master
joyceerhl Jul 18, 2019
3a9a8e3
Fix variable naming
joyceerhl Jul 19, 2019
5f6df39
Add functional test for code added from an editor
joyceerhl Jul 19, 2019
0fac350
Copy parser when compiling
joyceerhl Jul 19, 2019
b4e3f1e
Add updated Gather parser
joyceerhl Jul 19, 2019
8540fc8
Merge branch 'master' into t-huer/gather2
joyceerhl Jul 19, 2019
e12004d
Allow users to edit default slicing rules via settings.json
joyceerhl Jul 20, 2019
76f4a87
Update test to pass in configService to gatherExecution
joyceerhl Jul 20, 2019
ed0af1f
Merge master
joyceerhl Jul 20, 2019
e5cfabd
Fix naming convention
joyceerhl Jul 20, 2019
9d49fe4
Ensure that GatherExecution.DataflowAnalyzer.sliceConfiguration is up…
joyceerhl Jul 20, 2019
68018fc
Technically it's a unit test
joyceerhl Jul 22, 2019
de91ddb
Add script to build python parser from jison
joyceerhl Jul 22, 2019
2896013
Don't parse code cells whose contents are just comments. Otherwise Ty…
joyceerhl Jul 22, 2019
fb1500e
Minor edits
joyceerhl Jul 22, 2019
6e1b8c8
Enable flatMap
joyceerhl Jul 23, 2019
5f56f9c
Find uses in classes
joyceerhl Jul 23, 2019
6300369
Use the new MSR python-program-analysis npm package
joyceerhl Jul 24, 2019
9cdad18
Remove scripts for parser since we're using the npm package now
joyceerhl Jul 24, 2019
8af6bdc
Don't need flatMap
joyceerhl Jul 24, 2019
d010d63
Merge branch 'master' into t-huer/gather2
joyceerhl Jul 24, 2019
109c538
Bump @msrvida/python-program-analysis, remove unneeded dependencies
joyceerhl Jul 24, 2019
afc8687
Update package-lock
joyceerhl Jul 24, 2019
5dfa07b
Postinstall script needs to look elsewhere for the settingregistry file
joyceerhl Jul 24, 2019
5dab648
Use npm package for slicing functionality too
joyceerhl Jul 24, 2019
a771328
Fix build errors
joyceerhl Jul 24, 2019
c2cb7de
Minor change
joyceerhl Jul 24, 2019
b5b8950
Restore strict mode
joyceerhl Jul 24, 2019
1175718
Remove unneeded code
joyceerhl Jul 24, 2019
23feae3
Bump @msrvida/python-program/analysis version
joyceerhl Jul 25, 2019
2be486c
Merge branch 'master' into t-huer/gather
joyceerhl Jul 25, 2019
ca9a943
Merge master
joyceerhl Jul 31, 2019
ef267c0
Update to use Rich's new MockDocument constructor signature
joyceerhl Jul 31, 2019
ef877eb
Put gather single cell behind a feature flag
joyceerhl Jul 31, 2019
ad1e699
Merge master
joyceerhl Jul 31, 2019
3266677
Update datascience dependencies
joyceerhl Jul 31, 2019
a30bf51
Remove extra comma
joyceerhl Jul 31, 2019
69f79fc
Use traceError instead of console.error
joyceerhl Jul 31, 2019
e09790f
Move listening for gather feature flag change into GatherExecution
joyceerhl Jul 31, 2019
c898ad5
Fix breaking unit tests
joyceerhl Jul 31, 2019
292e947
Handle GatherCode message in a listener
joyceerhl Jul 31, 2019
041e3c1
Add reload button
joyceerhl Jul 31, 2019
8023324
Add news entry
joyceerhl Jul 31, 2019
f201c48
Merge master
joyceerhl Jul 31, 2019
3735488
Probably shouldn't have changed that, although this does fail code hy…
joyceerhl Aug 1, 2019
5143d2c
Add missing dependency that VSIX wants
joyceerhl Aug 1, 2019
c3ee42b
Oops, take that dependency back out
joyceerhl Aug 1, 2019
2933af0
Add to react helpers
joyceerhl Aug 1, 2019
3ba2951
Add more missing dom4 stuff
joyceerhl Aug 1, 2019
7766c36
Code hygiene
joyceerhl Aug 1, 2019
8eb0d91
Fix failing functional test
joyceerhl Aug 1, 2019
f9a4c83
Force version to be 0.1.0
joyceerhl Aug 1, 2019
33d329b
Use issue number
joyceerhl Aug 1, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"obj": true,
"bin": true,
"**/__pycache__": true,
"node_modules": true,
"**/.mypy_cache/**": true,
"**/.ropeproject/**": true
},
Expand Down
38 changes: 22 additions & 16 deletions build/ci/postInstall.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const colors = require("colors/safe");
const fs = require("fs");
const path = require("path");
const constants_1 = require("../constants");
exports.__esModule = true;
var colors = require("colors/safe");
var fs = require("fs");
var path = require("path");
var constants_1 = require("../constants");
/**
* In order to compile the extension in strict mode, one of the dependencies (@jupyterlab) has some files that
* just won't compile in strict mode.
Expand All @@ -14,23 +14,29 @@ const constants_1 = require("../constants");
* The solution is to modify the type definition file after `npm install`.
*/
function fixJupyterLabDTSFiles() {
const relativePath = path.join('node_modules', '@jupyterlab', 'coreutils', 'lib', 'settingregistry.d.ts');
const filePath = path.join(constants_1.ExtensionRootDir, relativePath);
var relativePath = path.join('node_modules', '@jupyterlab', 'services', 'node_modules', '@jupyterlab', 'coreutils', 'lib', 'settingregistry.d.ts');
Comment thread
rchiodo marked this conversation as resolved.
var filePath = path.join(constants_1.ExtensionRootDir, relativePath);
if (!fs.existsSync(filePath)) {
throw new Error(`Type Definition file from JupyterLab not found '${filePath}' (pvsc post install script)`);
throw new Error("Type Definition file from JupyterLab not found '" + filePath + "' (pvsc post install script)");
}
const fileContents = fs.readFileSync(filePath, { encoding: 'utf8' });
var fileContents = fs.readFileSync(filePath, { encoding: 'utf8' });
if (fileContents.indexOf('[key: string]: ISchema | undefined;') > 0) {
// tslint:disable-next-line:no-console
console.log(colors.blue(`${relativePath} file already updated (by Python VSC)`));
console.log(colors.blue(relativePath + " file already updated (by Python VSC)"));
return;
}
const replacedText = fileContents.replace('[key: string]: ISchema;', '[key: string]: ISchema | undefined;');
if (fileContents === replacedText) {
throw new Error('Fix for JupyterLabl file \'settingregistry.d.ts\' failed (pvsc post install script)');
if (fileContents.indexOf('[key: string]: ISchema;') > 0) {
var replacedText = fileContents.replace('[key: string]: ISchema;', '[key: string]: ISchema | undefined;');
if (fileContents === replacedText) {
throw new Error('Fix for JupyterLabl file \'settingregistry.d.ts\' failed (pvsc post install script)');
}
fs.writeFileSync(filePath, replacedText);
// tslint:disable-next-line:no-console
console.log(colors.green(relativePath + " file updated (by Python VSC)"));
}
else {
// tslint:disable-next-line:no-console
console.log(colors.red(relativePath + " file does not need updating."));
}
fs.writeFileSync(filePath, replacedText);
// tslint:disable-next-line:no-console
console.log(colors.green(`${relativePath} file updated (by Python VSC)`));
}
fixJupyterLabDTSFiles();
20 changes: 14 additions & 6 deletions build/ci/postInstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import { ExtensionRootDir } from '../constants';
*/
function fixJupyterLabDTSFiles() {
const relativePath = path.join(
'node_modules',
'@jupyterlab',
'services',
'node_modules',
'@jupyterlab',
'coreutils',
Expand All @@ -36,13 +39,18 @@ function fixJupyterLabDTSFiles() {
console.log(colors.blue(`${relativePath} file already updated (by Python VSC)`));
return;
}
const replacedText = fileContents.replace('[key: string]: ISchema;', '[key: string]: ISchema | undefined;');
if (fileContents === replacedText) {
throw new Error('Fix for JupyterLabl file \'settingregistry.d.ts\' failed (pvsc post install script)');
if (fileContents.indexOf('[key: string]: ISchema;') > 0) {
const replacedText = fileContents.replace('[key: string]: ISchema;', '[key: string]: ISchema | undefined;');
if (fileContents === replacedText) {
throw new Error('Fix for JupyterLabl file \'settingregistry.d.ts\' failed (pvsc post install script)');
}
fs.writeFileSync(filePath, replacedText);
// tslint:disable-next-line:no-console
console.log(colors.green(`${relativePath} file updated (by Python VSC)`));
} else {
// tslint:disable-next-line:no-console
console.log(colors.red(`${relativePath} file does not need updating.`));
}
fs.writeFileSync(filePath, replacedText);
// tslint:disable-next-line:no-console
console.log(colors.green(`${relativePath} file updated (by Python VSC)`));
}

fixJupyterLabDTSFiles();
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ gulp.task('compile', done => {
.on('error', () => (failed = true))
.js.pipe(gulp.dest('out'))
.on('finish', () => (failed ? done(new Error('TypeScript compilation errors')) : done()));
});
});

gulp.task('precommit', done => run({ exitOnError: true, mode: 'staged' }, done));

Expand Down
1 change: 1 addition & 0 deletions news/1 Enhancements/6810.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add code gathering tools
Loading