I have a large python projects where data is too large to share in the same way each time. Different people may use network locations or copy something to their local drive. The path is used by scripts and notebooks in different subfolders.
For example, I will create a config.py
to define the path to the data folder.
import sys
sys.path.append('../')
from config import DATA_PATH
This works UNTIL I reorganise a project then I find myself counting dots and going through each notebook. Is there a way without using absolute paths to reliably pickup config in the project folder which allows me to organise sub-folders which sometimes can be another level deep without changing all files?
project/
├── __init__.py
├── config.py
├── scripts/
│ ├── __init__.py
│ └── some_script.py
└── notebooks/
├── __init__.py
└── some_notebook.ipynb