Repository navigation
Make gather an optional component #9755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
78 commits
Select commit
Hold shift + click to select a range
a7ed1d7
Update .npmrc to get latest python
e98061c
Merge branch 'master' of https://github.com/Microsoft/vscode-python i…
bd33869
Update to latest analysis and fix gather icon
b90e5d2
Use sliceLastExecution and fix
1754acd
Merge remote-tracking branch 'origin/master' into dev/jim/use-new-gather
2dd4a52
Merge remote-tracking branch 'origin/master' into dev/jim/use-new-gather
2bf3d58
Fix import of python analysis
36b3802
Merge remote-tracking branch 'origin/master' into dev/jim/use-new-gather
2892421
Merge remote-tracking branch 'origin/master' into dev/jim/use-new-gather
699f6ec
Update to python-analysis 0.4.12
6d5d33d
Merge branch 'master' of https://github.com/Microsoft/vscode-python i…
54053c6
Merge remote-tracking branch 'origin' into dev/jim/use-new-gather
e73ec59
get gathered text from cell.textSlice
6d14755
Updates to fix gather logging
34b0690
Merge branch 'master' into dev/jim/use-new-gather
6e87570
All updates to using new nb owned gather.
7f010f8
Merge branch 'master' into dev/jim/use-new-gather
9282dcf
Merge branch 'master' of https://github.com/Microsoft/vscode-python i…
4f5a895
Merge branch 'master' into dev/jim/use-new-gather
39d19f7
Merge branch 'master' into dev/jim/use-new-gather
811fb97
Working cell execution count codelenses.
9ca9c62
Merge branch 'master' into dev/jim/use-new-gather
c69d0c2
Rename gather* to match existing classes
cb7d0a7
Update to latest python analysis
7a7c773
lock python analysis ver
e8bfeef
Merge branch 'master' into dev/jim/use-new-gather
b8b403b
Merge branch 'master' into dev/jim/use-new-gather
fe2c87f
Fix MockJupyterNotebook
a65f35e
Fix casing of getgatherProvider
7d27f8d
Private Gather support #1
62a95f6
Merge branch 'master' into dev/jim/use-new-gather
9c6bd2a
Ensure cellHashProvider can be found
f77f29a
Revert back to uri for NBExecutionActivated
645345a
Merge branch 'master' into dev/jim/use-new-gather
076ff71
Merge branch 'master' into dev/jim/use-new-gather
c860990
Update new jupyterServerWrapper
7bda33f
Workaround fix for screwed up cellhashes
33cc77c
Gracefully fail if python-pgm-analysis is absent
40eff5c
Merge branch 'master' into dev/jim/use-new-gather
987340f
Resolve obvious unit test problems.
c70c3c0
Fixes to make sure that gather.ts is loadable.
355f725
Merge branch 'master' into dev/jim/use-new-gather
9453b1a
Merge branch 'master' into dev/jim/use-new-gather
3f23305
Merge branch 'master' into dev/jim/use-new-gather
faf985f
Optional gather build, editing, running works.
ff2cedb
Remove unecessary getAll of IGatherProviders.
438a94f
Merge branch 'master' into dev/jim/use-new-gather
cbfe92e
Code cleanup
d97ef68
Fix gather notebook header
d8f6f18
Gather icon not only on hover
d7e3619
Enable gather only in insiders
99aeb0b
Init gather only if enabled.
3fab0e1
Add link to survey
8cf38e0
Merge branch 'master' into dev/jim/use-new-gather
77e0b1f
Fix spacing in initialization.yml
cef4a87
Make linter and prettier happy
d95d441
Make webpack happy with regard to gather
9760a1d
Don't define ENABLE_GATHER env var
97a1a98
Couple minor issues found in test
8ae73d9
Fix a few tests
51ab887
Merge branch 'master' into dev/jim/use-new-gather
8da69c9
Everything but dataScienceIocContainer.ts
eab106b
More fixes
e7da45a
Whoops, fix IW functional test back to original
4c43493
Temporarily include datascienceioccontainer in 120
681fc56
Make linter finally happy.
815c3cf
Fix Gather functional tests
3d5135e
A bit more cleanup
9c1b91b
React to PR feedback
89517a4
Couple more PR review changes.
e7d864d
Merge branch 'master' into dev/jim/use-new-gather
5467f3f
Tweak
535bb53
More minor cleanup
43af8d7
Merge branch 'dev/jim/use-new-gather' of https://github.com/microsoft…
cf41937
Fix provider finders.
63e0175
Actually fix the provider get problem.
2f72957
Fix smoke test
1de83b9
Fix unit test
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| @types:registry=https://registry.npmjs.org | ||
| @types:registry=https://registry.npmjs.org | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/client/datascience/editor-integration/cellhashLogger.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
| 'use strict'; | ||
| import { inject, injectable } from 'inversify'; | ||
|
|
||
| import { traceError } from '../../common/logger'; | ||
| import { noop } from '../../common/utils/misc'; | ||
| import { Identifiers } from '../constants'; | ||
| import { ICell, ICellHashLogger, ICellHashProvider } from '../types'; | ||
| import { CellHashProvider } from './cellhashprovider'; | ||
|
|
||
| // This class provides hashes for debugging jupyter cells. Call getHashes just before starting debugging to compute all of the | ||
| // hashes for cells. | ||
| @injectable() | ||
| export class CellHashLogger implements ICellHashLogger { | ||
| constructor(@inject(ICellHashProvider) private provider: ICellHashProvider) {} | ||
|
|
||
| public async preExecute(cell: ICell, silent: boolean): Promise<void> { | ||
| const providerObj: CellHashProvider = this.provider as CellHashProvider; | ||
|
|
||
| try { | ||
| if (!silent) { | ||
| // Don't log empty cells | ||
| const stripped = providerObj.extractExecutableLines(cell); | ||
| if (stripped.length > 0 && stripped.find(s => s.trim().length > 0)) { | ||
| // When the user adds new code, we know the execution count is increasing | ||
| providerObj.incExecutionCount(); | ||
|
|
||
| // Skip hash on unknown file though | ||
| if (cell.file !== Identifiers.EmptyFileName) { | ||
| await providerObj.addCellHash(cell, providerObj.getExecutionCount()); | ||
| } | ||
| } | ||
| } | ||
| } catch (exc) { | ||
| // Don't let exceptions in a preExecute mess up normal operation | ||
| traceError(exc); | ||
|
greazer marked this conversation as resolved.
Resolved
|
||
| } | ||
| } | ||
|
|
||
| public async postExecute(_cell: ICell, _silent: boolean): Promise<void> { | ||
| noop(); | ||
| } | ||
|
|
||
| public getCellHashProvider(): ICellHashProvider { | ||
| return this.provider; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.