Skip to content
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

Clear all output should also delete execution count #2964

Closed
chrislill opened this issue Oct 9, 2019 · 5 comments
Closed

Clear all output should also delete execution count #2964

chrislill opened this issue Oct 9, 2019 · 5 comments

Comments

@chrislill
Copy link

Issue Type: Bug

Clear all output is an important feature when using source control on a long running project. We use it so that a diff only identifies code changes, rather than minor changes in output or execution count. Standard functionality in Jupyter is that execution count is cleared when clear all output is selected. Execution count is considered to be part of the output.

Steps to repro:

  1. Run some cells in a notebook in VS Code
  2. Click Clear All Output
  3. Inspect Execution Count
  4. Check in to git
  5. Add a cell in the middle of the code
  6. Rerun the notebook
  7. Inspect Execution Count
  8. Do a diff

Expected results:

  1. Execution count is empty
  2. The diff only picks up the new cell

Actual results:

  1. Execution count is still populated
  2. The diff picks up the changed execution counts

Extension version: 2019.10.41019
VS Code version: Code 1.38.1 (b37e54c98e1a74ba89e03073e5a3761284e3ffb0, 2019-09-11T13:35:15.005Z)
OS version: Windows_NT x64 10.0.18362

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz (4 x 2808)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.93GB (6.75GB free)
Process Argv C:\Users\clill\Source\Repos\handson\housing.ipynb
Screen Reader no
VM 0%
.
@rchiodo
Copy link
Contributor

rchiodo commented Oct 9, 2019

Thanks for the feedback. Seems like execution count should be cleared to me too.

@DonJayamanne
Copy link
Contributor

@DavidKutu Please continue working on this.
I think the saved notebook file still has the execution count.
I.e. currently the UI gets updated, however the raw ipynb file still has the execution count. I didn't mean to commit the changes to remove the cell exec count (as mentioned inthe PR review comments, it was accidental)

@DonJayamanne
Copy link
Contributor

The execution_count is still in the ipynb file (open in regular editor).
Based on bug report, this shouldn't exist.

Actual results:
1. Execution count is still populated
2. The diff picks up the changed execution counts

``

@DonJayamanne
Copy link
Contributor

Moving back to back log to ensure we add tests for this.

@DonJayamanne
Copy link
Contributor

Tests have been added

@lock lock bot locked as resolved and limited conversation to collaborators Feb 21, 2020
@microsoft microsoft unlocked this conversation Nov 14, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants