Ray's Knowledge Base
Unlock

nbmake passes on notebooks with no code cells; count code cells after a jupytext rebuild

PitfallVerified 13 Oct 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

After rebuilding notebooks from MyST Markdown with jupytext, the notebooks were much smaller (02 went from 70 KB to 7 KB). nbmake still passed on all of them.

Cause#

jupytext read the Markdown pages as plain Markdown because --from myst was missing. The result had no code cells. nbmake executes zero cells without error, so a pass on an empty notebook proves nothing.

Fix#

Rebuild with jupytext --from myst. After every rebuild, check that each notebook has code cells and that they hold outputs. Check the file size too. Do not treat an nbmake pass as proof on its own.

Evidence#

Session on dftracer-genesis-analysis: the agent found no code cells at all, rebuilt with --from myst, then confirmed 10, 9 and 7 code cells with outputs in notebooks 01 to 03 and an nbmake pass on all of them.