-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Added juliapkg as a package #20380
Added juliapkg as a package #20380
Conversation
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
@conda-forge/staged-recipes ready for review! |
cc @ngam |
Oh my days. Never heard of this one before 😅 @thewchan, what's the specific need here? What do you envision? We are trying to come up with a comprehensive policy for julia packages in conda-forge. Have you seen this PR? conda-forge/pysr-feedstock#43 It would be good to know your intended use case and how best we can support everyone and everything to make the ecosystem healthy and sustainable. Do you use julia from conda-forge or the official julia? |
We may need to investigate setting the right flags/env vars here https://github.com/cjdoris/pyjuliapkg#which-julia-gets-used and here https://github.com/cjdoris/pyjuliapkg#where-are-julia-packages-installed |
@ngam if you think these 2 packages are not appropriate for Conda Forge, I'll close the PR. |
No no, that's not the point. Please keep it open. We simply want to make sure we are supporting this in the best way possible, that's all. Let's try to get others involved and see what the best solution is. Let me see what #20379 is trying to do... |
Understood, let me know if you need anything from me. |
This is technically a pure Python package. The other package juliacall, which depends on this, is a replacement for pyjulia. The main question is if this is installed with the julia-feedstock, can it detect julia there? Since julia installed by conda-forge should be on the PATH, I believe it should. cc: @cjdoris |
@thewchan Thanks so much for adding this recipe, and the one for JuliaCall! I have been meaning to get around to it myself... For the name, how about pyjuliapkg (and pyjuliacall for JuliaCall)? The "py" prefix seems to be the consensus for Python packages (pyjulia, pytorch, pyqt, etc). That should make it especially clear that this is not a Julia package - given there has already been some confusion about this above. The recipe as it is looks great. If the user also installs Julia from Conda (and is a compatible version), then it will be picked up and used by JuliaPkg/JuliaCall automatically simply because it is in the PATH. Though note that if JuliaUp is also installed, JuliaPkg will use that instead of whatever is in the PATH - perhaps JuliaPkg could change its preference order in this case, something to think about, I don't think it has been suggested yet, but I'd be against making the Julia package a dependency of JuliaPkg/JuliaCall, because it frees the user to use a different Julia installation if they wish. Would you mind making me a recipe maintainer too? |
I made the comment about pythoncall based on these files https://github.com/cjdoris/PythonCall.jl/tree/main/src So, is the python component alone enough? Why don't we package it like it is done upstream, with the python component and then the julia component? |
I guess my confusion was from housing two distinct (presumably independent) packaged under one repo named as if it were a julia package... anyway, my personal vote would be to package as upstream at this point. If upstream wants these to be explicitly delineated and independent, then they should be packaged as such upstream. |
Yes, I think the order should be PATH then JuliaUp; @mkitti thoughts?
How is this done currently upstream? I am still confused. |
@ngam I'm not sure what exactly you are suggesting, can you be more specific please? Just to lay out how these packages interact:
JuliaPkg tries to find Julia in these ways:
|
If juliaup is installed then there probably should be julia on the path. I'm not sure if I checked where juliaup installs itself. Unless we modified something, it might be in |
Feel free to open an issue on the JuliaPkg repo to discuss the order to search for Julia. It seems off-topic for the present PR. |
If we have juliaup installed in $JULIA_DEPOT_PATH will it find juliaup there? https://github.com/conda-forge/julia-feedstock/blob/main/recipe/scripts/activate.sh |
No, right now JuliaPkg only looks for JuliaUp in the PATH. That could be changed of course. |
Sorry re the lack of clarity. This answers my question.
That was my guess from earlier. JuliaCall (#20379) is useless without PythonCall (or as you say, "[m]ost of its implementation is ..."). I think our consensus from the other discussion in conda-forge/pysr-feedstock#43 is that we want to package the needed julia components for any given package that (strictly speaking) needs them to function. In my understanding, pyjuliacall (JuliaCall) is simply a wrapper for julia-pythoncall (PythonCall). Thus, based on the proposed strategy --- that we package the julia artifacts for any python package that is useless without julia components --- pyjuliacall should be packaged like we are trying to package pysr (packaging the python part as is, then packaging the produced artifacts from SymbolicRegression). Do I understand the part about JuliaCall being useless without PythonCall correctly? Of course, this doesn't have to be this way. We can simply package the python part and let the users do whatever they want, but the idea of an ecosystem necessitates decisions at this level so that environments are contained and isolated the conda-forge way. It would be great to hear your opinion about this, so please feel free to weigh in here: conda-forge/pysr-feedstock#43. This proposal is far from final and is subject to change. Hence, your input will be taken seriously and will make a difference. |
Of course it is on-topic. We want to make sure these packages we have interact in ways we understand and design correctly. We do not want users to be caught off guard, especially that we have made an effort to customize and contain all julia parts installed from conda-forge (see the julia-feedstock). Please be patient with us as we go through this; our goal is not to slow down this, but rather to ensure best compatibility and ease for users :) |
Yes, you are correct. But I have some reservations about the way being used to bundle Julia dependencies over on PySR, I'll make some comments over there. Nevertheless, JuliaPkg and JuliaCall are functioning Python packages which can deal with their own Julia dependencies, so distributing them as-is via Conda is fine, no? I appreciate they can be better integrated with other Conda packages that may provide Julia dependencies, but that can be a job for later when a general strategy for distributing Julia packages via Conda is established. |
I think this package and the JuliaCall one can both be merged pretty much as-is. As the generic framework for distributing Julia packages via Conda develops, we can hook into that (it should be as simple as setting an env var), but I don't think we're at that stage yet. The main question mark is about the name. I think |
I am fine with merging this, but not the other yet. There is no reason to call this Do you not agree with our approach in the pysr pr? The idea is to build |
I also think it should be pyjuliapkg and pyjuliacall. There is also an R package called JuliaCall: That is older and completely unrelated to what is being packaged here. What is being packaged here is As I mentioned on the pysr pull request, we can use these tools within the build phase similar to how we used pyjulia in the build phase for pysr. |
Also there is no JuliaCall.jl. That package is PythonCall.jl and would presumably be called julia-pythoncall in conda-forge |
Wouldn't it be awesome if cjdoris wrote a Julia package just to call Julia 😝 😅 (my bad) Yeah, I am fine with the naming either way. Didn't mean to suggest different naming, my sole point was that if cjdoris wanted to keep the same name as pypi, I saw no problem with that since it was strictly speaking not a julia package. But good point on other (e.g. R) packages existing though. To be clear though, we don't often attach the "py" prefix to things as much; it kind of goes without saying, unlike for example how spack does it or brew or others... |
@mkitti how do you feel about this? Do you think this should go through without thinking harder about the julia part? If you agree with cjdoris, then let's do it (with the assumption to do something about it later)
|
I'm heavily leaning towards the name pyjuliapkg because the git repository is https://github.com/cjdoris/pyjuliapkg |
Sorry, I meant the other part, merging both "as-is" |
As is still uses the wrong name I think |
Call it |
As I believe you already worked out, |
Regarding integrating JuliaPkg with the proposed strategy for installing Julia packages via conda-forge: JuliaPkg can be configured to work offline using a given Julia executable and given Julia project by setting these env vars: PYTHON_JULIAPKG_OFFLINE=yes
PYTHON_JULIAPKG_EXE=/path/to/julia/executable
PYTHON_JULIAPKG_PROJECT=/path/to/julia/project These lines can be added to the activate script for the Julia package in conda-forge, but should only be done once it is possible to install all the required Julia dependencies via conda-forge. Most importantly, all these dependencies must be in a single project. As far as I understand, the current strategy installs Julia packages into separate Julia projects and there is no automatic mechanism to put them all into a single project. |
@@ -0,0 +1,41 @@ | |||
{% set name = "juliapkg" %} |
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.
{% set name = "juliapkg" %} | |
{% set name = "pyjuliapkg" %} |
Also I think we should add @cjdoris as a maintainer of the feedstock if he would like. |
|
||
test: | ||
imports: | ||
- juliapkg |
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 won't work. The name is different from the import. The import is still going to be whatever upstream has (i.e. the stuff on pypi)
Yes please. |
As far as I'm concerned this is a Python package. It also happens to have some code to download Julia and Julia packages. We might need to do some work to make everything play nice together down the road. |
I'm going to reiterate that I strongly feel this package should be "pyjuliapkg" named after the git repository rather than "juliapkg" as it is on PyPI. Outside of the context of PyPI, the name "juliapkg" would be extremely confusing here on conda-forge, which I'm told is meant for more languages than Python. Without that name change, I cannot offer my endorsement. |
This is always problematic. We want to have the original name but we also want to reflect what PyPI users migrating elsewhere will expect. I don't know the reasons why the package has a different name on PyPI but here we, to make this a bit easier for users, to use multiple outputs and reserve both names for this package. |
The name makes perfect sense within PyPI. Within the upstream Within a Conda where I'm still trying to make slow progress on packaging Julia code, I think "juliapkg" could be very easily confused for another piece of software, particularly one that directly involves Julia rather than Python. xref: |
Hi friend! We really, really, really appreciate that you have taken the time to make a PR on In an effort to maintain this repository and increase the signal-to-noise for open PRs, the maintainers of If you'd like to keep it open, please comment/push and we will be happy to oblige! Note that very old PRs will likely need to be rebased on Cheers and thank you for contributing to this community effort! |
Hi again! About a month ago, we commented on this PR saying it would be closed in another month if it was still inactive. It has been a month and so now it is being closed. Thank you so much for making it in the first place and contributing to the community project that is Cheers and have a great day! |
Checklist
url
) rather than a repo (e.g.git_url
) is used in your recipe (see here for more details).