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

Improve juliainfo #197

Merged
merged 4 commits into from
Oct 24, 2018
Merged

Improve juliainfo #197

merged 4 commits into from
Oct 24, 2018

Conversation

tkf
Copy link
Member

@tkf tkf commented Sep 5, 2018

Improvements:

  • The original environment variables are used when launching juliainfo. This makes it possible to call juliainfo after setting up core.Julia. This should not happen when using core.Julia normally. However, some bugs may invoke juliainfo after libjulia initialization. This PR does not fix such bug but at least make the error message less insane.

  • Make juliainfo callable even when PyCall.jl is not installed. This makes the failure less confusing; i.e., PyJulia fails when using PyCall is evaluated.

  • The standard error of julia is captured. It is bundled in CalledProcessError in case of non-zero exit code. In case of zero exit code, stderr emits warning if some message was written by julia.

  • Currently, startup file is not loaded in the main PyJulia session. Including the startup file has some potential problem. For example, if something is printed in the startup file then juliainfo would break. So it seems to be that the safe default is to avoid loading the startup file (though it makes sense to add an option to load it in the future).

@coveralls
Copy link

coveralls commented Sep 5, 2018

Pull Request Test Coverage Report for Build 496

  • 5 of 6 (83.33%) changed or added relevant lines in 1 file are covered.
  • 66 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-1.7%) to 76.715%

Changes Missing Coverage Covered Lines Changed/Added Lines %
julia/core.py 5 6 83.33%
Files with Coverage Reduction New Missed Lines %
julia/find_libpython.py 2 79.83%
julia/core.py 64 80.66%
Totals Coverage Status
Change from base Build 469: -1.7%
Covered Lines: 425
Relevant Lines: 554

💛 - Coveralls

@tkf
Copy link
Member Author

tkf commented Sep 6, 2018

Rebased and fixed some issues. CIs are all green. It's good to go now.

@tkf tkf mentioned this pull request Sep 6, 2018
tkf added 2 commits September 24, 2018 17:13
The standard error of julia is captured.  It is bundled in
CalledProcessError in case of non-zero exit code.  In case of zero
exit code, stderr is emits warning only if some message was written by
julia.
Currently, startup file is not loaded in the main PyJulia session.
Including the startup file has some potential problem.  For example,
if something is printed in the startup file then `juliainfo` would
break.  So it seems to be that the safe default is to avoid loading
the startup file (though it makes sense to add an option to load it in
the future).
@tkf tkf changed the title Fix juliainfo for the case when PyCall.jl is not installed Improve juliainfo Sep 25, 2018
@tkf tkf added this to the 0.2 milestone Sep 28, 2018
@tkf tkf merged commit 47f4a06 into JuliaPy:master Oct 24, 2018
@tkf tkf deleted the juliainfo branch October 24, 2018 03:07
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.

2 participants