This file will become your README and also the index of your documentation.
pip install nbdev_tutorial
I’m on Win10 and instead of playing with wirtualbox I went with WSL
and Anaconda
so not all steps may apply to You if You run native Linux
or Mac or Windows.
- Install WSL (using windows store)
- Install anaconda in WSL terminal - follow steps in this blog
- create new conda env using
conda create --name env_name python=3.10
- Activate your new env using
conda activate [env name]
- install nbdev and few other packages
conda install -c fastai nbdev
conda install jupyter ipykernel pandas scikit-learn
- run
nbdev_install_hooks
this should install all required jupyter related stuff if it is not laready installed
- register your env with jupyter:
python -m ipykernel install --user --name=[your env name]
- install quarto:
- I’ve used
Linux Tarball
as platform on download page - after selecting your download method you will get list of
commands to run, in my case it was:
wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.2.258/quarto-1.2.258-linux-amd64.tar.gz
- downloads tarballmkdir ~/opt
tar -C ~/opt -xvzf quarto-1.2.258-linux-amd64.tar.gz
- extract content of tarballmkdir ~/bin
ln -s ~/opt/quarto-1.2.258/bin/quarto ~/bin/quarto
- create a link to quarto directory in your home directory( echo ""; echo 'export PATH=$PATH:~/bin\n' ; echo "" ) >> ~/.bashrc
- add the link to your PATHsource ~/.bashrc
- rerun the .bashrcquarto check
- you should get all ok (except R) and it should report your conda repo version of python
- (alternative) instead of installing quarto manually you should
be able to run
nbdev_install_quarto
to install it
- I’ve used
- create github repo and clone it to folder where you want to keep
yddddour project files -
git clone [repo url]
- navigate to your project dir and run
nbdev_new
- this will create multiple new files and directories needed for library to nbdev, documantation, ci, etc - most importantly createsnbs
dir where the notebooks sits and[your_project_name]
dir where the actuall library code will sit - run
nbdev_export
- this will run all export commands from your project (we will explain more on that later - if you havent changed anything this should create core.py in your project code folder that reflect00_core.ipynb
content). - run
pip install -e .
- this will install your package for local development allowing you to import stuff
foo2 ()
foo2 ()