Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

whitespace around = in kwargs #7

Merged
merged 5 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .JuliaFormatter.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,5 @@ yas_style_nesting = true
# Align struct fields for better readability of large struct definitions
align_struct_field = true

# No whitespaces in kwargs because this is more common in Julia
whitespace_in_kwargs = false

# Allow Dict definitions to be aligned like arrays. See https://github.com/domluna/JuliaFormatter.jl/pull/676
variable_call_indent = ["Dict"]
26 changes: 13 additions & 13 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ end
using TrixiBase

# Define module-wide setups such that the respective modules are available in doctests
DocMeta.setdocmeta!(TrixiBase, :DocTestSetup, :(using TrixiBase); recursive=true)
DocMeta.setdocmeta!(TrixiBase, :DocTestSetup, :(using TrixiBase); recursive = true)

# Copy files to not need to synchronize them manually
function copy_file(filename, replaces...; new_filename=lowercase(filename))
function copy_file(filename, replaces...; new_filename = lowercase(filename))
content = read(joinpath(trixibase_root_dir, filename), String)
content = replace(content, replaces...)

Expand All @@ -29,7 +29,7 @@ function copy_file(filename, replaces...; new_filename=lowercase(filename))
write(joinpath(@__DIR__, "src", new_filename), content)
end

copy_file("README.md", new_filename="index.md")
copy_file("README.md", new_filename = "index.md")
copy_file("AUTHORS.md",
"in the [LICENSE.md](LICENSE.md) file" => "under [License](@ref)")
# Add section `# License` and add `>` in each line to add a quote
Expand All @@ -38,22 +38,22 @@ copy_file("LICENSE.md",
"\n" => "\n> ", r"^" => "# License\n\n> ")

# Make documentation
makedocs(sitename="TrixiBase.jl",
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"),
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=[
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)
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" 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
Loading