-
Notifications
You must be signed in to change notification settings - Fork 73
[RFC] Module scripts #649
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
[RFC] Module scripts #649
Conversation
Hello, thanks for the PR. If I'm honest I don't think JuliaCall would benefit from a CLI. Can you explain why being able to launch a Julia REPL like this is useful? I think a better alternative would be to add a CLI to JuliaPkg to run Julia directly, like I do see the utility of the init CLI but again I think it would be better in JuliaPkg like In conclusion, I'd totally be up for a PR to add a CLI to JuliaPkg with the above commands (and others like |
Thanks for your perspective and response to my request for comments! I agree it makes more sense to put these in juliapkg, especially what is currently "init". I can make an RFC PR for that in the next few days. One argument for keeping it here is that it may be more discoverable (many codes using juliacall will not have any I can totally see why the REPL seems a bit too much. In particular makes it possible to modify the environment directly, ie without going through pyjuliapkg (since you can |
On the discoverability side, juliapkg is in the docs for juliacall, which should suffice. I'm always happy to take PRs to improve the docs. I'm happy to have the REPL stuff but over in juliacall like I said, which would directly launch Julia as a subprocess, instead of starting a REPL from within Julia. If you do make a PR on juliapkg, please use click to create the CLI, using click's subcommands instead of separate modules. I'll close this PR. Feel free to open an issue on juliapkg if you want to discuss further. |
Just created JuliaPy/pyjuliapkg#63 |
This PR adds two module scripts:
python -m juliacall
/python -m juliacall.repl
to launch a REPL (with a custom banner 😄)python -m juliacall.init
to (lazily) download Julia and optionally show juliapkg env info.The idea is these are nice for debugging -- calling
python -m juliacall
with the same exact environment aspython juliacall_script.py
, you know you are running exactly the same julia and project. Thejuliacall.init
is nice as a quick sanity check, and in distributed settings like discourse post.Happy to make any changes!
Here's what the REPL looks like:
