mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-28 17:23:19 -05:00
Run All Cells Notebook Implementation (#4713)
* runAllCells API * add comment * more run cells fixes * Add integration test * Add multiple cell SQL notebook test * Comment out python tests as they fail in the lab * remove unused imports * PR comments * Remove localize * Return true instead of promise.resolve(true)
This commit is contained in:
@@ -35,6 +35,38 @@ export const pySparkNotebookContent: azdata.nb.INotebookContents = {
|
||||
nbformat_minor: 2
|
||||
};
|
||||
|
||||
export const pythonNotebookMultipleCellsContent: azdata.nb.INotebookContents = {
|
||||
cells: [{
|
||||
cell_type: CellTypes.Code,
|
||||
source: '1+1',
|
||||
metadata: { language: 'python' },
|
||||
execution_count: 1
|
||||
}, {
|
||||
cell_type: CellTypes.Code,
|
||||
source: '1+2',
|
||||
metadata: { language: 'python' },
|
||||
execution_count: 1
|
||||
}, {
|
||||
cell_type: CellTypes.Code,
|
||||
source: '1+3',
|
||||
metadata: { language: 'python' },
|
||||
execution_count: 1
|
||||
}, {
|
||||
cell_type: CellTypes.Code,
|
||||
source: '1+4',
|
||||
metadata: { language: 'python' },
|
||||
execution_count: 1
|
||||
}],
|
||||
metadata: {
|
||||
'kernelspec': {
|
||||
'name': 'python3',
|
||||
'display_name': 'Python 3'
|
||||
}
|
||||
},
|
||||
nbformat: 4,
|
||||
nbformat_minor: 2
|
||||
};
|
||||
|
||||
export const sqlNotebookContent: azdata.nb.INotebookContents = {
|
||||
cells: [{
|
||||
cell_type: CellTypes.Code,
|
||||
@@ -52,6 +84,33 @@ export const sqlNotebookContent: azdata.nb.INotebookContents = {
|
||||
nbformat_minor: 2
|
||||
};
|
||||
|
||||
export const sqlNotebookMultipleCellsContent: azdata.nb.INotebookContents = {
|
||||
cells: [{
|
||||
cell_type: CellTypes.Code,
|
||||
source: 'select 0',
|
||||
metadata: { language: 'sql' },
|
||||
execution_count: 1
|
||||
}, {
|
||||
cell_type: CellTypes.Code,
|
||||
source: `WAITFOR DELAY '00:00:02'\nselect 1`,
|
||||
metadata: { language: 'sql' },
|
||||
execution_count: 1
|
||||
}, {
|
||||
cell_type: CellTypes.Code,
|
||||
source: 'select 2',
|
||||
metadata: { language: 'sql' },
|
||||
execution_count: 1
|
||||
}],
|
||||
metadata: {
|
||||
'kernelspec': {
|
||||
'name': 'SQL',
|
||||
'display_name': 'SQL'
|
||||
}
|
||||
},
|
||||
nbformat: 4,
|
||||
nbformat_minor: 2
|
||||
};
|
||||
|
||||
export const pySpark3KernelMetadata = {
|
||||
'kernelspec': {
|
||||
'name': 'pyspark3kernel',
|
||||
|
||||
Reference in New Issue
Block a user