diff --git a/Project.toml b/Project.toml index 65e04d181..d357e4b54 100644 --- a/Project.toml +++ b/Project.toml @@ -35,12 +35,14 @@ ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444" [weakdeps] PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" +RCall = "6f49c342-dc21-5d91-9882-a32aef131414" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [extensions] -PyCallExt = "PyCall" -PythonCallExt = "PythonCall" -ZygoteExt = "Zygote" +SciMLBasePyCallExt = "PyCall" +SciMLBasePythonCallExt = "PythonCall" +SciMLBaseRCallExt = "RCall" +SciMLBaseZygoteExt = "Zygote" [compat] ADTypes = "0.1.3, 0.2" @@ -55,6 +57,7 @@ FunctionWrappersWrappers = "0.1.3" IteratorInterfaceExtensions = "^0.1, ^1" PrecompileTools = "1" Preferences = "1.3" +RCall = "0.13.18" RecipesBase = "0.7.0, 0.8, 1.0" RecursiveArrayTools = "2.33" Reexport = "1" diff --git a/ext/PyCallExt.jl b/ext/SciMLBasePyCallExt.jl similarity index 97% rename from ext/PyCallExt.jl rename to ext/SciMLBasePyCallExt.jl index 258e2bf20..2cc1c714d 100644 --- a/ext/PyCallExt.jl +++ b/ext/SciMLBasePyCallExt.jl @@ -1,4 +1,4 @@ -module PyCallExt +module SciMLBasePyCallExt using PyCall: PyCall, PyObject, PyAny, pyfunctionret, pyimport, hasproperty using SciMLBase: SciMLBase, solve diff --git a/ext/PythonCallExt.jl b/ext/SciMLBasePythonCallExt.jl similarity index 96% rename from ext/PythonCallExt.jl rename to ext/SciMLBasePythonCallExt.jl index e69096017..da7bf262e 100644 --- a/ext/PythonCallExt.jl +++ b/ext/SciMLBasePythonCallExt.jl @@ -1,4 +1,4 @@ -module PythonCallExt +module SciMLBasePythonCallExt using PythonCall: Py, PyList, pyimport, hasproperty, pyconvert, pyisinstance, pybuiltins using SciMLBase: SciMLBase diff --git a/ext/SciMLBaseRCallExt.jl b/ext/SciMLBaseRCallExt.jl new file mode 100644 index 000000000..38a61a7f2 --- /dev/null +++ b/ext/SciMLBaseRCallExt.jl @@ -0,0 +1,11 @@ +module SciMLBaseRCallExt + +using RCall: RFunction +using SciMLBase + +# Always assume a function from R is not in-place because copy-on-write disallows it! +function SciMLBase.isinplace(f::RFunction, args...; kwargs...) + false +end + +end \ No newline at end of file diff --git a/ext/ZygoteExt.jl b/ext/SciMLBaseZygoteExt.jl similarity index 98% rename from ext/ZygoteExt.jl rename to ext/SciMLBaseZygoteExt.jl index 007d56153..59dc35509 100644 --- a/ext/ZygoteExt.jl +++ b/ext/SciMLBaseZygoteExt.jl @@ -1,4 +1,4 @@ -module ZygoteExt +module SciMLBaseZygoteExt using Zygote: pullback using ZygoteRules: @adjoint