Skip to content

add enable/disable cell number in .py files#1428

Merged
jph00 merged 1 commit intoAnswerDotAI:masterfrom
dienhoa:cell_number
Jul 26, 2024
Merged

add enable/disable cell number in .py files#1428
jph00 merged 1 commit intoAnswerDotAI:masterfrom
dienhoa:cell_number

Conversation

@dienhoa
Copy link
Copy Markdown
Contributor

@dienhoa dienhoa commented Jul 26, 2024

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.

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jph00 jph00 added the enhancement New feature or request label Jul 26, 2024
@jph00 jph00 merged commit 858e0dc into AnswerDotAI:master Jul 26, 2024
@dienhoa dienhoa deleted the cell_number branch July 26, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants