-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Robust fallback mechanism #69
Conversation
👍 exactly what the Re the |
Sorry. Fell off my radar. Thanks for refreshing the thread! |
Bringing main branch up to date, fixing github action, then merging this PR (hopefully today) |
Great, thanks for the merge! |
No worries. Thanks for the effort and the patience! PS: I haven't version bump'ed it yet so it won't be available on devel. Do you need it soon? I'm investigating the need for an update in the version of the dependencies while I'm at it today |
No rush on the new release. Feel free to whenever is convenient. |
Actually, I've version bump in #70 and pushed upstream. Better getting the version out there earlier, so that it's tried and tested as widely as possible |
We had some issues running
velociraptor::scvelo
at my workplaceI think the issue is that the R process links to our built-in system zlib (
/lib64/libz.so.1
) which takes precedence over the newer version that is installed into the conda environment (and it does get installed, I checked). Then when reticulate runs Python inside the same process it also uses the old zlib version.There might be a more elegant solution, but I found a neat workaround to this issue that follows advice in the
basilisk
manual. Basically we set thetestload
packages so basilisk can check if there's a linking error, and if there is an error then basilisk creates a fallback environment that contains its own version of R and runs the.run_scvelo
function there instead. I namespace (::
) every function call inside the basilisk function so that they will still work the fallback R interpreter which has no packages loaded by default. What's nice about this solution is that it changes absolutely nothing for users who didn't encounter this issue, but it fixes it for those who did. The only thing I don't like is having to use:::
to access internal functions inside thevelociraptor
package, since it won't be available by default in the fallback env, but I can't think of a better solution.The modified version of this package has been checked by myself and another researcher and it seems to work fine.