diff --git a/.JuliaFormatter.toml b/.JuliaFormatter.toml new file mode 100644 index 000000000..3494a9f18 --- /dev/null +++ b/.JuliaFormatter.toml @@ -0,0 +1,3 @@ +style = "sciml" +format_markdown = true +format_docstrings = true diff --git a/.github/workflows/update.jl b/.github/workflows/update.jl index 154355d6d..224665b85 100644 --- a/.github/workflows/update.jl +++ b/.github/workflows/update.jl @@ -5,21 +5,22 @@ using Git, GitHub, Dates gh_token = ARGS[1] myauth = GitHub.authenticate(gh_token) -(@isdefined myauth) ? @info("Authentication token is found...") : @info("Coudn't find the authentication token") +(@isdefined myauth) ? @info("Authentication token is found...") : +@info("Coudn't find the authentication token") const git = Git.git() date = Dates.format(now(), "yyyy-mm-dd") benchpath = joinpath(@__DIR__, "..", "..", "benchmarks") # Get all the open PRs and their number -gh_prs = GitHub.pull_requests("SciML/SciMLBenchmarks.jl"; auth=myauth) +gh_prs = GitHub.pull_requests("SciML/SciMLBenchmarks.jl"; auth = myauth) prs = Dict{String, Int64}() for i in 1:length(gh_prs[1]) prs[gh_prs[1][i].head.ref] = gh_prs[1][i].number end # Get all the branches from the repo -gh_branches = GitHub.branches("SciML/SciMLBenchmarks.jl"; auth=myauth) +gh_branches = GitHub.branches("SciML/SciMLBenchmarks.jl"; auth = myauth) branches = [gh_branches[1][i].name for i in 1:length(gh_branches[1])] @info("PRs and branches", prs, branches) @@ -50,14 +51,15 @@ for dir in readdir(benchpath) if dir ∉ keys(prs) params = Dict( "title" => "Updated $(dir) for benchmarks", - "head" => "$(dir)", - "base" => "master" + "head" => "$(dir)", + "base" => "master" ) - @info("Creating a pull request from head: ", dir) - GitHub.create_pull_request("SciML/SciMLBenchmarks.jl"; params=params, auth=myauth) + @info("Creating a pull request from head: ", dir) + GitHub.create_pull_request( + "SciML/SciMLBenchmarks.jl"; params = params, auth = myauth) else @info("Updating the pull request numbered: ", prs[dir]) - GitHub.update_pull_request("SciML/SciMLBenchmarks.jl", prs[dir]; auth=myauth) + GitHub.update_pull_request("SciML/SciMLBenchmarks.jl", prs[dir]; auth = myauth) end end end