Functions to setup a colab runtime for use with nbdev and github.
IN_COLAB = 'google.colab' in str(get_ipython())
I think checking the name of the ipython shell ↑ is the most reliable way of checking if we're running in colab or not.
This function will:
- mount your google drive to
/content/drive, - read project settings from
/content/drive/My Drive/nbdev_colab_projects.ini, git clonethe project toproject_pathifproject_pathdoesn't already exist,cdtoproject_path,- install nbdev,
- run
setup_gitand - return
config(theConfigParserused to readnbdev_colab_projects.ini) andproject_config(the project section ofconfig)