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

feat(menu) add run cells below functionality #1195

Merged
merged 1 commit into from
Nov 15, 2016
Merged

feat(menu) add run cells below functionality #1195

merged 1 commit into from
Nov 15, 2016

Conversation

jkornblum
Copy link
Member

Adds Menu > Run Cells Below to the menu.
This functionality runs the currently focused cell and all cells below it.
I use this functionality quite frequently in Jupyter notebooks and have added it to nteract now.

Commit also Enhances ./test/utils.js to add more configuration for building dummy notebooks for test

All comments welcome, thanks!

Adds Menu > Run Cells Below to menu and adds run cells below functionality.
Enhances ./test/utils.js to add more configuration for building dummy notesbooks for test
@codecov-io
Copy link

codecov-io commented Nov 15, 2016

Current coverage is 90.07% (diff: 100%)

Merging #1195 into master will increase coverage by 0.06%

@@             master      #1195   diff @@
==========================================
  Files            57         57          
  Lines          1511       1521    +10   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           1360       1370    +10   
  Misses          151        151          
  Partials          0          0          

Powered by Codecov. Last update bd6d0f0...a2c8bfb

@@ -172,6 +172,31 @@ export function dispatchPublishUserGist(store, event, githubToken) {
store.dispatch({ type: 'PUBLISH_USER_GIST' });
}

/**
* Redux dispatch function to run the focused cell and all cells below it.
* It obtains the focused cell cell id and all code cell cell ids below.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/code cell cell/code cell/

const cellsBelowFocusedId = notebook.get('cellOrder').skip(indexOfFocusedCell);
const cells = notebook.get('cellMap');

cellsBelowFocusedId.filter((cellID) =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment I'd love to see here if the check for code isn't on the same line for the filter:

// Only run on code cells

@rgbkrk rgbkrk merged commit ab759c7 into nteract:master Nov 15, 2016
@rgbkrk
Copy link
Member

rgbkrk commented Nov 15, 2016

Went ahead and merged, feel free to make another PR with the suggestions I made if you like.

@jkornblum jkornblum deleted the run-cells-below branch February 5, 2017 21:46
@lock
Copy link

lock bot commented Apr 3, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked and limited conversation to collaborators Apr 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants