Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Doris committed Feb 18, 2024
2 parents cfc4b94 + b84c3cb commit 3e4894b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1><img src="https://raw.githubusercontent.com/JuliaPy/PythonCall.jl/main/docs/src/assets/logo.png" alt="PythonCall.jl logo" style="width: 100px;"><br>PythonCall &amp;&nbsp;JuliaCall</h1>
<h1><img src="docs/src/assets/logo.png" alt="PythonCall.jl logo" style="width: 100px;"><br>PythonCall &amp;&nbsp;JuliaCall</h1>

[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Stable Documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliapy.github.io/PythonCall.jl/stable)
Expand Down
3 changes: 3 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ include("customdocs.jl")
makedocs(
sitename = "PythonCall & JuliaCall",
modules = [PythonCall],
format = Documenter.HTML(
assets = ["assets/favicon.ico"],
),
warnonly = [:missing_docs], # avoid raising error when docs are missing
pages = [
"Home" => "index.md",
Expand Down
Binary file added docs/src/assets/favicon.ico
Binary file not shown.
Binary file modified docs/src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/juliacall.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pip install juliacall

Developers may wish to clone the repo (https://github.com/JuliaPy/PythonCall.jl) directly
and pip install the module in editable mode. You should add `"dev":true, "path":"../.."` to
`python/juliacall/juliapkg.json` to ensure you use the development version of PythonCall
`pysrc/juliacall/juliapkg.json` to ensure you use the development version of PythonCall
in conjunction with JuliaCall.

## Getting started
Expand Down
19 changes: 19 additions & 0 deletions pytest/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,22 @@ def test_issue_394():
assert jl.f is f
assert jl.y is y
assert jl.seval("f(x)") == 4

def test_issue_433():
"https://github.com/JuliaPy/PythonCall.jl/issues/433"
from juliacall import Main as jl

# Smoke test
jl.seval("x=1\nx=1")
assert jl.x == 1

# Do multiple things
out = jl.seval(
"""
function _issue_433_g(x)
return x^2
end
_issue_433_g(5)
"""
)
assert out == 25
2 changes: 1 addition & 1 deletion src/JlWrap/module.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function pyjlmodule_dir(self::Module)
end

function pyjlmodule_seval(self::Module, expr::Py)
Py(Base.eval(self, Meta.parse(strip(pyconvert(String, expr)))))
Py(Base.eval(self, Meta.parseall(strip(pyconvert(String, expr)))))
end

function init_module()
Expand Down

0 comments on commit 3e4894b

Please sign in to comment.