Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
efaulhaber committed Jan 16, 2024
1 parent cd70f2c commit c9714e9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 32 deletions.
41 changes: 19 additions & 22 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ using Documenter
trixibase_root_dir = dirname(@__DIR__)

# Fix for https://github.com/trixi-framework/Trixi.jl/issues/668
if (get(ENV, "CI", nothing) != "true") && (get(ENV, "TRIXIBASE_DOC_DEFAULT_ENVIRONMENT", nothing) != "true")
if (get(ENV, "CI", nothing) != "true") &&
(get(ENV, "TRIXIBASE_DOC_DEFAULT_ENVIRONMENT", nothing) != "true")
push!(LOAD_PATH, trixibase_root_dir)
end

Expand Down Expand Up @@ -36,26 +37,22 @@ copy_file("LICENSE.md",
"\n" => "\n> ", r"^" => "# License\n\n> ")

# Make documentation
makedocs(
sitename="TrixiBase.jl",
# Provide additional formatting options
format = Documenter.HTML(
# Disable pretty URLs during manual testing
prettyurls = get(ENV, "CI", nothing) == "true",
# Set canonical URL to GitHub pages URL
canonical = "https://trixi-framework.github.io/TrixiBase.jl/stable"
),
# Explicitly specify documentation structure
pages = [
"Home" => "index.md",
"API reference" => "reference.md",
"Authors" => "authors.md",
"License" => "license.md"
],
)
makedocs(sitename="TrixiBase.jl",
# Provide additional formatting options
format=Documenter.HTML(
# Disable pretty URLs during manual testing
prettyurls=get(ENV, "CI", nothing) == "true",
# Set canonical URL to GitHub pages URL
canonical="https://trixi-framework.github.io/TrixiBase.jl/stable"),
# Explicitly specify documentation structure
pages=[
"Home" => "index.md",
"API reference" => "reference.md",
"Authors" => "authors.md",
"License" => "license.md",
])

deploydocs(;
repo = "github.com/trixi-framework/TrixiBase.jl",
devbranch = "main",
push_preview = true
)
repo="github.com/trixi-framework/TrixiBase.jl",
devbranch="main",
push_preview=true)
2 changes: 0 additions & 2 deletions src/trixi_include.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ end
walkexpr(f, expr::Expr) = f(Expr(expr.head, (walkexpr(f, arg) for arg in expr.args)...))
walkexpr(f, x) = f(x)



# Replace assignments to `key` in `expr` by `key = val` for all `(key,val)` in `kwargs`.
function replace_assignments(expr; kwargs...)
# replace explicit and keyword assignments
Expand Down
16 changes: 8 additions & 8 deletions test/trixi_include.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
@test @isdefined x
@test x == 4

@test_nowarn trixi_include(@__MODULE__, filename, x = 7)
@test_nowarn trixi_include(@__MODULE__, filename, x=7)
@test x == 7

@test_throws "assignment `y` not found in expression" trixi_include(@__MODULE__,
filename,
y = 3)
y=3)
finally
rm(filename, force = true)
rm(filename, force=true)
end
end

Expand All @@ -48,9 +48,9 @@

@test_throws "no method matching solve(; maxiters::Int64)" trixi_include(@__MODULE__,
filename,
maxiters = 3)
maxiters=3)
finally
rm(filename, force = true)
rm(filename, force=true)
end
end

Expand Down Expand Up @@ -85,12 +85,12 @@
@test x == 10^5

@test_nowarn trixi_include(@__MODULE__, filename2,
maxiters = 7)
maxiters=7)
# Test that `maxiters` got overwritten
@test x == 7
finally
rm(filename1, force = true)
rm(filename2, force = true)
rm(filename1, force=true)
rm(filename2, force=true)
end
end
end

0 comments on commit c9714e9

Please sign in to comment.