eWaterCycle / infra

Instructions for system administrators to deploy the eWaterCycle platform
Apache License 2.0
0 stars 0 forks source link

Julia support #150

Closed sverhoeven closed 10 months ago

sverhoeven commented 10 months ago

Add julia so wflow.jl can be run.

Tested with vagrant in notebook and ipython in Jupyter terminal

from juliacall import Main
Main.Pkg.add("BasicModelInterface")

Fixes #149

sverhoeven commented 10 months ago

Current implementation in notebook gives:

File /opt/conda/envs/ewatercycle/lib/python3.10/site-packages/juliapkg/state.py:58, in reset_state()
     56 if project:
     57     if not os.path.isabs(project):
---> 58         raise Exception(f'{project_key} must be an absolute path')
     59     STATE['project'] = project
     60 else:

Exception: PYTHON_JULIAPKG_PROJECT must be an absolute path

So we need alternative.

sverhoeven commented 10 months ago

Current implementation in notebook gives:

File /opt/conda/envs/ewatercycle/lib/python3.10/site-packages/juliapkg/state.py:58, in reset_state()
     56 if project:
     57     if not os.path.isabs(project):
---> 58         raise Exception(f'{project_key} must be an absolute path')
     59     STATE['project'] = project
     60 else:

Exception: PYTHON_JULIAPKG_PROJECT must be an absolute path

So we need alternative.

Using fork https://github.com/eWaterCycle/pyjuliapkg/tree/expanduser

sverhoeven commented 10 months ago

Worked in vagrant so should work in src.