pre-commit hook : nbformat is inconsistent locally and on CI
See original GitHub issueHello I am a developer on Habitat-Sim. I have just started having this problem (yesterday everything was working properly). When I run pre-commit locally on our codebase via :
pre-commit run jupytext-sync --all-files
all colabs in the project pass, but when I run it on CI, it seems to be attempting to upgrade the nbformat minor version from 4 to 5, and inserting synthesied v4.5-compatible ID values in each cell.
Here’s a link to the CI with the error.
I am using jupytext 1.6.0 and on my local python is 3.8.5.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
How to ensure that all pre-commit hooks pass in CI/CD
Is there anyway to run something in CI/CD to ensure all Pre-commit hooks pass (we're using GitHub actions). If at least one hooks...
Read more >Jupytext ChangeLog
We now test Jupytext against Python 3.6 to 3.11 on the CI ... We have updated the pre-commit hooks and in particular we...
Read more >Supported hooks - pre-commit
check-preference-manifests - This hook checks preference manifest plists for inconsistencies and common issues. forbid-autopkg-overrides - This hook prevents ...
Read more >Automatically format and lint code with pre-commit - Interrupt
We can do one better and hook up these tools to run locally on any commit or update to a version-controlled branch by...
Read more >Improve Code Quality with Git Hooks and Pre-commit
So what steps can we take to improve the quality of code, enforce consistent code formatting and catch these errors before even adding...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Oh I do have the same issue on my recent PR, cf. #709 for instance
Hi @jturner65 , well I was glad to learn about the new
id
field of cells in nbformat 4.5… I’ve just read https://jupyter.org/enhancement-proposals/62-cell-id/cell-id.html (but maybe that is not the most up-to-date documentation)I agree with you, using
jupytext
should not cause a change in the notebook format. I’ll see how to add a test for that.Is it an option for you to use
jupytext>=1.7.1
? In that version we fixed the issue #671 (missing attachments in markdown cells), and that might have improved the stability of the notebook format version in round trips.Also cc @Skylion007 as he knows the Habitat project better than me.