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

Configure julia options #184

Closed
dpinol opened this issue Jun 15, 2022 · 3 comments · Fixed by #192
Closed

Configure julia options #184

dpinol opened this issue Jun 15, 2022 · 3 comments · Fixed by #192

Comments

@dpinol
Copy link
Contributor

dpinol commented Jun 15, 2022

Hi,
with pyjulia it's possible to configure some julia options (see https://github.com/JuliaPy/pyjulia/blob/master/src/julia/options.py#L79)
Is it possible with PythonCall?
If not, I'm willing to create a PR if somebody could give me any hint on how to integrate it

related to #73

@cjdoris
Copy link
Collaborator

cjdoris commented Jun 15, 2022

No, those options are not currently supported, but a PR to implement some would be welcome.

I guess you'd need to do something like this: https://github.com/JuliaPy/pyjulia/blob/56a739126d3fed0d24e548069ff216fea78fbe1b/src/julia/libjulia.py#L330

It would go just above here: https://github.com/cjdoris/PythonCall.jl/blob/6c07d4e4eadb8706b15c5a6fcde9efe116982c3f/pysrc/juliacall/__init__.py#L80

Were there particular options you had in mind?

I think for now use environment variables to set the options, such as PYTHON_JULIACALL_COMPILE=min. There isn't any other config mechanism in JuliaCall right now.

@cjdoris
Copy link
Collaborator

cjdoris commented Jun 15, 2022

I have just pushed a change which parses some options into the CONFIG dict here: https://github.com/cjdoris/PythonCall.jl/blob/bb411e7015b9c22b3eba6417927630b3d96a1ff5/pysrc/juliacall/__init__.py#L89-L97

This allows you to set options either as environment variables as above or via the -X argument to python, such as python -X juliacall_compile=min.

A PR which uses these to actually set the options in Julia would be great.

@dpinol
Copy link
Contributor Author

dpinol commented Jun 17, 2022

Cool, I'm working on it. Cheers!

thautwarm added a commit to thautwarm/PythonCall.jl that referenced this issue Jun 27, 2022
thautwarm added a commit to thautwarm/PythonCall.jl that referenced this issue Jun 27, 2022
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 a pull request may close this issue.

2 participants