To start contributing, install the required development dependencies in a virtual environment:
pip install nbdev nbqa pre-commitThen install required Git hooks:
nbdev_install_git_hooks
pre-commit installAll development takes place in Jupyter notebooks in $REPO_ROOT/nbs, which are compiled to library code in $REPO_ROOT/uberduck_ml_dev. To make changes, edit edit the one of the IPython notebooks in $REPO_ROOT/nbs/ after starting a jupyter server with jupyter notebook. Once you're satisfied with the changes, build them:
./build_libAny IPython notebook cell which is not exported is a test. Run all tests:
nbdev_test_nbsTest a single notebook:
nbdev_test_nbs --fname nbs/text.util.ipynb(can optionally add --verbose for more output)
This project uses nbdev.
If you are using an older version of this template, and want to upgrade to the theme-based version, see this helper script (more explanation of what this means is contained in the link to the script).
- Make sure you are using the latest version of nbdev with
pip install -U nbdev - If you are using an older version of this template, see the instructions above on how to upgrade your template.
- It is important for you to spell the name of your user and repo correctly in
settings.inior the website will not have the correct address from which to source assets like CSS for your site. When in doubt, you can open your browser's developer console and see if there are any errors related to fetching assets for your website due to an incorrect URL generated by misspelled values fromsettings.ini. - If you change the name of your repo, you have to make the appropriate changes in
settings.ini - After you make changes to
settings.ini, runnbdev_build_lib && nbdev_clean_nbs && nbdev_build_docsto make sure all changes are propagated appropriately.