Skip to content

Commit

Permalink
whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
claytonpbarrows committed May 25, 2023
1 parent a718da6 commit a9c20e6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
25 changes: 13 additions & 12 deletions scripts/formatter/formatter_code.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,20 @@ main_paths = ["./src", "./test"]
for main_path in main_paths
for (root, dir, files) in walkdir(main_path)
for f in files
@show file_path = abspath(root, f)
!occursin(".jl", f) && continue
format(file_path;
whitespace_ops_in_indices = true,
remove_extra_newlines = true,
verbose = true,
always_for_in = true,
whitespace_typedefs = true,
conditional_to_if = true,
join_lines_based_on_source = true,
separate_kwargs_with_semicolon = true,
@show file_path = abspath(root, f)
!occursin(".jl", f) && continue
format(
file_path;
whitespace_ops_in_indices = true,
remove_extra_newlines = true,
verbose = true,
always_for_in = true,
whitespace_typedefs = true,
conditional_to_if = true,
join_lines_based_on_source = true,
separate_kwargs_with_semicolon = true,

# always_use_return = true. # Disabled since it throws a lot of false positives
# always_use_return = true. # Disabled since it throws a lot of false positives
)
end
end
Expand Down
17 changes: 11 additions & 6 deletions src/plot_network.jl
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,18 @@ function make_graph(sys::PowerSystems.System; kwargs...)
return g
end



function plot_lines!(p, sys, line_width)
components = collect(get_components(Branch, sys))
fr_lat_lon = get_ext.(get_from.(get_arc.(components)))
to_lat_lon = get_ext.(get_to.(get_arc.(components)))
fr_xy = [PSM.lonlat_to_webmercator((PSM.get_longitude(p), PSM.get_latitude(p))) for p in fr_lat_lon]
to_xy = [PSM.lonlat_to_webmercator((PSM.get_longitude(p), PSM.get_latitude(p))) for p in to_lat_lon]
fr_xy = [
PSM.lonlat_to_webmercator((PSM.get_longitude(p), PSM.get_latitude(p))) for
p in fr_lat_lon
]
to_xy = [
PSM.lonlat_to_webmercator((PSM.get_longitude(p), PSM.get_latitude(p))) for
p in to_lat_lon
]

xy = []
groups = []
Expand All @@ -159,11 +163,12 @@ function plot_lines!(p, sys, line_width)

p = plot!(
p,
xy[:,1], xy[:,2];
xy[:, 1],
xy[:, 2];
linewidth = line_width,
hover = labels,
group = groups,
legend = true
legend = true,
)
return p
end
Expand Down

2 comments on commit a9c20e6

@claytonpbarrows
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/84186

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.4 -m "<description of version>" a9c20e6bf172cd291d2c2f620ec84cca07d4c4e8
git push origin v0.1.4

Please sign in to comment.