Skip to content
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

feat: configure Julia version and required packages #2896

Merged
merged 7 commits into from
Jan 12, 2024

Conversation

ianna
Copy link
Collaborator

@ianna ianna commented Dec 13, 2023

The Python module JuliaCall can be installed as follows:

pip install juliacall

Here is how it works (see JuliaPkg for more details):

 % python
Python 3.11.5 (main, Sep 11 2023, 08:19:27) [Clang 14.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from juliacall import Main as jl
[juliapkg] Locating Julia ^1.9
[juliapkg] Using Julia 1.9.2 at /usr/local/bin/julia
[juliapkg] Using Julia project at /Users/yana/anaconda3/julia_env
[juliapkg] Installing packages:
           julia> import Pkg
           julia> Pkg.add([Pkg.PackageSpec(name="AwkwardArray", uuid="7d259134-7f60-4bf1-aa00-7452e11bde56"), Pkg.PackageSpec(name="PythonCall", uuid="6099a3de-0909-46bc-b1f4-468b9a2dfc0d")])
           julia> Pkg.resolve()
           julia> Pkg.precompile()
   Resolving package versions...
    Updating `~/anaconda3/julia_env/Project.toml`
  [7d259134] + AwkwardArray v0.1.2
  [6099a3de] + PythonCall v0.9.15
    Updating `~/anaconda3/julia_env/Manifest.toml`
  [7d259134] + AwkwardArray v0.1.2
  [992eb4ea] + CondaPkg v0.2.22
...

@ianna ianna mentioned this pull request Dec 13, 2023
1 task
Copy link

codecov bot commented Dec 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (eb004ce) 81.93% compared to head (fa789b6) 81.93%.
Report is 2 commits behind head on main.

Additional details and impacted files

Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be added to a MANIFEST or something to be available to users who install awkward from the sdist or from a wheel? We want this to work for users who install through pip and conda, not just by checking out GitHub.

Also, I suppose the version number will need to be updated after every AwkwardArray.jl release. Can it be set to "latest"? If not, that's okay. It will just become part of our normal workflow to increase this number after an AwkwardArray.jl release becomes public.

Otherwise, this is good! We should do whatever is necessary to streamline the interface between Python and Julia.

@agoose77
Copy link
Collaborator

@ianna from the README, it looks like we want this file to exist under site-packages/awkward/juliapkg.json. Is that so? I'd be keen to work on this, it might take some thinking about w.r.t editable installs etc.

@ianna
Copy link
Collaborator Author

ianna commented Dec 14, 2023

@ianna from the README, it looks like we want this file to exist under site-packages/awkward/juliapkg.json. Is that so? I'd be keen to work on this, it might take some thinking about w.r.t editable installs etc.

@agoose77 - Thank you! It would be great if you could find time :-)

@agoose77
Copy link
Collaborator

I've modified the build configuration. We should explicitly check that editable installs perform this rewrite (they should, though; hatch uses the wheel target).

Copy link
Collaborator Author

@ianna ianna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agoose77 and @jpivarski - I think, this is good to be merged. Thanks!

@jpivarski
Copy link
Member

Okay, I'll add this to the set that are being tested and will be included in awkward 2.5.2. Thanks!

@jpivarski jpivarski enabled auto-merge (squash) January 12, 2024 16:27
@jpivarski jpivarski merged commit 6f7dc10 into main Jan 12, 2024
38 checks passed
@jpivarski jpivarski deleted the ianna/add_julia_pkg branch January 12, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants