Skip to content

Commit

Permalink
Rename the extension packages and do RCall as well
Browse files Browse the repository at this point in the history
Fixes the name of the extensions so they don't clash elsewhere. Also adds an RCall one which is basic and assumes out of place, which is a fine assumption given that R is copy-on-write and thus mutation of the form of an in-place function is just not possible. This means that we don't get the great error messages, but oh well we can figure that out later.

Fixes SciML/diffeqr#41

Better version requires JuliaInterop/RCall.jl#503
  • Loading branch information
ChrisRackauckas committed Oct 7, 2023
1 parent a8b39e9 commit e69a1ac
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
9 changes: 6 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion ext/PyCallExt.jl → ext/SciMLBasePyCallExt.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module PyCallExt
module SciMLBasePyCallExt

using PyCall: PyCall, PyObject, PyAny, pyfunctionret, pyimport, hasproperty
using SciMLBase: SciMLBase, solve
Expand Down
2 changes: 1 addition & 1 deletion ext/PythonCallExt.jl → ext/SciMLBasePythonCallExt.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module PythonCallExt
module SciMLBasePythonCallExt

using PythonCall: Py, PyList, pyimport, hasproperty, pyconvert, pyisinstance, pybuiltins
using SciMLBase: SciMLBase
Expand Down
11 changes: 11 additions & 0 deletions ext/SciMLBaseRCallExt.jl
Original file line number Diff line number Diff line change
@@ -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

Check warning on line 8 in ext/SciMLBaseRCallExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/SciMLBaseRCallExt.jl#L7-L8

Added lines #L7 - L8 were not covered by tests
end

end
2 changes: 1 addition & 1 deletion ext/ZygoteExt.jl → ext/SciMLBaseZygoteExt.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module ZygoteExt
module SciMLBaseZygoteExt

using Zygote: pullback
using ZygoteRules: @adjoint
Expand Down

0 comments on commit e69a1ac

Please sign in to comment.