Skip to content

Commit

Permalink
update test infrastructure: employ TestItemRunner.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
HoBeZwe committed Nov 3, 2024
1 parent ff62b78 commit dfa3a63
Show file tree
Hide file tree
Showing 13 changed files with 83 additions and 47 deletions.
6 changes: 4 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "NURBS"
uuid = "dde13934-061e-461b-aa91-2c0fad390a0d"
authors = ["Bernd Hofmann <[email protected]> and contributors"]
version = "0.7.0"
version = "0.8.0"

[deps]
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
Expand All @@ -27,12 +27,14 @@ StaticArrays = "1"
Statistics = "1"
Suppressor = "0.2"
UUIDs = "1"
WriteVTK = "1"
julia = "1.8"

[extras]
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a"

[targets]
test = ["Test", "JuliaFormatter", "PlotlyJS"]
test = ["Test", "JuliaFormatter", "PlotlyJS", "TestItemRunner"]
3 changes: 3 additions & 0 deletions test/bases.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

using StaticArrays
using LinearAlgebra

@testset "B-splines + Curry-Scheonberg" begin

@testset "Basis Evaluation" begin
Expand Down
5 changes: 5 additions & 0 deletions test/connectivity/bezierMesh.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

using StaticArrays
using LinearAlgebra
using PlotlyJS
using FileIO

@testset "Bezier mesh" begin

@testset "Sphere" begin
Expand Down
5 changes: 5 additions & 0 deletions test/connectivity/interfaces.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

using StaticArrays
using LinearAlgebra
using PlotlyJS
using FileIO

@testset "Interfaces" begin

@testset "Sphere" begin
Expand Down
3 changes: 3 additions & 0 deletions test/curves_Bspline.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

using StaticArrays
using LinearAlgebra

@testset "B-splines" begin

@testset "Curves Evaluation" begin
Expand Down
3 changes: 3 additions & 0 deletions test/curves_nurbs.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

using StaticArrays
using LinearAlgebra

@testset "NURBS" begin

@testset "Curves Evaluation" begin
Expand Down
3 changes: 3 additions & 0 deletions test/fundamentalOperations/knotInsertion.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

using StaticArrays
using LinearAlgebra

@testset "Knot insertion" begin

@testset "Curves" begin
Expand Down
3 changes: 3 additions & 0 deletions test/fundamentalOperations/knotRemoval.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

using StaticArrays
using LinearAlgebra

@testset "Knot insertion" begin

@testset "Curves" begin
Expand Down
3 changes: 3 additions & 0 deletions test/fundamentalOperations/splitting.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

using StaticArrays
using LinearAlgebra

@testset "Splitting" begin

@testset "Curves" begin
Expand Down
85 changes: 40 additions & 45 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,46 +1,41 @@
using NURBS
using Test

using JuliaFormatter
using StaticArrays
using LinearAlgebra
using PlotlyJS
using FileIO

# --- testsets
@testset verbose = true "Testing NURBS functionality" begin

@testset "Bases" begin
include("bases.jl")
end

@testset "Curves" begin
include("curves_Bspline.jl")
include("curves_nurbs.jl")
end

@testset "Surfaces" begin
include("surfaces_Bspline.jl")
include("surfaces_nurbs.jl")
end

@testset "Fundamental Operations" begin
include("fundamentalOperations/knotInsertion.jl")
include("fundamentalOperations/splitting.jl")
include("fundamentalOperations/knotRemoval.jl")
end

@testset "Utils" begin
include("utils.jl")
end

@testset "Connectivity" begin
include("connectivity/interfaces.jl")
include("connectivity/bezierMesh.jl")
end

@testset "Test formatting of files" begin
pkgpath = pkgdir(NURBS) # path of this package including name
@test format(pkgpath, overwrite=false) # check whether files are formatted according to the .JuliaFormatter.toml
end

using TestItemRunner

@testitem "Bases" begin
include("bases.jl")
end

@testitem "Curves" begin
include("curves_Bspline.jl")
include("curves_nurbs.jl")
end

@testitem "Surfaces" begin
include("surfaces_Bspline.jl")
include("surfaces_nurbs.jl")
end

@testitem "Fundamental Operations" begin
include("fundamentalOperations/knotInsertion.jl")
include("fundamentalOperations/splitting.jl")
include("fundamentalOperations/knotRemoval.jl")
end

@testitem "Utils" begin
include("utils.jl")
end

@testitem "Connectivity" begin
include("connectivity/interfaces.jl")
include("connectivity/bezierMesh.jl")
end

@testitem "Formatting of files" begin
using JuliaFormatter
pkgpath = pkgdir(NURBS) # path of this package including name
@test format(pkgpath, overwrite=false) # check whether files are formatted according to the .JuliaFormatter.toml
end



@run_package_tests verbose = true
3 changes: 3 additions & 0 deletions test/surfaces_Bspline.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

using StaticArrays
using LinearAlgebra

@testset "B-splines" begin

@testset "Surfaces Evaluation" begin
Expand Down
3 changes: 3 additions & 0 deletions test/surfaces_nurbs.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

using StaticArrays
using LinearAlgebra

@testset "NURBS" begin

@testset "Surfaces Evaluation" begin
Expand Down
5 changes: 5 additions & 0 deletions test/utils.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

using StaticArrays
using LinearAlgebra
using PlotlyJS
using FileIO

@testset "Ranges" begin

b = 9
Expand Down

2 comments on commit dfa3a63

@HoBeZwe
Copy link
Owner Author

@HoBeZwe HoBeZwe commented on dfa3a63 Nov 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

  • add export VTK for ParaView

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/118618

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.8.0 -m "<description of version>" dfa3a634dc9ccdd891d636dd45a85884e36feafc
git push origin v0.8.0

Please sign in to comment.