Nbdev tests fail on first commit

Hi all, I’m working through the nbdev tutorial here. It’s all very good and helpful except that on my first commit the CI tests fail without any useful message (at least not that I can find).

What I have done is

  • Create a conda environment
  • Install Jupyter and nbdev (plus quarto dependencies)
  • Initialise my Git repo
  • Initialise with nbdev_new
  • Add my files and push

When I do that the CI test fails, but clicking through I don’t see any error message other than

Error: Process completed with exit code 1.

I would be really grateful for any guidance on what is causing this and how I could debug whatever tests are running. I’ve looked through the forum and didn’t find anything addressing this.

My repo is here.

If you look further up you’ll see this:

!!! Detected unstripped out notebooks
!!!Remember to run nbdev_install_hooks

Thanks so much! I was sure I had caught that and run nbdev_install_hooks and still had no luck. But I ran nbdev_install_hooks manually followed by nbdev_prepare and then pushed to git and the test passed.

I’m not really clear why this is an issue that would cause the tests to fail. Firstly the notebooks are directly created from nbdev_new unmodified, so shouldn’t have any output to be stripped out. Secondly, I understood that any extra notebook output that would create confusing diffs between commits is automatically removed by nbdev.

I just had a similar experience. In the tutorial, you are asked first to initialize your nbdev repo by entering:

nbdev_new

and then the next step is to push

git add .
git commit -m 'Initial commit'
git push

Which results in a CI Failure (:x:)

In the next section, the instructions suggest

nbdev_install_hooks

Questions

  • Is this the expected behavior of nbdev_new?
  • Should nbdev_new create a notebook with the correct metadata?

Maybe the tutorial needs to be updated.