Skip to content

Commit

Permalink
Merge pull request #115 from Herb-AI/test/remove-subpackage-tests
Browse files Browse the repository at this point in the history
Remove subpackage tests
  • Loading branch information
ReubenJ authored Nov 14, 2024
2 parents 5fb8256 + e99b121 commit 0e61730
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 57 deletions.
8 changes: 0 additions & 8 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ HerbGrammar = "4ef9e186-2fe5-4b24-8de7-9f7291f24af7"
HerbInterpret = "5bbddadd-02c5-4713-84b8-97364418cca7"
HerbSearch = "3008d8e8-f9aa-438a-92ed-26e9c7b4829f"
HerbSpecification = "6d54aada-062f-46d8-85cf-a1ceaf058a06"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[compat]
HerbConstraints = "^0.2.0"
Expand All @@ -20,10 +19,3 @@ HerbInterpret = "^0.1.2"
HerbSearch = "^0.3.0"
HerbSpecification = "^0.1.0"
julia = "^1.8"

[extras]
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
9 changes: 9 additions & 0 deletions docs/build_notebooks.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using PlutoStaticHTML

function build(tutorials_dir)
@info "Building notebooks in $tutorials_dir"
use_distributed = false
output_format = documenter_output
bopts = BuildOptions(tutorials_dir; use_distributed, output_format)
build_notebooks(bopts)
end
31 changes: 8 additions & 23 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,34 +1,19 @@
using Documenter:
HTML,
deploydocs,
makedocs

using PlutoStaticHTML
using Pkg: Pkg

using Documenter: HTML, deploydocs, makedocs
using Herb

using HerbConstraints
using HerbSearch
using HerbCore
using HerbGrammar
using HerbInterpret
using HerbCore
using HerbSearch
using HerbSpecification
using Pkg
using PlutoStaticHTML
include(joinpath(@__DIR__, "..", "docs", "build_notebooks.jl"))

tutorials_dir = joinpath(dirname(@__DIR__), "docs", "src", "tutorials")

function build()
println("Building notebooks in $tutorials_dir")
use_distributed = false
output_format = documenter_output
bopts = BuildOptions(tutorials_dir; use_distributed, output_format)
build_notebooks(bopts)
Pkg.activate(@__DIR__)
return nothing
end

build()

Pkg.activate(@__DIR__)
build(tutorials_dir)

makedocs(
modules=[HerbConstraints, HerbSearch, HerbGrammar, HerbSpecification, HerbInterpret, HerbCore],
Expand Down
12 changes: 12 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Herb = "c09c6b7f-4f63-49de-90d9-97a3563c0f4a"
HerbConstraints = "1fa96474-3206-4513-b4fa-23913f296dfc"
HerbCore = "2b23ba43-8213-43cb-b5ea-38c12b45bd45"
HerbGrammar = "4ef9e186-2fe5-4b24-8de7-9f7291f24af7"
HerbInterpret = "5bbddadd-02c5-4713-84b8-97364418cca7"
HerbSearch = "3008d8e8-f9aa-438a-92ed-26e9c7b4829f"
HerbSpecification = "6d54aada-062f-46d8-85cf-a1ceaf058a06"
PlutoStaticHTML = "359b1769-a58e-495b-9770-312e911026ad"
PlutoUI = "7f904dfe-b85e-4ff6-b463-dae2292396a8"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
39 changes: 13 additions & 26 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,29 +1,16 @@
module HerbTest

using HerbConstraints
using HerbCore
using HerbInterpret
using HerbGrammar
using HerbSearch
using HerbSpecification

using Aqua
using Herb
using Test
using Pkg
include(joinpath(@__DIR__, "..", "docs", "build_notebooks.jl"))

@testset verbose=false "Herb" begin
@test 1==1 # dummy test
println("\n--- HerbConstraints tests ---")
Pkg.test("HerbConstraints")
println("\n--- HerbCore tests ---")
Pkg.test("HerbCore")
println("\n--- HerbInterpret tests ---")
Pkg.test("HerbInterpret")
println("\n--- HerbGrammar tests ---")
Pkg.test("HerbGrammar")
println("\n--- HerbSearch tests ---")
Pkg.test("HerbSearch")
println("\n--- HerbSpecification tests ---")
Pkg.test("HerbSpecification")
end
@testset "Herb" begin
@testset "Aqua.jl" begin
Aqua.test_all(Herb)
end

end # module
@testset "Build notebooks" begin
tutorials_dir = joinpath(dirname(@__DIR__), "docs", "src", "tutorials")
# Smoke test to make sure building the notebooks doesn't error
@test build(tutorials_dir) isa Any
end
end

0 comments on commit 0e61730

Please sign in to comment.