Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.jl.cov
*.jl.mem
/Manifest.toml
/test/Manifest.toml
/docs/build/
/docs/const
/docs/import
Expand Down
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ LinearAlgebra = "1"
PythonCall = "0.9"
SpecialFunctions = "0.8, 0.9, 0.10, 1.0, 2"
Symbolics = "5"
SymbolicUtils = "1"
SymPyCore = "0.1"
julia = "1.6.1"


[extras]
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Symbolics", "Test"]
test = ["SymbolicUtils", "Symbolics", "Test"]
1 change: 1 addition & 0 deletions src/SymPyPythonCall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ core_src_path = joinpath(pathof(SymPyCore), "../../src/SymPy")
include(joinpath(core_src_path, "sympy.jl"))

include("python_connection.jl")
include("deprecated.jl")


end
31 changes: 31 additions & 0 deletions src/deprecated.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# deprecations
# exported in 1.0.3
# [Symbol("@syms"), :Differential, :E, :Eq, :FALSE, :Ge, :Gt, :IM, :Le, :Lt, :N, :Ne, :PI, :Sym, :SymPyPythonCall, :TRUE, :VectorField, :Wild, :apart, :ask, :cancel, :degree, :doit, :dsolve, :elements, :expand, :expand_trig, :factor, :free_symbols, :hessian, :integrate, :lambdify, :lhs, :limit, :linsolve, :nonlinsolve, :nroots, :nsolve, :oo, :plot_implicit, :plot_parametric_surface, :real_roots, :refine, :rewrite, :rhs, :roots, :series, :simplify, :solve, :solveset, :subs, :summation, :symbols, :sympy, :sympy_plotting, :together, :zoo, :¬, :∧, :∨, :≦, :≧, :≪, :≫, :≶, :≷, :⩵, :𝑄]

Base.@deprecate expand_trig(x) x.expand_trig() true
Base.@deprecate_binding Q 𝑄

function unSym(x)
Base.depwarn("`unSym` is deprecated. Use `↓(x)`.", :unSym)
↓(x)
end

function asSymbolic(x)
Base.depwarn("`asSymbolic` is deprecated. Use `↑(x)`.", :asSymbolic)
↑(x)
end

function VectorField(args...; kwargs...)
Base.depwarn("`VectorField` has been removed", :VectorField)
nothing
end

function plot_implicit(args...; kwargs...)
Base.depwarn("`plot_implicit` has been removed. See `sympy.plotting.plot_implicit`", :VectorField)
nothing
end

function plot_parametric_surface(args...; kwargs...)
Base.depwarn("`VectorField` has been removed. See `sympy.plotting.plot3d_parametric_surface`", :plot_parametric_surface)
nothing
end
4 changes: 4 additions & 0 deletions src/python_connection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ end
# should we also have different code path for a::String like PyCall?
function Base.getproperty(x::SymbolicObject{T}, a::Symbol) where {T <: PythonCall.Py}
a == :o && return getfield(x, a)
if a == :py
Base.depwarn("The field `.py` has been renamed `.o`", :getproperty)
return getfield(x,:o)
end
val = ↓(x)
if hasproperty(val, a)
meth = getproperty(val, a)
Expand Down
5 changes: 0 additions & 5 deletions test/extension-symbolics.jl

This file was deleted.

2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ using SymPyPythonCall
path = joinpath(pathof(SymPyPythonCall.SymPyCore), "../../test")
include(joinpath(path, "runtests-sympycore.jl"))

VERSION >= v"1.9.0" && include("extension-symbolics.jl")
VERSION >= v"1.9.0" && include("test-extensions.jl")
10 changes: 10 additions & 0 deletions test/test-extensions.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using SymPyPythonCall
import Symbolics
using Test


@testset "Symbolics" begin
@syms x
𝑥 = SymPyPythonCall.PythonCall.pyconvert(Symbolics.Num, x)
@test isa(𝑥, Symbolics.Num)
end