add enable/disable cell number in .py files#1428
Merged
jph00 merged 1 commit intoAnswerDotAI:masterfrom Jul 26, 2024
Merged
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When exporting a notebook to a .py file, we currently have something like
# %% {nb_path} {cell_number}at the beginning of each exported cell.However, the cell number can pollute the git changes, especially when we add a new cell at the beginning of a notebook; then we will have changes on all subsequent cells in the .py
This PR adds one new setting in the setting.ini:
cell_number. When set to False, we disable the cell_number discussed above.Side effect: The cell_number is used to update the changes from .py back to the notebook, so disabling it also disables this feature.