Hello,
I am trying to add tardis (GitHub - tardis-sn/tardis: TARDIS - Temperature And Radiative Diffusion In Supernovae) to the numba-integration-tests. One of the packages that is being used, pyne=0.7, is available through conda-forge but not through conda. All of the conda dependencies that tardis uses are installed using conda-forge; is there a way I can redefine conda_install in numba/texasbbq/texasbbq.py line 168
def conda_install(env, name):
"""Use conda to install a package into an environment."""
execute("conda install -y -n {} {}".format(env, name))
to use conda-forge instead of conda through my class, similar to how many of the other methods are defined in the switchboard numba-integration-testing/switchboard.py at master · KevinCawley/numba-integration-testing · GitHub ?
The second problem right now is that tardis uses 6 pip dependencies. I think I could add a special character/identifier in front of these dependencies in the list, and then further modify the conda_install to then do pip if the first letter of the name has the matching special character.
Can I modify this function in my class in switchboard.py, or is there another way that I can get these dependencies to be downloaded? As conda_install isn’t a member function of GitTarget(object) I don’t think my current solution will work as written. This is my current solution:
@property
def conda_install(env, name):
"""Use conda-forge and pip to install a package into an environment."""
if (name[0] == ~):
execute("pip install -y -n {} {}".format(env, name[1:]))
else:
execute("conda-forge install -y -n {} {}".format(env, name))
Right now a solution has been found that doesn’t do is. Instead in the conda dependencies the command to install using conda forge is added and it works.