From bb485ba7afe90486066012bb301f18531dc984d2 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Thu, 13 Feb 2025 08:31:30 -0800 Subject: [PATCH 01/11] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 653910d158..6a4e1a31b1 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ SciMLBase.jl is the core interface definition of the SciML ecosystem. It is a low dependency library made to be depended on by the downstream libraries to supply the common interface and allow for interexchange of mathematical problems. + ## v2.0 Breaking Changes The breaking changes in v2.0 are: From 85e1e50908f3a649d17daba4049a0e2ffb14eabe Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Thu, 13 Feb 2025 13:32:31 -0800 Subject: [PATCH 02/11] Update README.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 6a4e1a31b1..653910d158 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,6 @@ SciMLBase.jl is the core interface definition of the SciML ecosystem. It is a low dependency library made to be depended on by the downstream libraries to supply the common interface and allow for interexchange of mathematical problems. - ## v2.0 Breaking Changes The breaking changes in v2.0 are: From 876ac5281b3eb4692109f780f879b7e57a8aa5fb Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Fri, 14 Feb 2025 06:15:23 -0800 Subject: [PATCH 03/11] Delete test/python/pycall.jl --- test/python/pycall.jl | 46 ------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 test/python/pycall.jl diff --git a/test/python/pycall.jl b/test/python/pycall.jl deleted file mode 100644 index c3570ce97a..0000000000 --- a/test/python/pycall.jl +++ /dev/null @@ -1,46 +0,0 @@ -using PyCall, SciMLBase, OrdinaryDiffEq - -py""" # This is a mess because normal site-packages is not writeable in CI -import subprocess, sys, site -subprocess.run([sys.executable, '-m', 'pip', 'install', '--user', 'julia']) -subprocess.run([sys.executable, '-m', 'pip', 'install', '--user', 'diffeqpy']) -sys.path.append(site.getusersitepackages()) -""" - -@testset "numargs" begin - py""" - def three_arg(a, b, c): - return a + b + c - - def four_arg(a, b, c, d): - return a + b + c + d - - class MyClass: - def three_arg_method(self, a, b, c): - return a + b + c - - def four_arg_method(self, a, b, c, d): - return a + b + c + d - """ - - @test SciMLBase.numargs(py"three_arg") === 3 - @test SciMLBase.numargs(py"four_arg") === 4 - x = py"MyClass()" - @test SciMLBase.numargs(x.three_arg_method) === 3 - @test SciMLBase.numargs(x.four_arg_method) === 4 -end - -@testset "solution handling" begin - py""" - from julia import OrdinaryDiffEq as ode - - def f(u,p,t): - return -u - - u0 = 0.5 - tspan = (0., 1.) - prob = ode.ODEProblem(f, u0, tspan) - sol = ode.solve(prob, ode.Tsit5()) - """ - @test py"sol" isa ODESolution -end From 058880818c124a357b250f7bd8176ab0e2ee6e69 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Fri, 14 Feb 2025 06:15:37 -0800 Subject: [PATCH 04/11] Update runtests.jl --- test/runtests.jl | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 985a71c648..b4e519d0f2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -151,9 +151,6 @@ end if !is_APPVEYOR && GROUP == "Python" activate_python_env() - @time @safetestset "PyCall" begin - include("python/pycall.jl") - end @time @safetestset "PythonCall" begin include("python/pythoncall.jl") end From 9d5970759c57504e7ad682e9a82f9e1cbcf486ef Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Fri, 14 Feb 2025 08:14:52 -0800 Subject: [PATCH 05/11] Update pythoncall.jl --- test/python/pythoncall.jl | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test/python/pythoncall.jl b/test/python/pythoncall.jl index 0d6ba72262..298be0958a 100644 --- a/test/python/pythoncall.jl +++ b/test/python/pythoncall.jl @@ -1,8 +1,3 @@ -# PyCall and PythonCall must use the same Python interpreter. This environment variable -# tells PythonCall to use the same Python interpreter as PyCall. See -# https://github.com/JuliaPy/PythonCall.jl/blob/5f56a9b96b867a9f6742ab1d1e2361abd844e19f/docs/src/pycall.md#tips -ENV["JULIA_PYTHONCALL_EXE"] = "@PyCall" - using DifferentialEquations, PythonCall @testset "Use of DifferentialEquations through PythonCall with user code written in Python" begin From aba9806d9184d71ad69c1e98bcbbe96d62d4351b Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Fri, 14 Feb 2025 08:15:07 -0800 Subject: [PATCH 06/11] Update Project.toml --- test/python/Project.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/python/Project.toml b/test/python/Project.toml index 121f414718..1097d98286 100644 --- a/test/python/Project.toml +++ b/test/python/Project.toml @@ -1,13 +1,11 @@ [deps] DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" -PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" [compat] DifferentialEquations = "7.11" OrdinaryDiffEq = "6.33" -PyCall = "1.96" PythonCall = "0.9.14" SciMLBase = "2" From aceb0721c882f6c45f05908754321fe19aebad33 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Fri, 14 Feb 2025 15:09:36 -0800 Subject: [PATCH 07/11] Update pythoncall.jl --- test/python/pythoncall.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/python/pythoncall.jl b/test/python/pythoncall.jl index 298be0958a..bd6d7b853d 100644 --- a/test/python/pythoncall.jl +++ b/test/python/pythoncall.jl @@ -1,5 +1,12 @@ using DifferentialEquations, PythonCall +py""" # This is a mess because normal site-packages is not writeable in CI +import subprocess, sys, site +subprocess.run([sys.executable, '-m', 'pip', 'install', '--user', 'julia']) +subprocess.run([sys.executable, '-m', 'pip', 'install', '--user', 'diffeqpy']) +sys.path.append(site.getusersitepackages()) +""" + @testset "Use of DifferentialEquations through PythonCall with user code written in Python" begin pyexec(""" from juliacall import Main From a3509379adbdb360213ab8c217a45827b6d39469 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Fri, 14 Feb 2025 15:15:34 -0800 Subject: [PATCH 08/11] Update test/python/pythoncall.jl --- test/python/pythoncall.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/python/pythoncall.jl b/test/python/pythoncall.jl index bd6d7b853d..bc0505fe52 100644 --- a/test/python/pythoncall.jl +++ b/test/python/pythoncall.jl @@ -1,11 +1,11 @@ using DifferentialEquations, PythonCall -py""" # This is a mess because normal site-packages is not writeable in CI +pyexec(""" # This is a mess because normal site-packages is not writeable in CI import subprocess, sys, site subprocess.run([sys.executable, '-m', 'pip', 'install', '--user', 'julia']) subprocess.run([sys.executable, '-m', 'pip', 'install', '--user', 'diffeqpy']) sys.path.append(site.getusersitepackages()) -""" +""") @testset "Use of DifferentialEquations through PythonCall with user code written in Python" begin pyexec(""" From bd16eb2c14f37830a771d6586383e1f8e4a587fa Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 15 Feb 2025 08:09:37 -0800 Subject: [PATCH 09/11] Update test/python/pythoncall.jl --- test/python/pythoncall.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/python/pythoncall.jl b/test/python/pythoncall.jl index bc0505fe52..29d1052c44 100644 --- a/test/python/pythoncall.jl +++ b/test/python/pythoncall.jl @@ -5,7 +5,7 @@ import subprocess, sys, site subprocess.run([sys.executable, '-m', 'pip', 'install', '--user', 'julia']) subprocess.run([sys.executable, '-m', 'pip', 'install', '--user', 'diffeqpy']) sys.path.append(site.getusersitepackages()) -""") +""", , @__MODULE__) @testset "Use of DifferentialEquations through PythonCall with user code written in Python" begin pyexec(""" From c5b7d9e89b35971a306cdd139ef5a1d30e32496e Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 15 Feb 2025 14:38:48 -0800 Subject: [PATCH 10/11] Update test/python/pythoncall.jl --- test/python/pythoncall.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/python/pythoncall.jl b/test/python/pythoncall.jl index 29d1052c44..ef4743e5fb 100644 --- a/test/python/pythoncall.jl +++ b/test/python/pythoncall.jl @@ -5,7 +5,7 @@ import subprocess, sys, site subprocess.run([sys.executable, '-m', 'pip', 'install', '--user', 'julia']) subprocess.run([sys.executable, '-m', 'pip', 'install', '--user', 'diffeqpy']) sys.path.append(site.getusersitepackages()) -""", , @__MODULE__) +""", @__MODULE__) @testset "Use of DifferentialEquations through PythonCall with user code written in Python" begin pyexec(""" From 856a97cacba1952cd2f58b0bb0c6b7e6eb0188da Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 15 Feb 2025 15:45:30 -0800 Subject: [PATCH 11/11] Update test/python/pythoncall.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- test/python/pythoncall.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/python/pythoncall.jl b/test/python/pythoncall.jl index ef4743e5fb..27693dd011 100644 --- a/test/python/pythoncall.jl +++ b/test/python/pythoncall.jl @@ -1,6 +1,7 @@ using DifferentialEquations, PythonCall -pyexec(""" # This is a mess because normal site-packages is not writeable in CI +pyexec( + """ # This is a mess because normal site-packages is not writeable in CI import subprocess, sys, site subprocess.run([sys.executable, '-m', 'pip', 'install', '--user', 'julia']) subprocess.run([sys.executable, '-m', 'pip', 'install', '--user', 'diffeqpy'])