Created
August 16, 2019 09:03
-
-
Save jobel-code/8adffdd45a7d5780258ddfca1b35e273 to your computer and use it in GitHub Desktop.
Ensures that a modulle path, relative two levels down from the running jupyter notebook is accessible from the Jupyter Notebook. Assumes that you have a file directory that follows the [cookiecutter-data-science repo](https://drivendata.github.io/cookiecutter-data-science/#cookiecutter-data-science)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
# Cookicutter `data_science` Making the /src/ available as module from `/notebooks/dashboards/` | |
module_path = os.path.abspath(os.path.join('../..')) | |
print('{}'.format(module_path)) | |
if module_path not in sys.path: | |
sys.path.append(module_path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment