Skip to content

Commit

Permalink
Added aqua test, undocumented docstrings test
Browse files Browse the repository at this point in the history
  • Loading branch information
j-fu committed Mar 9, 2024
1 parent 20854c6 commit 42f30d4
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 11 deletions.
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ authors = ["Jürgen Fuhrmann <juergen-fuhrmann@web.de>"]
version = "2.0.0"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
Expand All @@ -24,7 +23,6 @@ ExampleJugglerPlutoSliderServerExt = "PlutoSliderServer"
ExampleJugglerPlutoStaticHTMLExt = "PlutoStaticHTML"

[compat]
AbstractTrees = "0.4.4"
Compat = "4.10"
DocStringExtensions = "0.8,0.9"
Literate = "2"
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![ci](/~https://github.com/j-fu/ExampleJuggler.jl/actions/workflows/ci.yml/badge.svg)](/~https://github.com/j-fu/ExampleJuggler.jl/actions/workflows/ci.yml)
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://j-fu.github.io/ExampleJuggler.jl/stable)
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://j-fu.github.io/ExampleJuggler.jl/dev)
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](/~https://github.com/JuliaTesting/Aqua.jl)

# ExampleJuggler.jl

Expand All @@ -22,7 +23,8 @@ This package helps to hide this boilerplate behind its API.

## CI Tests

With this package, `test/runtests.jl` can look as follows:
With this package, `test/runtests.jl` can look as follows(please see [`test/runtests.jl`](/~https://github.com/j-fu/ExampleJuggler.jl/blob/main/test/runtests.jl) of this
package for a more comprehensive setting):

```julia
using Test
Expand Down Expand Up @@ -72,6 +74,8 @@ notebooks = ["PlutoTemplate.jl"
cleanexamples()

module_examples = @docmodules(example_dir, example_modules, Plotter=CairoMakie)

# This needs to load PlutoStaticHTML
html_examples = @docplutonotebooks(example_dir, notebooks)

makedocs(; sitename = "ExampleJuggler.jl",
Expand All @@ -93,5 +97,5 @@ deploydocs(; repo = "github.com/j-fu/ExampleJuggler.jl.git", devbranch = "main")

end
```
In particular, graphics generation for module examples is supported.
In particular, graphics generation for module and script examples is supported.

12 changes: 6 additions & 6 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
````@eval
using Markdown
Markdown.parse("""
$(read("../../README.md",String))
""")
````
```@docs
ExampleJuggler
```
```@contents
Depth=5
```



5 changes: 5 additions & 0 deletions src/ExampleJuggler.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
"""
ExampleJuggler
$(read(joinpath(@__DIR__,"..","README.md"),String))
"""
module ExampleJuggler
import Literate
import Pkg
Expand Down
2 changes: 2 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
ExampleJuggler = "3bbe58f8-ed81-4c4e-a134-03e85fcf4a1a"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Expand All @@ -10,3 +11,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
CairoMakie = "0.10.12"
Aqua = "0.8"
21 changes: 20 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
using Test
using Test, Aqua
using ExampleJuggler


if isdefined(Docs,:undocumented_names) # >=1.11
@testset "undocumented names" begin
@test isempty(Docs.undocumented_names(ExampleJuggler))
end
end

@testset "Aqua" begin
Aqua.test_ambiguities(ExampleJuggler)
Aqua.test_unbound_args(ExampleJuggler)
Aqua.test_undefined_exports(ExampleJuggler)
Aqua.test_project_extras(ExampleJuggler)
Aqua.test_stale_deps(ExampleJuggler,ignore=[:Requires])
Aqua.test_deps_compat(ExampleJuggler)
Aqua.test_piracies(ExampleJuggler)
Aqua.test_persistent_tasks(ExampleJuggler)
end


ExampleJuggler.verbose!(true)

example_dir = joinpath(@__DIR__, "..", "examples")
Expand Down

0 comments on commit 42f30d4

Please sign in to comment.