Skip to content

Commit

Permalink
Merge 76b47dd into 051590e
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrodium authored Sep 30, 2023
2 parents 051590e + 76b47dd commit 15dc66b
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 21 deletions.
21 changes: 20 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,34 @@ RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[weakdeps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"

[extensions]
BasicBSplineChainRulesCoreExt = "ChainRulesCore"
BasicBSplineRecipesBaseExt = "RecipesBase"

[compat]
Aqua = "0.7"
ChainRulesCore = "1.15"
IntervalSets = "0.5, 0.6, 0.7"
RecipesBase = "1"
StaticArrays = "1"
julia = "^1.6"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
test = ["Aqua", "ChainRulesCore", "ChainRulesTestUtils", "GeometryBasics", "IntervalSets", "LinearAlgebra", "Plots", "Random", "SparseArrays", "StaticArrays", "Test"]
9 changes: 9 additions & 0 deletions src/_ChainRules.jl → ext/BasicBSplineChainRulesCoreExt.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
module BasicBSplineChainRulesCoreExt

using BasicBSpline
using ChainRulesCore
import BasicBSpline.AbstractFunctionSpace
import BasicBSpline.derivative

const BSPLINESPACE_INFO = """
derivatives of B-spline basis functions with respect to BSplineSpace not implemented currently.
"""
Expand Down Expand Up @@ -81,3 +88,5 @@ function ChainRulesCore.rrule(::typeof(bsplinebasisall), P::AbstractFunctionSpac
end
return (B, bsplinebasis_pullback)
end

end # module
9 changes: 9 additions & 0 deletions src/_PlotRecipes.jl → ext/BasicBSplineRecipesBaseExt.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
module BasicBSplineRecipesBaseExt

using BasicBSpline
using RecipesBase
import BasicBSpline.AbstractFunctionSpace
using StaticArrays

# B-spline space
@recipe function f(P::AbstractFunctionSpace)
# TODO fix number of sampling points
Expand Down Expand Up @@ -98,3 +105,5 @@ end
TODO
* BSplineSolid
=#

end # module
9 changes: 5 additions & 4 deletions src/BasicBSpline.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ using LinearAlgebra
using SparseArrays
using IntervalSets
using StaticArrays
using RecipesBase
using ChainRulesCore

# Types
export AbstractKnotVector, KnotVector, UniformKnotVector, EmptyKnotVector, SubKnotVector
Expand Down Expand Up @@ -51,7 +49,10 @@ include("_ChangeBasis.jl")
include("_BSplineManifold.jl")
include("_RationalBSplineManifold.jl")
include("_Refinement.jl")
include("_ChainRules.jl")
include("_PlotRecipes.jl")

if !isdefined(Base, :get_extension)
include("../ext/BasicBSplineChainRulesCoreExt.jl")
include("../ext/BasicBSplineRecipesBaseExt.jl")
end

end # module
16 changes: 0 additions & 16 deletions test/Project.toml

This file was deleted.

0 comments on commit 15dc66b

Please sign in to comment.