default_data paths wrong in a binder instance
benmsanderson opened this issue · 0 comments
Paths to default_data are wrong when running notebooks in a binder instance (only possible to test this now we're public)
https://mybinder.org/v2/gh/ciceroOslo/ciceroscm/HEAD
The binder clones the github repo to the home directory of docker image - and the data directory is present at ~/src/ciceroscm/default_data
However, current method for importing model as
from ciceroscm import CICEROSCM
results in package being installed in
/srv/conda/envs/notebook/lib/python3.7/site-packages/ciceroscm
with relative paths being defined from there.
default data dir is currently defined in a relative sense in input_handler.py:
default_data_dir = os.path.join(
os.path.dirname(os.path.realpath(file)), "default_data"
)
so it's looking in the wrong place and we get:
cscm_dir=cscm.CICEROSCM(cfg)
FileNotFoundError: Input file rf_luc_file not found at /srv/conda/envs/notebook/lib/python3.7/site-packages/ciceroscm/default_data/IPCC_LUCalbedo.txt