igorbrigadir / nbdev-api-template

Draft Template Repository for using NBDev to deploy a REST API with FastAPI
MIT License
0 stars 0 forks source link

used? #6

Open graphific opened 3 years ago

graphific commented 3 years ago

Hi Igor, Curious to hear if you're using the prehook template for nbdev in any of your work and any learnings you can share?

igorbrigadir commented 3 years ago

Yeah - i should update this template a bit.

But yes - i've been using https://github.com/igorbrigadir/nbdev-api-template/blob/master/.pre-commit-config.yaml to force it to run nbdev_clean_nbs and nbdev_build_lib but not the FastAPI or Poetry part of this template.

The xargs bash loop thing kinda feels bad - but that was the only way i could get it to run properly with black formatting too. And there are still a couple of issues with the nbdev scripts themselves for using as pre commit hooks: https://github.com/fastai/nbdev/issues/403

Another thing that was came up a few times was nbdev occasionally breaking in CI, but that's easily fixed by pinning the versions of nbconvert etc like in here: https://github.com/fastai/nbdev/issues/521

Hope that helps!