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

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

Merged
merged 1 commit into from
Jul 26, 2024

Conversation

dienhoa
Copy link
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.

Copy link

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
8 checks passed
@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