-
Notifications
You must be signed in to change notification settings - Fork 250
Fix our use of pyjulia so we can use the conda-forge version. #2444
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
Conversation
JacksonBurns
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM but I have a question that may impact changes (thus "Request changes") - do we now have to use "python-jl rmg.py ..." without a system image and then "python rmg.py ..." otherwise? The docs should clarify this, unless I am just misunderstanding. We should also replace #2310 with this PR, I think.
Codecov Report
@@ Coverage Diff @@
## main #2444 +/- ##
=======================================
Coverage 48.13% 48.13%
=======================================
Files 110 110
Lines 30626 30626
Branches 7988 7988
=======================================
Hits 14743 14743
Misses 14353 14353
Partials 1530 1530 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
After this, we should always use
|
Dealing with system images is happening on #2443 and instructions for what to do when you have one will be added there. (FWIW, I currently can't get it it work). |
|
Relinking is mostly a convenience thing. All it does is makes it so when you use |
|
Great. Thanks for the confirmation @mjohnson541. Do you think this PR is Ok then? |
|
LGTM! |
We used to force a symlink of python-jl to where python used to be, so that when you ask for python you get python-jl. This would work if the python-jl itself called to python3, (which is what our hacked version of it did). But the conda-forge version of python-jl calls python, and if python points to python-jl, then you get an infinite loop of calling python-jl. That's my hunch. This will test the theory, and see what happens. Maybe we'll have to explicitly call python-jl in a few places we used to be lazy and called python. But it seems to work and makes us compatible with a standard python-jl. Also, "explicit is better than implicit!"
The rmg conda recipe just changes 'python-jl' to point to a python3 instead of python binary. Maybe this can be avoided. Would be nice to not maintain a non-standard package. Also merged Calvin's commit that did the same and forced it to >=0.6 Co-authored-by: Richard West <r.west@northeastern.edu> Co-authored-by: Calvin Pieters <calvinpieters@gmail.com>
These could be helpful. It seems some of the code changes on this branch were trying to get things to work in a debugger, so I thought I'd share how I got it to work (in VSCode)
(Annoyingly, this builds all the julia stuff and takes for ever. Grrr)
If we remove the symlink from python to python-jl, so that people are more aware that they are in fact running python-jl, we need to update the running instructions.
Now that we're using the conda-forge::pyjulia in the environment, we need to not do this symlink step in the Docker image. We want the environment for our docker users to match everyone else, so we have one set of instructions.
Good review - I've addressed the concern by updating the documentation in a subsequent commit.
|
The build-documentation job ran on the CI test (or this wouldn't have auto-merged) but when I try on my mac I get an error culminating in I need to run sphinx through python-jl, like so: The instead I do:: Not sure if this is true for others? |
This is a subset of what was in #2443 but I'm breaking it off into a smaller PR that can be merged first.
Motivation or Problem
Description of Changes
python-jlmasquerade aspython).Testing
Reviewer Tips
Most of this has already been reviewed by @JacksonBurns when it was #2443 so should be a quick review, but I'd like @mjohnson541 's input.
Possible concern.
The readme for pyrms says "to work with conda python efficiently currently requires relinking the python executable to the python-jl executable"
so perhaps @mjohnson541 will tell us that skipping this step (as proposed here) is a bad idea?
I can't see anything in the commit messages when those instructions were added to explain the details.
I would note that
Environment alert⚠️
This updates the conda environment file again.
So to be consistent, you'll need
pyjuliafromconda-forgeinstead of from thermgchannel)pythonto point topython-jl, ether in your normal environment or in some other workflows, revert this.