xin-huang/dadi-cli

GenerateCache should accept custom model files

RyanGutenkunst opened this issue · 3 comments

Users should be able to use custom models with GenerateCache. This will be particularly important for joint DFE analyses.

Added the ability to import custom models when generating a cache.

I also needed to make a bug fix where the current directory needed to be added to the PATH for importlib.import_module to work:

import sys
sys.path.append('.')

Let me know if that might cause an issue otherwise we can close this.

We should probably use os.getcwd() rather than '.'. I'm not sure the "dot" will be broadly compatible on Windows, for example.

We should probably use os.getcwd() rather than '.'. I'm not sure the "dot" will be broadly compatible on Windows, for example.

That change has been pushed.