Skip to content

Conversation

JamesWrigley
Copy link
Contributor

This makes using JuliaPkg optional. Also sneaked in a change to use [sources] in the docs project.

Tested manually. Should fix JuliaPy/pyjuliapkg#56.

@cjdoris
Copy link
Collaborator

cjdoris commented Sep 14, 2025

This looks good thank you! A few comments:

  • Can we make the option be just exe not exepath? For consistency with PythonCall. Keeping it as exepath internally is fine.
  • Why rename project to opt_project?
  • I'd rather that using juliapkg was all-or-nothing. That is, either you have to set both of these options or neither. The reason being that the project and executable are coupled - the project was created with a specific version of julia.
  • It's true that the project must contain PythonCall, but even stronger, it must be at exactly the same version as juliacall. Can you put this in the docs? I think this already gets checked by PythonCall so an error will happen if you get it wrong.

@JamesWrigley
Copy link
Contributor Author

Roger that, I think all of those are fixed in 69b90ca (tested again manually).

(BTW I like using fixup commits during review :) if you think this is ready then I can rebase the branch, or you can squash merge)

@cjdoris
Copy link
Collaborator

cjdoris commented Sep 14, 2025

Don't worry, I always squash.

Looking good.

Main other thing is testing. If you're familiar with GitHub CI can you add a case to the test workflow that uses these new env vars? The PythonCall tests (in the same file) do a similar thing to test against either CondaPkg or a pre-installed python. You'll have to conditionally do the install-julia action, followed by running a command to set up a Julia project, and then set these env vars when running the tests. If you're unsure I can do it when I get some time.

This makes using JuliaPkg optional.
@JamesWrigley
Copy link
Contributor Author

Got there in the end 😅 I tried to keep the actual test command contained in one step but it was tricky to set the environment variables correctly so I split it into one step for JuliaPkg and another without. Turns out that CI was already running the setup-julia action so I changed it to only run when we're not using JuliaPkg.

Copy link
Collaborator

@cjdoris cjdoris left a comment

Choose a reason for hiding this comment

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

Looking good just a couple of small tweaks please.

@cjdoris cjdoris merged commit a9b77e4 into JuliaPy:main Sep 17, 2025
16 checks passed
@cjdoris
Copy link
Collaborator

cjdoris commented Sep 17, 2025

I made a few little tweaks before merging. Great work, thank you!

@JamesWrigley JamesWrigley deleted the no-juliapkg branch September 17, 2025 18:58
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.

Add an option to disable file locking
2 participants