profile
viewpoint
Timothy Ruscica techwithtim Ontario https://techwithtim.net I am Tech With Tim :) Most of the code I post here is showed/created in my youtube videos on the channel Tech With Tim! Contact: techwithtimm@gmail.com

techwithtim/NEAT-Flappy-Bird 322

An AI that plays flappy bird! Using the NEAT python module.

techwithtim/A-Path-Finding-Visualization 172

A python visualization of the A* path finding algorithm. It allows you to pick your start and end location and view the process of finding the shortest path.

techwithtim/Face-Recognition 118

A simple face recognition script that identifies and classifies all faces in an image.

techwithtim/Online-Chess-Game 88

Chess game created on the 24 hour livestream

techwithtim/Pygame-Tutorials 83

This is the code base for the pygame tutorials posted on my YouTube channel.

techwithtim/Agar-IO 72

A duplication of the game Agar.io written in python

techwithtim/Pictonary-Livestream 64

Coded during 12 hour livestream...

techwithtim/Chat-Web-App 62

Made during livestream

techwithtim/Cornavirus-Voice-Assistant 53

A python voice assistant that you can ask corona-virus related questions to

techwithtim/Hangman 51

A simple hangman game made with python and pygame.

push eventtechwithtim/vscode-python

Tim

commit sha 83f6d3f8c5393c93cb27e5c1577eabe1e972b8e3

added new test

view details

push time in 8 minutes

push eventtechwithtim/vscode-python

Tim

commit sha 2ed00a146f4c43da6af472fdaf76f2c4d6b297b0

fixed tests

view details

push time in 8 minutes

push eventtechwithtim/vscode-python

Tim

commit sha 7541047f0665432b90866c882df6c8eede5b2496

fixed test

view details

push time in 2 hours

push eventtechwithtim/vscode-python

Tim

commit sha 0be5151a554d6efc830a17889b92c5217a702bfe

changed comment

view details

push time in 2 hours

push eventtechwithtim/vscode-python

Tim

commit sha af4903dab86f5ecda1ac1c7b1776dcdaccd6ef7e

fixed lint issue

view details

push time in 2 hours

PR opened microsoft/vscode-python

Removed svg output from notebooks when exporting to PDF

This PR fixes an issue where when exporting to PDF with a notebook that has svg output (take for example a matplotlib plot) the export would fail. This was due to an issue converting an svg to a png file. To avoid this issue I've made it so that all svg output is removed from the notebook output if there is an available png in that output.

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] ~Has a news entry file (remember to thank yourself!).~
  • [x] Appropriate comments and documentation strings in the code.
  • [x] ~Has sufficient logging.~
  • [x] ~Has telemetry for enhancements.~
  • [x] Unit tests & system/integration tests are added/updated.
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+182 -1

0 comment

6 changed files

pr created time in 2 hours

push eventtechwithtim/vscode-python

Tim

commit sha d00873cd3ee1e097e31cc5f623ca7eaf6f21267a

fixed launch.json

view details

push time in 3 hours

create barnchtechwithtim/vscode-python

branch : removesvg

created branch time in 3 hours

push eventmicrosoft/vscode-python

Timothy Ruscica

commit sha 1b3bebdac32a77d278227ad26b90f8d448af46b6

Added export to PDF, HTML and python to interactive window (#12732) * mostly working * fixed naming * added news file * added export util to clean up code * added export util to clean up code * added export util to service container * removed busy indicator * addressed comments * refactored and cleaned up * added sleep to temp file creation

view details

push time in a day

PR merged microsoft/vscode-python

Added export to PDF, HTML and python to interactive window

Added exporting to PDF, HTML and Python to the interactive window. This feature works the same as exporting notebooks from the notebook editor.

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] Has a news entry file (remember to thank yourself!).
  • [x] Appropriate comments and documentation strings in the code.
  • [x] ~Has sufficient logging.~
  • [x] ~Has telemetry for enhancements.~
  • [x] ~Unit tests & system/integration tests are added/updated.~
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+146 -74

2 comments

14 changed files

techwithtim

pr closed time in a day

push eventtechwithtim/vscode-python

Tim

commit sha f797954d9f0a719736602aa42d8edc906bdc930f

added sleep to temp file creation

view details

push time in a day

push eventtechwithtim/vscode-python

Tim

commit sha 5092cec34fbb141f8b2253e2a7f699a6e36ee682

refactored and cleaned up

view details

push time in a day

Pull request review commentmicrosoft/vscode-python

Added export to PDF, HTML and python to interactive window

