I have a python package that a lot of colleagues use, and I have a julia package that does some of the same things vastly better, so I’d like to use it from the python package, as an optional install. I’m not too worried about the mechanics of how this will work out once everything is installed (I’m quite happy with PythonCall
), but I am very worried about the installation process and environment handling. In particular, I’m trying to make the case to my colleagues that working with julia is awesome, to encourage them to just move over, so I don’t want their first encounters to be painful.
Obviously, the most worrying part is checking that julia exists locally and is sufficiently up to date, then installing/updating julia automatically if needed. There are a few resources I’ve looked at, but it’s not clear to me what the most maintainable option would be.
@MilesCranmer has the wonderful pysr
, which does lots of cool stuff. In particular, he uses shared julia environments named f"pysr-{pysr.__version__}"
to install the julia stuff, which is clever. On the other hand, he uses PyCall, which is DOA for me because of how it interacts with different python environments. (Even Miles seems to agree that any pulse is faint, as he has applied the AED.)
The diffeqpy
package does similar things. It uses a shared julia environment named "diffeqpy"
, and uses PythonCall
, but depends on jill.py
. I suppose this was started at a time when jill.py
was the best option, but it’s not clear to me that that’s still the case.
@jlapeyre has a nice-looking package, that basically abstracts this stuff into a separate package. I think that’s a great idea, but this one looks like it hasn’t been updated in a while. Looks like there was some cross-fertilization with diffeqpy
. In particular, this also uses jill.py
. Maybe the best use of my time would just be to try to pitch in on this package with any lessons I learn here.
I am happy to require some form of conda
. I know there’s a julia feedstock, but it looks like a nightmare to maintain, and indeed seems to be having trouble updating to julia 1.10 (which is quite understandable given those difficulties). There’s also a juliaup feedstock, but it’s not clear to me if that’s better than the julia feedstock, or if there are advantages to one or the other.
I guess having some specific questions would be helpful:
- Is
jill.py
still the best option in this context, or should it be replaced byjuliaup
? - Is either of the conda-forge options likely to be reliable going forward? Is one better than the other? Are there drawbacks with, e.g., the size of the executables if they’re installed in each python env?
- What are the arguments for using a single shared environment vs. appending the python package version to its name? Maybe just the major or major.minor elements?
- Since I’ll probably have to do a good deal of writing code either way, would it be more productive to try to help update @jlapeyre’s package? Or should I just roll my own for my package, and leave it at that?