ContextLab / davos

Import packages in Python, even if they aren't installed!
MIT License
33 stars 8 forks source link

conda support: refactor check_conda & helpers, conda-related config fields #55

Open paxtonfitzpatrick opened 2 years ago

paxtonfitzpatrick commented 2 years ago

I was originally thinking implementing smuggling via conda would work similar to how it does for pip, where we could simply replace the conda executable that'd normally be looked up in $PATH with the full path to the given environment's exe. But looking at different conda versions and distributions, there usually isn't a separate conda executable, which means we'll need to implement this more like how IPython does so, by calling the base environment's conda executable and passing the particular environment's --prefix when appropriate.

Looking at what we'll want to lazily evaluate, store, make editable vs read-only, etc.), it quickly became clear that the most sensible implementation of this would require a good bit of refactoring across a number of modules. So for the initial release I'm leaving this as-is and just patching davos.implementations.ipython_common to fix #53, since conda isn't supported by v0.1.0 anyway. When we eventually want to support conda, I'll circle back to this more serious refactor.

jeremymanning commented 2 years ago

seems reasonable...