+import { inject, injectable } from 'inversify';+import * as path from 'path';+import { Uri } from 'vscode';+import { IFileSystem } from '../../common/platform/types';++@injectable()+export class ExportUtil {+    constructor(@inject(IFileSystem) private fileSystem: IFileSystem) {}++    public async createFileInDirectory(dirPath: string, fileName: string, source: Uri): Promise<string> {

Yes, I didn't know how to make something disposable. I'll try looking around for how to do that and refactor this

techwithtim

comment created time in a day

Pull request review commentmicrosoft/vscode-python

Added export to PDF, HTML and python to interactive window

+import { inject, injectable } from 'inversify';+import * as path from 'path';+import { Uri } from 'vscode';+import { IFileSystem } from '../../common/platform/types';++@injectable()+export class ExportUtil {+    constructor(@inject(IFileSystem) private fileSystem: IFileSystem) {}++    public async createFileInDirectory(dirPath: string, fileName: string, source: Uri): Promise<string> {+        try {+            await this.fileSystem.createDirectory(dirPath);+            const newFilePath = path.join(dirPath, fileName);+            await this.fileSystem.copyFile(source.fsPath, newFilePath);+            return newFilePath;+        } catch (e) {+            await this.deleteDirectory(dirPath);+            throw e;+        }+    }++    public async createUniqueDirectoryPath(): Promise<string> {+        const tempFile = await this.fileSystem.createTemporaryFile('.ipynb');+        const filePath = tempFile.filePath;+        const dirPath = path.join(path.dirname(filePath), path.basename(filePath, path.extname(filePath)));+        tempFile.dispose();+        return dirPath;+    }

@DonJayamanne is that what you meant?

techwithtim

comment created time in a day

push eventtechwithtim/vscode-python

Tim

commit sha d0353145d9c648b47861473e132d163fbdd54366

addressed comments

view details

push time in a day

push eventtechwithtim/vscode-python

Tim

commit sha c5c382692bc7f963e66f01b72f7a96ae97a0cadf

removed busy indicator

view details

push time in 5 days

push eventtechwithtim/vscode-python

Tim

commit sha ea11895cb29fcb726a521d6b2f131afc0ae65ac5

added export util to service container

view details

push time in 5 days

push eventtechwithtim/vscode-python

Tim

commit sha bdf4f58feb74ac38f676b3dd93bfabdb29ef5e2a

added export util to clean up code

view details

Tim

commit sha 3900300a1947e83d0a894926b3233cfadf88586c

added export util to clean up code

view details

push time in 5 days

push eventtechwithtim/vscode-python

Tim

commit sha b11c096e8d8fc1f0264149d5d14fab72ea7f595d

added news file

view details

push time in 5 days

PR opened microsoft/vscode-python

Added export to PDF, HTML and python to interactive window

Added exporting to PDF, HTML and Python to the interactive window. This feature works the same as exporting notebooks from the notebook editor.

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] Has a news entry file (remember to thank yourself!).
  • [x] Appropriate comments and documentation strings in the code.
  • [x] ~Has sufficient logging.~
  • [x] ~Has telemetry for enhancements.~
  • [x] ~Unit tests & system/integration tests are added/updated.~
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+84 -9

0 comment

8 changed files

pr created time in 5 days

push eventtechwithtim/vscode-python

Tim

commit sha c832275f4f97396fa6b0dd90a34128e8c6b2f634

fixed naming

view details

push time in 5 days

create barnchtechwithtim/vscode-python

branch : export

created branch time in 5 days

push eventtechwithtim/vscode-python

Timothy Ruscica

commit sha 0734d4ea990b4d4a0352d07117107e93a3cdd4e0

added tests for pdf export (#12548)

view details

Joyce Er

commit sha b24a014b3ec0f5ed5e4fb320b62eec18efde6831

DS: Display 'Trusted' / 'Not Trusted' on notebook load (#12466)

view details

Jake Bailey

commit sha d80bead813b44990173bd347f1ad804b3947bee7

Don't modify LS settings if jediEnabled does not exist (#12551)

view details

Don Jayamanne

commit sha 6afc0839101f2cce1e1073239c237805ad6376a4

Add Telemetry for VSC Notebooks (#12542) * Added some missing telemetry for VS Code Notebooks * Track the type of notebook used in various operations (running cell, interrupting kernels, etc, determine whether user is performing such operations while in Native/Custom/Old editor) * Added a type for INobteookEditor (temporary, until VSC Notebook is stable) * Ensure users cannot opt into VSC Notebook Editor experiment when in VSC Stable.

view details

Joyce Er

commit sha 791d7bed6b7c3f0d2852e32109616674642c1602

DS: Show banner prompting user to trust notebook (#12555)

view details

Pavel Minaev

commit sha fb501ecf321503ab928c98ab3e961a017c63b96f

Fix #12446: Stock launch.json "attach" configs should be using "connect" (#12504) Change RemoteAttachDebugConfigurationProvider to generate configs with "connect".

view details

Kartik Raj

commit sha c88b314d392d133588ce89eaf4c5694c7bc159d9

Skip flaky CI tests (#12566)

view details

Don Jayamanne

commit sha 14389ef979adc5f29494df9bb25a3f691458b850

VS Code Notebook survey (#12558)

view details

Kartik Raj

commit sha 3d1e2f7dde970c3b0f2b5554c5554908a17c09ab

Prompt users that we have deleted pythonPath from their workspace settings when in DeprecatePythonPath experiment (#12536) * Prompt users that we have deleted pythonPath from their workspace settings when in DeprecatePythonPath experiment * Oops * Code reviews * Code reviews

view details

Luciana Abud

commit sha 0b590caff690b96a74ed281255c3b0d64d512e82

Turn pythonPath experiment for 20% of users. (#12549)

view details

Jim Griesmer

commit sha 2f5234a3bdd387d3bb26831cd63f49fce34f3a1a

Update experiments.json (#12573)

view details

Rich Chiodo

commit sha a94c8b8d648034d199046dcd4a83eafb75d1ee06

Jupyter hub preliminary support (#12574) * Move request header generation into password generation * Connecting to token api * Working jupyter hub connection * Use multistep input * Remove token on shutdown * Support certificate checking * Skip waiting on shutdown * Get old unit tests passing again * Fix xsrf token to remove extra cookie crap * Test plan changes and new unit test * Fix linter and input box result * Fix sonar warning * Review feedback * Actually cookie not sent back for hub

view details

Kartik Raj

commit sha 2dbe02ba7619d4eaa147d31e37dfb55ef0edcaa8

Skip more flaky CI tests (#12577) * Skip more flaky CI tests * Oops * Special hook

view details

Rich Chiodo

commit sha 7003ead107165ee459c318a017cfec4de8674ebe

Run by line telemetry (#12583) * Run by line telemetry * Add hover telemetry

view details

Kartik Raj

commit sha 6b80c943857fab4a648e4553bc6b087b6d0a96a1

Skip failing Python Daemon Pool unit test (#12568)

view details

Kartik Raj

commit sha f0153fc43b10ab4a33ec1ab759c94c6dc9e5a1cc

Skip another flaky Python daemon test (#12598)

view details

Timothy Ruscica

commit sha ba587d3eac3880c0f13a5d9456f8901f9fc0de17

Refactored importing jupyter notebook as python file (#12575) * refactored import notebook * added wait for status * added wait for status * fixed tests * added export stuff to serviceContainer * made exported python document dirty * fixed tests

view details

Timothy Ruscica

commit sha c70d8be555ff809ae0e3300d786e129ccd96f923

moved interfaces to types (#12599)

view details

Don Jayamanne

commit sha 6a5246013e31c31903f50e677d18ad8610d1a250

Fix missing events and hooks from INotebookEditor (#12570) * Ensures a number of events have been wired up properly * Added a number of tests (for these events)

view details

Don Jayamanne

commit sha 5eb5e1ae1736b1b8195e70ab280e06b8b0ff6e4e

Start restart session after first cell execution (#12600) Found that we weren't starting the restart kernel in the right place. We used to start restart kernel after first cell has been executed else this impact time to execute first cell. Moved code to base class as it applies to both.

view details

push time in 5 days

push eventmicrosoft/vscode-python

Timothy Ruscica

commit sha c70d8be555ff809ae0e3300d786e129ccd96f923

moved interfaces to types (#12599)

view details

push time in 11 days

PR merged microsoft/vscode-python

Reviewers
Moved export interface definitions to types file skip news

A simple move of some export related interfaces to the appropriates types file.

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] Has a news entry file (remember to thank yourself!).
  • [x] Appropriate comments and documentation strings in the code.
  • [x] ~Has sufficient logging.~
  • [x] ~Has telemetry for enhancements.~
  • [x] ~Unit tests & system/integration tests are added/updated.~
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+9 -10

1 comment

4 changed files

techwithtim

pr closed time in 11 days

push eventmicrosoft/vscode-python

Timothy Ruscica

commit sha ba587d3eac3880c0f13a5d9456f8901f9fc0de17

Refactored importing jupyter notebook as python file (#12575) * refactored import notebook * added wait for status * added wait for status * fixed tests * added export stuff to serviceContainer * made exported python document dirty * fixed tests

view details

push time in 11 days

PR merged microsoft/vscode-python

Refactored importing jupyter notebook as python file skip news

We had some old code that was using the previous export method. I refactored it to go through the new export manager. <!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] Has a news entry file (remember to thank yourself!).
  • [x] Appropriate comments and documentation strings in the code.
  • [x] ~Has sufficient logging.~
  • [x] ~Has telemetry for enhancements.~
  • [x] ~Unit tests & system/integration tests are added/updated.~
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+57 -31

1 comment

5 changed files

techwithtim

pr closed time in 11 days

PR opened microsoft/vscode-python

Moved export interface definitions to types file skip news

A simple move of some export related interfaces to the appropriates types file.

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] Has a news entry file (remember to thank yourself!).
  • [x] Appropriate comments and documentation strings in the code.
  • [x] ~Has sufficient logging.~
  • [x] ~Has telemetry for enhancements.~
  • [x] ~Unit tests & system/integration tests are added/updated.~
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+9 -10

0 comment

4 changed files

pr created time in 11 days

create barnchtechwithtim/vscode-python

branch : exportRefactor

created branch time in 11 days

push eventtechwithtim/vscode-python

Tim

commit sha f7594da48727e615cec043d3a0f35d3034b0f649

fixed tests

view details

push time in 11 days

Pull request review commentmicrosoft/vscode-python

Refactored importing jupyter notebook as python file

 export class InteractiveWindowCommandListener implements IDataScienceCommandList         if (file && file.length > 0) {             await this.waitForStatus(                 async () => {-                    const contents = await this.jupyterImporter.importFromFile(file);-                    await this.viewDocument(contents);+                    const contents = await this.fileSystem.readFile(file);+                    const model = await this.notebookStorageProvider.createNew(contents);+                    await this.exportManager.export(ExportFormat.python, model);                 },                 localize.DataScience.importingFormat(),                 file             );         }     } -    private viewDocument = async (contents: string): Promise<void> => {

Sure, check new changes.

techwithtim

comment created time in 11 days

push eventtechwithtim/vscode-python

Tim

commit sha 4a277d6ba1f6eacd0d668fb08dd0fec5184877bb

made exported python document dirty

view details

push time in 11 days

Pull request review commentmicrosoft/vscode-python

Refactored importing jupyter notebook as python file

 export class InteractiveWindowCommandListener implements IDataScienceCommandList         if (file && file.length > 0) {             await this.waitForStatus(                 async () => {-                    const contents = await this.jupyterImporter.importFromFile(file);-                    await this.viewDocument(contents);+                    const contents = await this.fileSystem.readFile(file);+                    const model = await this.notebookStorageProvider.createNew(contents);+                    await this.exportManager.export(ExportFormat.python, model);                 },                 localize.DataScience.importingFormat(),                 file             );         }     } -    private viewDocument = async (contents: string): Promise<void> => {

Agreed, I can do that for sure. Are we good for this PR? I'll submit a new one later today with those refactors and different interfaces

techwithtim

comment created time in 11 days

Pull request review commentmicrosoft/vscode-python

Refactored importing jupyter notebook as python file

 suite('Interactive window command listener', async () => {             Promise.resolve([Uri.file('foo')])         );         await commandManager.executeCommand(Commands.ImportNotebook, undefined, undefined);-        assert.ok(documentManager.activeTextEditor, 'Imported file was not opened');+        verify(exportManager.export(ExportFormat.python, anything())).once();     });     test('Import File', async () => {         createCommandListener();         await commandManager.executeCommand(Commands.ImportNotebook, Uri.file('bar.ipynb'), undefined);-        assert.ok(documentManager.activeTextEditor, 'Imported file was not opened');

We have tests written already to ensure that when a python file is exported that is open. I can't put this back here unless I actually create a real instance of exportManager and let it open the file. The idea is since we already test that export works and opens the file there is no need to duplicate that test here. So long as we verify that the export method is called we can be sure the file will open because we have tests that will fail if it isn't.

techwithtim

comment created time in 11 days

Pull request review commentmicrosoft/vscode-python

Refactored importing jupyter notebook as python file

 export class InteractiveWindowCommandListener implements IDataScienceCommandList         if (file && file.length > 0) {             await this.waitForStatus(                 async () => {-                    const contents = await this.jupyterImporter.importFromFile(file);-                    await this.viewDocument(contents);+                    const contents = await this.fileSystem.readFile(file);+                    const model = await this.notebookStorageProvider.createNew(contents);+                    await this.exportManager.export(ExportFormat.python, model);                 },                 localize.DataScience.importingFormat(),                 file             );         }     } -    private viewDocument = async (contents: string): Promise<void> => {

Export actually does automatically open the exported document. It uses pretty much the exact same code that's inside that viewDocument method to do so.

techwithtim

comment created time in 11 days

push eventtechwithtim/vscode-python

Tim

commit sha a02c7b4f07882c78bc4d50eee668ea97560a6e48

added export stuff to serviceContainer

view details

push time in 12 days

push eventtechwithtim/vscode-python

Tim

commit sha 4d9dbe5483b315900cdc6ee0ebba281c46cb657d

added wait for status

view details

Tim

commit sha a9cabcad19d9e707b3ee390a444c1d311450d166

fixed tests

view details

Tim

commit sha b1055f850bf796d9176bd1a34b76fc4f4e99bb37

Merge branch 'refactor' of https://github.com/techwithtim/vscode-python into refactor

view details

push time in 12 days

PR opened microsoft/vscode-python

Refactored importing jupyter notebook as python file

We had some old code that was using the previous export method. I refactored it to go through the new export manager. <!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] Has a news entry file (remember to thank yourself!).
  • [x] Appropriate comments and documentation strings in the code.
  • [x] ~Has sufficient logging.~
  • [x] ~Has telemetry for enhancements.~
  • [x] ~Unit tests & system/integration tests are added/updated.~
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+19 -21

0 comment

2 changed files

pr created time in 12 days

push eventtechwithtim/vscode-python

Tim

commit sha aa421c05974568207a005cf2db0b3105530a0d60

added wait for status

view details

push time in 12 days

create barnchtechwithtim/vscode-python

branch : refactor

created branch time in 12 days

push eventmicrosoft/vscode-python

Timothy Ruscica

commit sha 0734d4ea990b4d4a0352d07117107e93a3cdd4e0

added tests for pdf export (#12548)

view details

push time in 13 days

delete branch techwithtim/vscode-python

delete branch : pdfTests

delete time in 13 days

PR merged microsoft/vscode-python

Reviewers
Added tests for export notebook to PDF skip news

Added some more unit tests for the file opener to make sure that when exporting to pdf an error message appears if the operation fails.

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] ~Has a news entry file (remember to thank yourself!).~
  • [x] Appropriate comments and documentation strings in the code.
  • [x] ~Has sufficient logging.~
  • [x] ~Has telemetry for enhancements.~
  • [x] Unit tests & system/integration tests are added/updated.
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+28 -0

1 comment

1 changed file

techwithtim

pr closed time in 13 days

PR opened microsoft/vscode-python

Added tests for export notebook to PDF

Added some more unit tests for the file opener to make sure that when exporting to pdf an error message appears if the operation fails.

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] ~Has a news entry file (remember to thank yourself!).~
  • [x] Appropriate comments and documentation strings in the code.
  • [x] ~Has sufficient logging.~
  • [x] ~Has telemetry for enhancements.~
  • [x] Unit tests & system/integration tests are added/updated.
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+28 -0

0 comment

1 changed file

pr created time in 13 days

create barnchtechwithtim/vscode-python

branch : pdfTests

created branch time in 13 days

push eventtechwithtim/vscode-python

Tim

commit sha fcfe1c3edb37304ad4c45b0cb3e13a680ad28e72

added tests for pdf

view details

push time in 13 days

push eventtechwithtim/vscode-python

Ian Huff

commit sha 2a5d899d5ee8d80a1a73364d957cbb26eb72de90

update button count (#12381) Co-authored-by: Ian Huff <ianhuff@alex-x230.northamerica.corp.microsoft.com>

view details

Eric Snow

commit sha ab795f5177a4fb38e8bef0e7f356334db25f3676

Move code related to Python version to the py-envs component tree. (#12236) This mostly involves moving code, and only minor refactoring (to pull the component code out of the DI-based classes).

view details

Rich Chiodo

commit sha 9ab353a71fcd12746cf246640f99ade31d6514e8

Infrastructure for mounting more than one webview at a time (#12382) * Beginnings of new idea * Rework all caes to use new way to fetch wrapper * Fix missed messages * Missed messages being dropped * Make role specific * More dispose fixes * Teardown is not being called if a test is skipped * Upgrade mocha and create factory for mounted web views * Fix failing functional test and make options correct * Fix unit test failures caused by new mocha

view details

Rich Chiodo

commit sha 71390fb7c0d9153445d9939854910aafb33bdc8f

Add test that validates interactive and notebook editor at the same time (#12384) * Add test to open both interactive and native at same time * Add news entry

view details

Eric Snow

commit sha 5b55c599693bad5685e631e44ea5d8d8e8929a6d

Consolidate "info" under pythonEnvironments/info/. (#12383) This change is part of the series of changes related to factoring out an isolated Python environments "component" (specifically the "discovery" subcomponent). This change only moves files around.

view details

Tim Ruscica

commit sha 9d382de3b594fbcd3222e96e52324772955b46f9

Added exporting notebook to HTML (#12375) * export working * added export base * file opens when click yes button * small changes to exportManagerFileOpener * small changes * added tests for html (new file) * localized string * added news file * added missing keys to package.nls.json * addressed comments * removes strange space * checked exported file is HTML file * modified test * fixed tests * changed launch.json back to original

view details

Brett Cannon

commit sha 00d9ddfdea0bfcf0fd4a2bb694a35ce224705865

Explicitly add the GitHub release step

view details

Rich Chiodo

commit sha a03edb51066adcd4721c95bb9eff781ad07d1b7d

Merging changes back from the release branch (#12393) * Port custom editor changes to release branch (#12222) * Implement the changes necessary to use the new custom editor (#12188) * Turn on custom editor again * Fix copy problem * Fix copy problem again * Get undo/redo to work * Some fixes for synching more than one editor * Fix untitled. Fix timeouts * fix command manager to not be used. Not necessary with temp path. fix delete/insert commands to undo properly * Fix functional test * Add experiment * Since package json is enabling proposed api, turn of notebooks with experiment * Turn off proposed api * Upgrade VS code to 1.45 so can use new api outside of insiders * Update package.json dynamically * Fix merge code to handle arrays * Fix unit tests. Backup happens at the provider level now * Fix hygiene * Fix untitled to work for old provider too * Some feedback and attempt to fix URI problem on linux/mac * Review feedback * Update changelog * Remove news entry * Port run by line stepping fix to release (#12223) * fix continue event to run cell (#12211) Co-authored-by: Ian Huff <ianhuff@alex-x230.northamerica.corp.microsoft.com> * update changelog and delete news file Co-authored-by: Ian Huff <ianhuff@alex-x230.northamerica.corp.microsoft.com> * Port run by line stop becoming interrupt to the release branch (#12271) * Run by line changes for release (#12256) * Run by line changes for release * Translate step tooltip and make sure F10 works outside of already debugging * Update changelog * Cherry-pick fixes from master to june release (#12282) * Merge stuff from may release back into master (#12233) * Revert vscode-extension-telemetry changes for the release (#11602) (#11656) * Revert "Fix slashes in telemetry unit tests (#11572)" This reverts commit 7431c9c53fa5f80fd440b47ae19a825286d3d760. * Revert "Use vscode-extension-telemetry for our exceptions & error telemetry (#11524)" This reverts commit d5065e6976ab8bf3289d70be4a34110a53b224c5. * Remove from changelog * Port storage fix to release branch (#11673) * Fix storage not being used (#11649) * Fix storage not being used * Add disposable to storage so it won't write after shutdown * Fix dirty title * Hack to get tests to pass * Another way to get run all to not interfere * Update changelog * Port scrolling fix to release (#11688) * Fix scrolling (#11681) * Fix scrolling * Review feedback - fix scrolling on expand/collapse * Update changelog * Update package.json Co-authored-by: Jim Griesmer <jimgries@microsoft.com> * Cherry-pick pipenv changes and pythonpath prompt changes to release (#11700) * Show the prompt again if user clicks on more info (#11664) * Show the prompt again if user clicks on more info * Review feedback * Use Learn more as text for the link. * Leave pipenv in a corner until the user decides to select an interpreter (#11654) * add onSuggestion option * Swap onActivation with onSuggestion * Update unit tests * Remove registration of IPipenvService * Move didTriggerInterpreterSuggestions logic inside pipenv locator * Fix existing unit tests * Add new unit tests * Replace typemoq any param with object * Shorten the tests * Fix warning * Duplicate teardown Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> * Update extension version (#11730) * Update extension version * Update date in changelog. * Update change log with additional notes. (#11764) * Cherry picks and version updates for bug fix release (#11878) * Do not execute shebang as an interpreter until user has clicked on the codelens enclosing the shebang (#11816) * Do not execute shebang as an interpreter until user has clicked on the codelens enclosing the shebang * Rename * Oops * Update src/test/providers/shebangCodeLenseProvider.unit.test.ts Co-authored-by: Karthik Nadig <kanadig@microsoft.com> Co-authored-by: Karthik Nadig <kanadig@microsoft.com> * Update version and change log for bugfix release Co-authored-by: Kartik Raj <karraj@microsoft.com> * Cherry-pick ExP platform work from master (#12160) * User cannot belong to all experiments in an experiment group (#11945) * 10790 prep - Create an experiments/ folder (#11980) * experiments.ts -> experiments/manager.ts * eexperimentGroups -> experiments/experimentGroups * test/experiments.u.t -> test/experiments/manager.u.t * experimentGroups -> groups * Whoops committed one file too many * Add support for VS Code's experiment service (#11979) * Add npm package * News entry * experiments.ts -> experiments/manager.ts * Wrong issue number * eexperimentGroups -> experiments/experimentGroups * Move experiments.unit.tests.ts -> experiments/ * Commit new files * Merge gone sideways * Add types * Add opt in/out handling * Activation (service registry) * Don't pin tas-client to one version * Unit tests + fixes * Lol forgot to remove a comment + add headers * Forgot 'use strict' in service.ts * Use IApplicationEnvironment instead of IExtensions * Apply suggestions from code review Co-authored-by: Don Jayamanne <don.jayamanne@yahoo.com> * Remove unnecessary formatted props * n e v e r m i n d * Aight fixed it * flight -> experiment * Check stub calls instead of ctor impl * removed getExperimentService stub check * Set shared properties for all telemetry events * Add test for shared properties Co-authored-by: Don Jayamanne <don.jayamanne@yahoo.com> * Fix merge issues * Fix index unit tests * Revert "Fix index unit tests" This reverts commit 2fb61fc366c2c55b5c4b9c34e766ffbbcd50be74. * Make MPLS and vscode-extension-telemetry work together 🤝 (#11823) * Revert "Revert vscode-extension-telemetry changes for the release (#11602)" This reverts commit 71d17932d3268fb20c55e745a82f2da8bf1f3d0c. * Remove entry from changelog + add new news entry * Update LS code to use periods instead of slashes * Revert "Update LS code to use periods instead of slashes" This reverts commit 13566513a86bbe63365cfc16c387fe4c504bfc10. * Replace slashes before sending telemetry instead * Too fast too furious * Fix more merge issues Co-authored-by: Don Jayamanne <don.jayamanne@yahoo.com> Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> * Update version and changelog for point release (#12171) * Ensure extension features are started when in Deprecate PythonPath experiment and opening a file without any folder opened (#12182) * Ensure extension features are started when in Deprecate PythonPath experiment and opening a file without any folder opened. * Added comments * Update change log (#12190) * Cherry pick fix for hasInterpreters and update change log (#12198) * Double-check for interpreters when running diagnostics (#12158) * Get interpreters if hasInterpreters returns false * Undo ignoreErrors() * Add unit tests * Fixed tests * Newline * Fix merge issues. * Update change log Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> * Update version for point release (#12259) Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> Co-authored-by: Rich Chiodo <rchiodo@users.noreply.github.com> Co-authored-by: Jim Griesmer <jimgries@microsoft.com> Co-authored-by: Kartik Raj <karraj@microsoft.com> Co-authored-by: Don Jayamanne <don.jayamanne@yahoo.com> * Make Jedi the default LS (#12226) * Make Jedi the default LS * Add news entry * Update change log Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> Co-authored-by: Rich Chiodo <rchiodo@users.noreply.github.com> Co-authored-by: Jim Griesmer <jimgries@microsoft.com> Co-authored-by: Kartik Raj <karraj@microsoft.com> Co-authored-by: Don Jayamanne <don.jayamanne@yahoo.com> Co-authored-by: Luciana Abud <45497113+luabud@users.noreply.github.com> * Port raw auto start fix to release (#12288) * don't return a connection from the raw provider for getOnly (#12277) Co-authored-by: Ian Huff <ianhuff@alex-x230.northamerica.corp.microsoft.com> * update changelog and remove news entry Co-authored-by: Ian Huff <ianhuff@alex-x230.northamerica.corp.microsoft.com> * Rchiodo/rel june update (#12356) * Update security problems * Update release version * Update 3rd party notices * Add font awesome back to third party notices * ExP telemetry fixes (#12358) * Use extension channel instead of VS Code channel * Use publisher.name extension id (not just name) * Update vscode-tas-client Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> * Port start page to release (#12365) * start page experiment and fixes (#12339) * move EnableStartPage enum to groups.ts * - remove the command from the experiment - fix the start page not loading when you go back to a priviews version and then updating again - update some labels in the start page - update the sample notebook to include run by line - the sample notebook now has a title - updated the images from the sample notebook * oops * oops * -add messages to open folder and workspace -add telemetry to measure if the webview error happens -give space between bullet points -add link to enable experiments to the sample notebook -get the release notes from a different file -fix bullet points in the sample notebook -sample notebook now opens with a counter in the title * fix a unit test * final changes * final final changes * final^3 changes * removed run by line from the sample notebook * Fixup after merge Co-authored-by: David Kutugata <dakutuga@microsoft.com> * Fixup bad merge * Last changes before release (#12371) Co-authored-by: Ian Huff <ianhu@microsoft.com> Co-authored-by: Ian Huff <ianhuff@alex-x230.northamerica.corp.microsoft.com> Co-authored-by: Karthik Nadig <kanadig@microsoft.com> Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com> Co-authored-by: Jim Griesmer <jimgries@microsoft.com> Co-authored-by: Kartik Raj <karraj@microsoft.com> Co-authored-by: Don Jayamanne <don.jayamanne@yahoo.com> Co-authored-by: Luciana Abud <45497113+luabud@users.noreply.github.com> Co-authored-by: David Kutugata <dakutuga@microsoft.com>

view details

Don Jayamanne

commit sha 3d829fc170ed9eedc17a8c58c648a988dcfeead0

Allow users to open VSC notebook even when using our own Notebook Editors (#12402) For #12400 * Side by side nb editors

view details

Don Jayamanne

commit sha 37a12b6c764001735fef8e1b2c9bf82d44c083c1

Add menu item to open nb with VSC Notebook (#12406) For #12405 Enable menu item only in VSC Insiders.

view details

Hugues Valois

commit sha e418ddec57ce2cad5875f6291fe7f845b2c51978

Do not trigger unnecessary work in language server when formatting a document (#12097) * Change getTempFileWithDocumentContents to not use the document's original file extension. Instead, use the .tmp extension which is not associated with Python language. This prevents a file add/delete event from reaching language server, invalidating some of its cache and causing unnecessary work. * Fix build. Co-authored-by: Don Jayamanne <don.jayamanne@yahoo.com>

view details

Rich Chiodo

commit sha 3ad61b1662f6ac068a482ed4d6455b5c8a4511c0

Add fixes for ipywidgets (I hope) and live share. (#12409)

view details

Don Jayamanne

commit sha 29e844c6dfa227857626f8e09c5e2f8431f04293

Disable use of proposedApi in stable VS Code (#12411) * Fixes to using Native NB with stable VS Code * Fixes

view details

David Kutugata

commit sha 2003e013e6d310a7d9da1df709d2210b9e85cc1c

Fix HTML links in markdown (#12395) * try string manipulation, katex and markdown-it * try to use markdown-it-latex * try to use latex2html5 * clean up latexManipulartion.ts and cellOutput.tsx * remove unused changes * add tests * rename latexManipulation to markdownManipulation * add news file and rename the test file * update package-lock * added one more test and a try catch * separate the fix of latex and links into different functions, and add comments to the fixLinks function

view details

Don Jayamanne

commit sha ae8903d41416e14078989f7460116d659bcbda61

Fixes to reverting notebooks (#12410)

view details

Kim-Adeline Miguel

commit sha 98e6aa5dfbb404ab44cdceff1328143e32dc5ed8

Pin py to 1.8.1 (Windows test failures) (#12407)

view details

Ian Huff

commit sha ea1c3c0c94c52cd3111b5d9b89a55f7b66eea6c5

turn on zmq for five percent (#12426) Co-authored-by: Ian Huff <ianhuff@alex-x230.northamerica.corp.microsoft.com>

view details

Rich Chiodo

commit sha ff06604524c1ed6463a36479a5edb59bf72c588c

Fix regression caused by multiple language support around indentation (#12428) * Fix serialization of language configuration to match what VS code does. * Add news entry * Missing parts of the configuration (functional test caught bracket matching) * Add test for indentation

view details

Mikhail Arkhipov

commit sha 98a9b506a79101db45a327f59981a92d0e0721c6

Turn off LS survey and banner (#12401) * Fix path * Suppress LS banner and survey * Comment * Format

view details

Karthik Nadig

commit sha 2a71954b0ccb9f3bb4538e37972dba9910025e98

Remove APIs related to ptvsd paths (#11757)

view details

push time in 13 days

push eventmicrosoft/vscode-python

Timothy Ruscica

commit sha 036621a3be73b8d7fb5f31d7acebd4a3b1106b55

Added export notebook to PDF (#12517) * temp work * started working on dependency checking * good start on pdf * removed space from label * added to command pallete * changed pdf method to TeX * fixed pdf title * removed unecessary changes * changed back package-lock.json * cleaned up dependency checker * made changes and add telemetry * changed from 2 to 1 error message * changed name for temp directory * removed duplicate import * removed mardown prefix * deleted temp file

view details

push time in 13 days

PR merged microsoft/vscode-python

Added export notebook to PDF skip news

Added the functionality to export a notebook to a PDF file.

This requires that the user has TeX installed on their machine. If they do not have TeX installed the export will fail and they will be prompted to install TeX. This prompt will also mention that the user can export the file to html and use the "Print to PDF" feature from their browser.

It's worth mentioning that some notebooks have elements that are not supported by TeX. If this is the case the user will see the same prompt telling them to install TeX as well as an error message prompt with the details of the failure.

TeX install: https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex

NOTE: Tests and Telemetry will be coming in a future PR. <!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] ~Has a news entry file (remember to thank yourself!).~
  • [x] Appropriate comments and documentation strings in the code.
  • [x] Has sufficient logging.
  • [x] ~Has telemetry for enhancements.~
  • [x] ~Unit tests & system/integration tests are added/updated.~
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+138 -33

1 comment

11 changed files

techwithtim

pr closed time in 13 days

Pull request review commentmicrosoft/vscode-python

Added export notebook to PDF

-import { injectable } from 'inversify';+import { inject, injectable } from 'inversify';+import * as path from 'path'; import { Uri } from 'vscode';+import { IFileSystem } from '../../common/platform/types';+import { IPythonExecutionFactory } from '../../common/process/types';+import { IJupyterSubCommandExecutionService, INotebookImporter } from '../types'; import { ExportBase } from './exportBase';  @injectable() export class ExportToPDF extends ExportBase {-    // tslint:disable-next-line: no-empty-    public async export(_source: Uri, _target: Uri): Promise<void> {}+    constructor(+        @inject(IPythonExecutionFactory) protected readonly pythonExecutionFactory: IPythonExecutionFactory,+        @inject(IJupyterSubCommandExecutionService)+        protected jupyterService: IJupyterSubCommandExecutionService,+        @inject(IFileSystem) protected readonly fileSystem: IFileSystem,+        @inject(INotebookImporter) protected readonly importer: INotebookImporter+    ) {+        super(pythonExecutionFactory, jupyterService, fileSystem, importer);+    }++    public async export(source: Uri, target: Uri): Promise<void> {+        const tempFile = await this.fileSystem.createTemporaryFile('.ipynb');

wow, sorry about that. Check now

techwithtim

comment created time in 13 days

push eventtechwithtim/vscode-python

Tim

commit sha c82c81aca4f3b184315a27f9287b50f0544344eb

deleted temp file

view details

push time in 13 days

push eventtechwithtim/vscode-python

Tim

commit sha 03c2d9314b2f9ce2fcfbd5106257d9f527ebc961

removed mardown prefix

view details

push time in 13 days

push eventtechwithtim/vscode-python

Tim

commit sha f7a4dbe38cfcc6a215a0de0ff56eab894c71000c

removed duplicate import

view details

push time in 13 days

push eventtechwithtim/vscode-python

Eric Snow

commit sha def0966b71a75ec73dd844b161a0fc14a0c688f5

Logging cleanup. (#11606) For #9837

view details

Kartik Raj

commit sha f1ba4908c3d6427c66412e5e2417011826d09b4c

Moved all logging into the Python output channel (#11695) * Added support * Correction * Only use console when environment variable is set * Code reviews * Added doc comments

view details

Kartik Raj

commit sha 9bedf2d350d2f9f41ce0ba6770cd2dbc5577aa7d

Added setting `python.logging.level` which carries the logging level value the extension will log at (#11698) * Added setting * Code reviews * Fix unit tests * Code reviews * Put config.level back * Added commnet * Code review * More code reviews * Fix tests

view details

Kartik Raj

commit sha fe1a91a234281263014323ffe123849048d8386b

Monkeypatch console.* calls on CI if we are asked to (#11897) * Move console.* monkeypatching to src/test/testLogging.ts * Use monkeypatching in all tests launched using testBootstrap.ts * Use monkeypatching in single workspace and multiroot tests * News entry * Don't do monkeypatching for smoketests * Modify gulp task to not delete 'out/client/logging' directory * Undo smoke test ccheck * Import only from ./out/client/logging in test logger * Added comment * More corrections * Add comments * Correct smoke tests * Oops

view details

Karthik Nadig

commit sha 17e317b7a48f5d83691e543db6aef23d2f6d80e0

Merge pull request #12432 from ericsnowcurrently/logging-changes-only Pull in the logging-related changes from the "logging-changes-and-drop-old-debugger" branch.

view details

Kim-Adeline Miguel

commit sha 65f9709b295547de29e9448ca955e015b63d35c1

Fix `linting.pylintEnabled` setting check (#12444) * Fix `linting.pylintEnabled` setting check * Use stub instead of handspun variable

view details

Pavel Minaev

commit sha b2d2ec34bb7c0816b6f94da64f403169da54988c

Fix #11678: Add "argsExpansion" debug property to launch.json schema (#12445)

view details

Eric Snow

commit sha 5e194c50e5d00d016029a83228a40eb538e53ce1

Fix an errant import. (#12488)

view details

Don Jayamanne

commit sha e396bfa9fdaccdd3f72360158ad16041f176d17c

Trigger changes in VSC Notebook when executing cells (#12489)

view details

Ian Huff

commit sha 29bf396c23df0f4c6c589624c585e8903e838fef

Mac keyboard undo and redo need to look for meta, not ctrl (#12487)

view details

David Kutugata

commit sha 1bec89bee8730ad42ce9a0d0d319915e3a299778

discard changes when the user clicks don't save (#12492)

view details

Brandon White

commit sha 3eb13259657e37c052ab8ba216ca1277a2d6c7e8

Added `workspaceContains:pyproject.toml` to activationEvents (#12056) (for #4765) This PR adds triggering off of 'pyproject.toml' in the workspace root to load the extension. Other recognizable file triggers (like setup.py) may be added later.

view details

Eric Snow

commit sha e39860742d2e704444b47beb934dd5a2ba73f8da

Move interpreter-info-related code to the py-envs component tree. (#12398) This change is part of the work to isolate a "component" for Python environments. The focus here is on pulling code related to getting interpreter info out of unrelated modules and into the py-envs component.

view details

Brett Cannon

commit sha e41681faf6435be5b3b93e02fd02b768936e809c

Drop `jediEnabled` from the issue template

view details

Jim Griesmer

commit sha 53c3fc6231adc2dd4edd8deeca207f4943f4d044

Update experiments.json (#12524) All required steps passed.

view details

David Kutugata

commit sha 88f3b432bbe93474cc29e413b6a831050a056beb

Remove kernel change on the Interactive Window (#12439) * add 'select kernel' handle message on the interactive window * remove kernel toolbar from the interactive window if th user uses a local jupyter server * add setting to enable it back * add news file * oops * Add the experiment, as well as IExperimentService on everything that extends WebViewHost * removed setting * add setting back

view details

Don Jayamanne

commit sha df69c426433fb0e26bb5596f8e1d51ea70242f9d

Fixes related to execution & clearing output of Native Notebooks (#12490) * Do not run cells if empty * Clearing output should clear status, exec times, cell execution count (added tests, to ensure execution_count is null) * When running a cell/nb we should set status of cell as running early on * Clearing output should mark document as dirty * Restoring running tests on CI (forgot to revert some changes)

view details

Joyce Er

commit sha bea5e97d3573b2492dc1699c2e3fd75d4c3766bd

Make node install version in contributing docs match ci.yml (#12528) * Make node version in docs match ci.yml * Update .nvmrc

view details

Ian Huff

commit sha 2cc6c95db59c71b14275b53d43a6f1eca0c93850

Fully handle iopub comm messages (#12512)

view details

Timothy Ruscica

commit sha 196d4922933f0eb0d495dbc471cb5682f21a9358

Merge branch 'master' into pdf

view details

push time in 13 days

push eventtechwithtim/vscode-python

Tim

commit sha ffc1c95cd5ed3497c4d8e7f216732d7273944efe

changed name for temp directory

view details

push time in 13 days

push eventtechwithtim/vscode-python

Tim

commit sha a85806dfde5ad284c9694191f1ad2d6e5b779a87

made changes and add telemetry

view details

Tim

commit sha 711994c0c9454316129b596803b48130c6f03d32

changed from 2 to 1 error message

view details

push time in 13 days

Pull request review commentmicrosoft/vscode-python

Added export notebook to PDF

-import { injectable } from 'inversify';+import { inject, injectable } from 'inversify';+import * as path from 'path'; import { Uri } from 'vscode';+import { IApplicationShell } from '../../common/application/types';+import { IFileSystem } from '../../common/platform/types';+import { IPythonExecutionFactory } from '../../common/process/types';+import { DataScience } from '../../common/utils/localize';+import { IJupyterSubCommandExecutionService, INotebookImporter } from '../types'; import { ExportBase } from './exportBase';  @injectable() export class ExportToPDF extends ExportBase {-    // tslint:disable-next-line: no-empty-    public async export(_source: Uri, _target: Uri): Promise<void> {}+    constructor(+        @inject(IPythonExecutionFactory) protected readonly pythonExecutionFactory: IPythonExecutionFactory,+        @inject(IJupyterSubCommandExecutionService)+        protected jupyterService: IJupyterSubCommandExecutionService,+        @inject(IFileSystem) protected readonly fileSystem: IFileSystem,+        @inject(INotebookImporter) protected readonly importer: INotebookImporter,+        @inject(IApplicationShell) private readonly applicationShell: IApplicationShell+    ) {+        super(pythonExecutionFactory, jupyterService, fileSystem, importer);+    }++    public async export(source: Uri, target: Uri): Promise<void> {+        const directoryPath = path.join(+            path.dirname(source.fsPath),+            path.basename(source.fsPath, path.extname(source.fsPath))+        ); // since the source is a temporary file we know its name will be unique

do you know of a way to create a temporary-directory that I can dispose of? or a way to simply generate a unique file name. I understand your suggestion and will make a change but right now I'm thinking the way to do this would be to generate a temporaryFile, read and store its name, dispose of it and continue. I just want a unique name for the directory

techwithtim

comment created time in 14 days

Pull request review commentmicrosoft/vscode-python

Added export notebook to PDF

-import { injectable } from 'inversify';+import { inject, injectable } from 'inversify';+import * as path from 'path'; import { Uri } from 'vscode';+import { IApplicationShell } from '../../common/application/types';+import { IFileSystem } from '../../common/platform/types';+import { IPythonExecutionFactory } from '../../common/process/types';+import { DataScience } from '../../common/utils/localize';+import { IJupyterSubCommandExecutionService, INotebookImporter } from '../types'; import { ExportBase } from './exportBase';  @injectable() export class ExportToPDF extends ExportBase {-    // tslint:disable-next-line: no-empty-    public async export(_source: Uri, _target: Uri): Promise<void> {}+    constructor(+        @inject(IPythonExecutionFactory) protected readonly pythonExecutionFactory: IPythonExecutionFactory,+        @inject(IJupyterSubCommandExecutionService)+        protected jupyterService: IJupyterSubCommandExecutionService,+        @inject(IFileSystem) protected readonly fileSystem: IFileSystem,+        @inject(INotebookImporter) protected readonly importer: INotebookImporter,+        @inject(IApplicationShell) private readonly applicationShell: IApplicationShell+    ) {+        super(pythonExecutionFactory, jupyterService, fileSystem, importer);+    }++    public async export(source: Uri, target: Uri): Promise<void> {+        const directoryPath = path.join(+            path.dirname(source.fsPath),+            path.basename(source.fsPath, path.extname(source.fsPath))+        ); // since the source is a temporary file we know its name will be unique+        const newFileName = path.basename(target.fsPath, path.extname(target.fsPath));+        const newSource = Uri.file(await this.createNewFile(directoryPath, newFileName, source));++        const args = [+            newSource.fsPath,+            '--to',+            'pdf',+            '--output',+            path.basename(target.fsPath),+            '--output-dir',+            path.dirname(target.fsPath)+        ];+        try {+            await this.executeCommand(newSource, target, args);+        } catch (e) {+            await this.applicationShell.showInformationMessage(DataScience.markdownExportToPDFDependencyMessage());+            throw e;

So the reason I do this is because further up there is a place that is handling the error. We discussed this earlier but the idea is this error is specific to PDF, only if the pdf export fails do we display this message that indicates that the user should install TeX. However, we still need to display the actual error that occurred. This is because it may actually be that TeX is installed and the notebook just can't be exported (might have some things TeX doesn't support). I don't know of a way of checking if TeX isn't installed, so I simply have to rely on a failure at this point to indicate I should show that "install TeX" message. That is why I re-throw the error. So we can see the actual error and then our suggestion that you might need to install TeX. Should I combine these messages? I can also move this message up to exportManagerFileOpener if you want but I thought it made sense to go here.

techwithtim

comment created time in 14 days

push eventtechwithtim/vscode-python

Tim

commit sha 2fe7c3788c9fa91cf5f6c4c836acb529f30dd924

cleaned up dependency checker

view details

push time in 14 days

PR opened microsoft/vscode-python

Added export notebook to PDF

Added the functionality to export a notebook to a PDF file.

This requires that the user has TeX installed on their machine. If they do not have TeX installed the export will fail and they will be prompted to install TeX. This prompt will also mention that the user can export the file to html and use the "Print to PDF" feature from their browser.

It's worth mentioning that some notebooks have elements that are not supported by TeX. If this is the case the user will see the same prompt telling them to install TeX as well as an error message prompt with the details of the failure.

TeX install: https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex

NOTE: Tests and Telemetry will be coming in a future PR. <!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] ~Has a news entry file (remember to thank yourself!).~
  • [x] Appropriate comments and documentation strings in the code.
  • [x] Has sufficient logging.
  • [x] ~Has telemetry for enhancements.~
  • [x] ~Unit tests & system/integration tests are added/updated.~
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+126 -26

0 comment

11 changed files

pr created time in 14 days

push eventtechwithtim/vscode-python

Tim

commit sha 0c529d9b0cae8d9601acbd043bd13e90147c2cc1

changed back package-lock.json

view details

push time in 14 days

push eventtechwithtim/vscode-python

Tim

commit sha c52fba2eb0c42c1e78626c6262875c90b3ef9c32

removed unecessary changes

view details

push time in 14 days

create barnchtechwithtim/vscode-python

branch : pdf

created branch time in 14 days

PR merged microsoft/vscode-python

Reviewers
Fixed bug in exporting notebook to HTML skip news type-bug

There are some notebooks that contain special lines or cells that cause NBConvert to fail to export them. If you'd like an example of such notebook I've attached a link to one. Previously when attempting to export this notebooks no error message would be displayed. In other words, I had not handled some edge cases where the export fails in one specific method (check files to see where). This PR simply handles the case where the export fails and displays the appropriate error message to the user.

Link to download notebook you can use to Repro: https://microsoft.sharepoint.com/teams/python/Shared%20Documents/test%20.ipynb%20notebooks/Core_Learning_Algorithms.ipynb

Simply open the notebook and try to export it to .html (you will need the latest master branch changes).

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] Has a news entry file (remember to thank yourself!).
  • [x] Appropriate comments and documentation strings in the code.
  • [x] Has sufficient logging.
  • [x] ~Has telemetry for enhancements.~
  • [x] ~Unit tests & system/integration tests are added/updated.~
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+34 -9

1 comment

3 changed files

techwithtim

pr closed time in 18 days

push eventmicrosoft/vscode-python

Tim Ruscica

commit sha e7136b1448d27e9a607ca0d8242d4272b48aabdb

fixed a bug (#12464)

view details

push time in 18 days

PR opened microsoft/vscode-python

Fixed bug in exporting notebook to HTML

There are some notebooks that contain special lines or cells that cause NBConvert to fail to export them. If you'd like an example of such notebook I've attached a link to one. Previously when attempting to export this notebooks no error message would be displayed. In other words, I had not handled some edge cases where the export fails in one specific method (check files to see where). This PR simply handles the case where the export fails and displays the appropriate error message to the user.

Link to download notebook you can use to Repro: https://microsoft.sharepoint.com/teams/python/Shared%20Documents/test%20.ipynb%20notebooks/Core_Learning_Algorithms.ipynb

Simply open the notebook and try to export it to .html (you will need the latest master branch changes).

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] Has a news entry file (remember to thank yourself!).
  • [x] Appropriate comments and documentation strings in the code.
  • [x] Has sufficient logging.
  • [x] ~Has telemetry for enhancements.~
  • [x] ~Unit tests & system/integration tests are added/updated.~
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+34 -9

0 comment

3 changed files

pr created time in 18 days

create barnchtechwithtim/vscode-python

branch : fix

created branch time in 18 days

delete branch techwithtim/vscode-python

delete branch : label

delete time in 18 days

push eventmicrosoft/vscode-python

Tim Ruscica

commit sha 23b9f5aab567ae72f053d8995e43cab73baa3976

removed space from HTML label (#12458)

view details

push time in 18 days

PR merged microsoft/vscode-python

Reviewers
removed space from HTML label skip news

Removed a single space from the HTML label in the quick pick menu

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] Has a news entry file (remember to thank yourself!).
  • [x] Appropriate comments and documentation strings in the code.
  • [x] ~Has sufficient logging.~
  • [x] ~Has telemetry for enhancements.~
  • [x] ~Unit tests & system/integration tests are added/updated.~
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+1 -1

1 comment

1 changed file

techwithtim

pr closed time in 18 days

PR opened microsoft/vscode-python

Reviewers
removed space from HTML label skip news

Removed a single space from the HTML label in the quick pick menu

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] Has a news entry file (remember to thank yourself!).
  • [x] Appropriate comments and documentation strings in the code.
  • [x] ~Has sufficient logging.~
  • [x] ~Has telemetry for enhancements.~
  • [x] ~Unit tests & system/integration tests are added/updated.~
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+1 -1

0 comment

1 changed file

pr created time in 18 days

create barnchtechwithtim/vscode-python

branch : label

created branch time in 18 days

push eventmicrosoft/vscode-python

Tim Ruscica

commit sha e6fc11dd29b7217e3ade0dcc140240e7b83a26af

Added telemetry for export to python and html (#12435) * added initial telemetry * spelling fixes * moved location of sending telemetry * fixed export to python telemetry * added suggested new telemetry * changed telemetry to send format * changed open close telemetry * small changes * removed unused imports * combined some telementry together * small typo fix * simplified small block * fixed lint

view details

push time in 19 days

PR merged microsoft/vscode-python

Added telemetry for export to python and html skip news

This PR adds telemetry for the exporting to HTML and Python script features. Telemetry for PDF will be added once it is functioning.

The information being tracked in this PR is the following:

  • User pressed export as UI button
  • User pressed export as python quick pick button
  • User pressed export to html quick pick button
  • User invoked export to python from command pallet
  • User invoked export to html from command pallet
  • User successfully exports to python
  • User successfully exports to html
  • User opened their exported html file (python export auto opens)
  • User did NOT open their exported html file
  • Export to python operation cancelled
  • Export to html operation cancelled
  • Export to python operation failed
  • Export to html operation failed

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] ~Has a news entry file (remember to thank yourself!).~
  • [x] Appropriate comments and documentation strings in the code.
  • [x] ~Has sufficient logging.~
  • [x] Has telemetry for enhancements.
  • [x] ~Unit tests & system/integration tests are added/updated.~
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+86 -22

1 comment

8 changed files

techwithtim

pr closed time in 19 days

delete branch techwithtim/vscode-python

delete branch : fix

delete time in 19 days

push eventmicrosoft/vscode-python

Tim Ruscica

commit sha 834449f6f9b64e6aa839d49a041f1774a6c5f3f0

added max height for variable explorer (#12438)

view details

push time in 19 days

PR merged microsoft/vscode-python

Reviewers
Set max height for variable explorer skip news

Previously you could resize the variable explorer off the screen. Now it does not let you resize it off the screen (will stop right at the bottom).

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] ~Has a news entry file (remember to thank yourself!).~
  • [x] Appropriate comments and documentation strings in the code.
  • [x] ~Has sufficient logging.~
  • [x] ~Has telemetry for enhancements.~
  • [x] ~Unit tests & system/integration tests are added/updated.~
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+2 -1

1 comment

1 changed file

techwithtim

pr closed time in 19 days

push eventtechwithtim/vscode-python

Tim

commit sha 37fb7079fa57f5e93f292d3c2bb5974c4b3b471d

fixed lint

view details

push time in 19 days

push eventtechwithtim/vscode-python

Tim Ruscica

commit sha 9f69819ca59a0b3a21ebf389e964e3d4cfe38345

Update src/client/datascience/export/exportManagerFileOpener.ts Co-authored-by: Don Jayamanne <don.jayamanne@yahoo.com>

view details

push time in 19 days

PR opened microsoft/vscode-python

Set max height for variable explorer

Previously you could resize the variable explorer off the screen. Now it does not let you resize it off the screen (will stop right at the bottom).

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] ~Has a news entry file (remember to thank yourself!).~
  • [x] Appropriate comments and documentation strings in the code.
  • [x] ~Has sufficient logging.~
  • [x] ~Has telemetry for enhancements.~
  • [x] ~Unit tests & system/integration tests are added/updated.~
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+2 -1

0 comment

1 changed file

pr created time in 19 days

create barnchtechwithtim/vscode-python

branch : fix

created branch time in 19 days

push eventtechwithtim/vscode-python

Tim

commit sha 9d67b2d734c895d771ea123ae71e105934ae5ccc

simplified small block

view details

push time in 19 days

push eventtechwithtim/vscode-python

Tim

commit sha b4f7f954a95b5d509ada3e1a6d430e852753bc49

small typo fix

view details

push time in 19 days

push eventtechwithtim/vscode-python

Tim

commit sha a649bf11b384dcc42b015cff5d04a5b6b6ca81b2

combined some telementry together

view details

push time in 19 days

Pull request review commentmicrosoft/vscode-python

Added telemetry for export to python and html

 export class ExportCommands implements IDisposable {                 return;             }             model = activeEditor.model;++            if (exportMethod) {+                sendTelemetryEvent(Telemetry.ExportNotebookAsCommand, undefined, { format: exportMethod });

needs to stay here, because only if we don't pass a model was this called from the command pallet

techwithtim

comment created time in 19 days

push eventtechwithtim/vscode-python

Tim

commit sha 9bf3ddb19ae6b6579094a1c7b6bf36ae6c64ec93

removed unused imports

view details

push time in 19 days

PR opened microsoft/vscode-python

Added telemetry for export to python and html

This PR adds telemetry for the exporting to HTML and Python script features. Telemetry for PDF will be added once it is functioning.

The information being tracked in this PR is the following:

  • User pressed export as UI button
  • User pressed export as python quick pick button
  • User pressed export to html quick pick button
  • User invoked export to python from command pallet
  • User invoked export to html from command pallet
  • User successfully exports to python
  • User successfully exports to html
  • User opened their exported html file (python export auto opens)
  • User did NOT open their exported html file
  • Export to python operation cancelled
  • Export to html operation cancelled
  • Export to python operation failed
  • Export to html operation failed

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] ~Has a news entry file (remember to thank yourself!).~
  • [x] Appropriate comments and documentation strings in the code.
  • [x] ~Has sufficient logging.~
  • [x] Has telemetry for enhancements.
  • [x] ~Unit tests & system/integration tests are added/updated.~
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+98 -20

0 comment

8 changed files

pr created time in 19 days

push eventtechwithtim/vscode-python

Tim

commit sha 94d22b9c5ba00a4c4407f54744daa8a0e6f6eeb7

small changes

view details

push time in 19 days

push eventtechwithtim/vscode-python

Tim

commit sha d257072572eaeed423e3c11f34853752bc6cd82e

changed open close telemetry

view details

push time in 19 days

push eventtechwithtim/vscode-python

Tim

commit sha acbcb94af893a312b26b3e8f858a3a89011043df

changed telemetry to send format

view details

push time in 19 days

push eventtechwithtim/vscode-python

Tim

commit sha 573c6b8432f45043c89fc1935a992f9cf1a3ce8b

added suggested new telemetry

view details

push time in 19 days

push eventtechwithtim/vscode-python

Tim

commit sha caa1858deeafb3764754370ed4725614aec94342

fixed export to python telemetry

view details

push time in 19 days

push eventtechwithtim/vscode-python

Tim

commit sha 9ec8993ef423dd8dbfbb016faebfcb1076c94eca

moved location of sending telemetry

view details

push time in 19 days

push eventtechwithtim/vscode-python

Tim

commit sha 123116884fdbcbbf090b09a6b033d22467d0abb4

spelling fixes

view details

push time in 19 days

create barnchtechwithtim/vscode-python

branch : telemetry

created branch time in 19 days

delete branch techwithtim/vscode-python

delete branch : html

delete time in 20 days

push eventmicrosoft/vscode-python

Tim Ruscica

commit sha 9d382de3b594fbcd3222e96e52324772955b46f9

Added exporting notebook to HTML (#12375) * export working * added export base * file opens when click yes button * small changes to exportManagerFileOpener * small changes * added tests for html (new file) * localized string * added news file * added missing keys to package.nls.json * addressed comments * removes strange space * checked exported file is HTML file * modified test * fixed tests * changed launch.json back to original

view details

push time in 20 days

PR merged microsoft/vscode-python

Added exporting notebook to HTML

For # I've added the export to HTML feature as well as some tests for it. I plan to add telemetry in a future PR.

<!-- If an item below does not apply to you, then go ahead and check it off as "done" and strikethrough the text, e.g.: - [x] ~Has unit tests & system/integration tests~ -->

  • [x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • [x] Title summarizes what is changing.
  • [x] Has a news entry file (remember to thank yourself!).
  • [x] Appropriate comments and documentation strings in the code.
  • [x] ~Has sufficient logging.~
  • [X] ~Has telemetry for enhancements.~
  • [x] Unit tests & system/integration tests are added/updated.
  • [x] ~Test plan is updated as appropriate.~
  • [x] ~package-lock.json has been regenerated by running npm install (if dependencies have changed).~
  • [x] ~The wiki is updated with any design decisions/details.~
+246 -37

1 comment

18 changed files

techwithtim

pr closed time in 20 days

push eventtechwithtim/vscode-python

Tim

commit sha 66e403653dab1867f1c1dca32d9bf8f857819596

changed launch.json back to original

view details

push time in 20 days

push eventtechwithtim/vscode-python

Tim

commit sha fd3de1855a9e11d93f98f718959f05ab31a9cb82

fixed tests

view details

push time in 20 days

more