question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pre-commit hook : nbformat is inconsistent locally and on CI

See original GitHub issue

Hello 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:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mwoutscommented, Jan 14, 2021

Oh I do have the same issue on my recent PR, cf. #709 for instance

1reaction
mwoutscommented, Jan 14, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found