blurr icon indicating copy to clipboard operation
blurr copied to clipboard

Update to nbdev v2

Open DanteOz opened this issue 3 years ago • 3 comments

Update blurr to utilize nbdev v2. Following: https://nbdev.fast.ai/migrating.html

Migration Tasks

  • [x] Upgrade directives
  • [x] Update nbdev template files
  • [x] Update directive names
  • [x] Update doc path in settings.ini

Update checks

  • [x] Check lib exports
  • [x] Check docs build
  • [x] Check that test run & pass

DanteOz avatar Jul 30 '22 15:07 DanteOz

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

In order to get docs to render I had to refactor non-exported cells containing imports and code into separate cells. This comes from a couple of discussions on fastai-dev channel on discord.

Code exec rules for documentation

  1. Don't mix imports and code cells, for cells which are not exported.
  2. Cells run when building docs:
  • Cells with #| export
  • Cells with imports
  • Cells with show_doc

Rules synthesized from discord threads:

  1. https://discord.com/channels/689892369998676007/996087844164620438/996143002760265728
  2. https://discord.com/channels/689892369998676007/1003478679021703178/1003514785901588574

DanteOz avatar Aug 01 '22 05:08 DanteOz

@ohmeow In order to get the docs sidebar to be hierarchical I had to create a sidebar.yml file in the nbs folder. If you decide to create a new notebook it will have to be added to this file in order to show up in the sidebar. The structure of the docs is currently the same as the existing docs, however, the new docs generate the sidebar items from the notebook markdown titles. I left the titles as is for now. Let me know if you want me to take a pass at retitling/shortening the notebook titles.

Reference sidebar.yml: https://github.com/fastai/fastai/blob/master/nbs/sidebar.yml

DanteOz avatar Aug 01 '22 07:08 DanteOz