Skip to content

Commit

Permalink
Use latest version of JuliaFormatter (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
efaulhaber authored Nov 12, 2024
1 parent 5edd046 commit bc64b76
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
#
# julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version = "0.13.0"))'
run: |
julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.45"))'
julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.62"))'
julia -e 'using JuliaFormatter; format(".")'
- name: Format check
run: |
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/plot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function plot_benchmarks(benchmark, n_points_per_dimension, iterations;
neighborhood_searches = [
TrivialNeighborhoodSearch{NDIMS}(; search_radius, eachpoint = 1:n_particles),
GridNeighborhoodSearch{NDIMS}(; search_radius, n_points = n_particles),
PrecomputedNeighborhoodSearch{NDIMS}(; search_radius, n_points = n_particles),
PrecomputedNeighborhoodSearch{NDIMS}(; search_radius, n_points = n_particles)
]

for i in eachindex(neighborhood_searches)
Expand Down
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ makedocs(modules = [PointNeighbors],
"Home" => "index.md",
"API reference" => "reference.md",
"Authors" => "authors.md",
"License" => "license.md",
"License" => "license.md"
])

deploydocs(;
Expand Down
20 changes: 10 additions & 10 deletions test/neighborhood_search.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
names = [
"Simple Example 2D",
"Box Not Multiple of Search Radius 2D",
"Simple Example 3D",
"Simple Example 3D"
]

coordinates = [
Expand All @@ -20,15 +20,15 @@
-0.12 -0.05 -0.09 0.15 0.42],
[-0.08 0.0 0.18 0.1 -0.08
-0.12 -0.05 -0.09 0.15 0.39
0.14 0.34 0.12 0.06 0.13],
0.14 0.34 0.12 0.06 0.13]
]

periodic_boxes = [
PeriodicBox(min_corner = [-0.1, -0.2], max_corner = [0.2, 0.4]),
# The `GridNeighborhoodSearch` is forced to round up the cell sizes in this test
# to avoid split cells.
PeriodicBox(min_corner = [-0.1, -0.2], max_corner = [0.205, 0.43]),
PeriodicBox(min_corner = [-0.1, -0.2, 0.05], max_corner = [0.2, 0.4, 0.35]),
PeriodicBox(min_corner = [-0.1, -0.2, 0.05], max_corner = [0.2, 0.4, 0.35])
]

@testset verbose=true "$(names[i])" for i in eachindex(names)
Expand Down Expand Up @@ -58,15 +58,15 @@
search_radius,
backend = Vector{Vector{Int32}})),
PrecomputedNeighborhoodSearch{NDIMS}(; search_radius, n_points,
periodic_box = periodic_boxes[i]),
periodic_box = periodic_boxes[i])
]

names = [
"`TrivialNeighborhoodSearch`",
"`GridNeighborhoodSearch`",
"`GridNeighborhoodSearch` with `FullGridCellList` with `DynamicVectorOfVectors`",
"`GridNeighborhoodSearch` with `FullGridCellList` with `Vector{Vector}`",
"`PrecomputedNeighborhoodSearch`",
"`PrecomputedNeighborhoodSearch`"
]

# Also test copied templates
Expand All @@ -80,7 +80,7 @@
cell_list = FullGridCellList(min_corner = periodic_boxes[i].min_corner,
max_corner = periodic_boxes[i].max_corner,
backend = Vector{Vector{Int32}})),
PrecomputedNeighborhoodSearch{NDIMS}(periodic_box = periodic_boxes[i]),
PrecomputedNeighborhoodSearch{NDIMS}(periodic_box = periodic_boxes[i])
]
copied_nhs = copy_neighborhood_search.(template_nhs, search_radius, n_points)
append!(neighborhood_searches, copied_nhs)
Expand Down Expand Up @@ -119,7 +119,7 @@
(10, 11),
(100, 90),
(9, 10, 7),
(39, 40, 41),
(39, 40, 41)
]

seeds = [1, 2]
Expand Down Expand Up @@ -175,7 +175,7 @@
max_corner,
search_radius,
backend = Vector{Vector{Int}})),
PrecomputedNeighborhoodSearch{NDIMS}(; search_radius, n_points),
PrecomputedNeighborhoodSearch{NDIMS}(; search_radius, n_points)
]

names = [
Expand All @@ -184,7 +184,7 @@
"`GridNeighborhoodSearch` with `FullGridCellList` with `DynamicVectorOfVectors` and `ParallelUpdate`",
"`GridNeighborhoodSearch` with `FullGridCellList` with `DynamicVectorOfVectors` and `SemiParallelUpdate`",
"`GridNeighborhoodSearch` with `FullGridCellList` with `Vector{Vector}`",
"`PrecomputedNeighborhoodSearch`",
"`PrecomputedNeighborhoodSearch`"
]

# Also test copied templates
Expand All @@ -199,7 +199,7 @@
GridNeighborhoodSearch{NDIMS}(cell_list = FullGridCellList(; min_corner,
max_corner,
backend = Vector{Vector{Int32}})),
PrecomputedNeighborhoodSearch{NDIMS}(),
PrecomputedNeighborhoodSearch{NDIMS}()
]
copied_nhs = copy_neighborhood_search.(template_nhs, search_radius, n_points)
append!(neighborhood_searches, copied_nhs)
Expand Down
10 changes: 5 additions & 5 deletions test/nhs_grid.jl
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
names = [
"Simple Example 2D",
"Box Not Multiple of Search Radius 2D",
"Simple Example 3D",
"Simple Example 3D"
]

coordinates = [
Expand All @@ -208,15 +208,15 @@
-0.12 -0.05 -0.09 0.15 0.42],
[-0.08 0.0 0.18 0.1 -0.08
-0.12 -0.05 -0.09 0.15 0.39
0.14 0.34 0.12 0.06 0.13],
0.14 0.34 0.12 0.06 0.13]
]

periodic_boxes = [
PeriodicBox(min_corner = [-0.1, -0.2], max_corner = [0.2, 0.4]),
# The `GridNeighborhoodSearch` is forced to round up the cell sizes in this test
# to avoid split cells.
PeriodicBox(min_corner = [-0.1, -0.2], max_corner = [0.205, 0.43]),
PeriodicBox(min_corner = [-0.1, -0.2, 0.05], max_corner = [0.2, 0.4, 0.35]),
PeriodicBox(min_corner = [-0.1, -0.2, 0.05], max_corner = [0.2, 0.4, 0.35])
]

@testset verbose=true "$(names[i])" for i in eachindex(names)
Expand Down Expand Up @@ -255,11 +255,11 @@
nhs = GridNeighborhoodSearch{2}(search_radius = 1.0, n_points = size(coords, 2),
periodic_box = PeriodicBox(min_corner = [
-1.5,
0.0,
0.0
],
max_corner = [
2.5,
3.0,
3.0
]))

initialize_grid!(nhs, coords)
Expand Down

0 comments on commit bc64b76

Please sign in to comment.