-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Close multiple simple issues in PSY #1192
Conversation
@@ -13,7 +13,6 @@ The `PowerSystems.jl` package provides a rigorous data model using Julia structu | |||
## Version Advisory | |||
|
|||
- PowerSystems will work with Julia v1.6+. | |||
- If you are planning to use `PowerSystems.jl` in your package, check the [roadmap to version 4.0](https://github.com/NREL-Sienna/PowerSystems.jl/projects/4) for upcoming changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to make the version 5.0
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1192 +/- ##
=======================================
Coverage 84.63% 84.63%
=======================================
Files 180 180
Lines 8264 8264
=======================================
Hits 6994 6994
Misses 1270 1270
Flags with carried forward coverage won't be shown. Click here to find out more.
|
src/parsers/power_models_data.jl
Outdated
@@ -346,9 +345,15 @@ function read_loadzones!( | |||
load_zone_map[zone]["pd"] += get(load, "py", 0.0) | |||
load_zone_map[zone]["qd"] += get(load, "qy", 0.0) | |||
end | |||
|
|||
default_loadzone_naming = x -> string(x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default_loadzone_naming = x -> string(x) | |
default_loadzone_naming = string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
|
||
default_loadzone_naming = x -> string(x) | ||
# The formatter for loadzone_name should be a function that transform the LoadZone Int to a String | ||
_get_name = get(kwargs, :loadzone_name_formatter, default_loadzone_naming) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get unit tests for this?
test/test_parse_psse.jl
Outdated
"psse_Benchmark_4ger_33_2015_sys"; | ||
loadzone_name_formatter = x -> string(3 * x), | ||
) | ||
lz_original = first(get_components(LoadZone, sys2)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you can safely assume that the result of get_components
will be in the same order every time. Maybe get all the LoadZone
names in each, sort those lists, and compare the lists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is only one load zone for that system, that's why I can use first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh okay
test/test_parse_psse.jl
Outdated
"psse_Benchmark_4ger_33_2015_sys"; | ||
loadzone_name_formatter = x -> string(3 * x), | ||
) | ||
lz_original = first(get_components(LoadZone, sys2)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick:
lz_original = first(get_components(LoadZone, sys2)) | |
lz_original = only(get_components(LoadZone, sys2)) |
test/test_parse_psse.jl
Outdated
loadzone_name_formatter = x -> string(3 * x), | ||
) | ||
lz_original = first(get_components(LoadZone, sys2)) | ||
lz_new = first(get_components(LoadZone, sys3)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lz_new = first(get_components(LoadZone, sys3)) | |
lz_new = only(get_components(LoadZone, sys3)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Closes #1175 via 692dfe0
Closes #1165 via 9dd3ef2
Closes #1162 via a62741c
Closes #1147 via 676e777
Closes #1160 via d954dee