-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from invenia/npr/renaming
Rename accessors and fieldnames to give clearer and more consistent API
- Loading branch information
Showing
5 changed files
with
146 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# v1 deprecations, to be removed in v2 | ||
|
||
@deprecate get_lodf(system::System) get_lodfs(system) | ||
|
||
@deprecate get_regmin(system::System) get_regulation_min(system) | ||
@deprecate get_regmax(system::System) get_regulation_max(system) | ||
|
||
@deprecate get_load(system::System) get_loads(system) | ||
|
||
@deprecate get_regulation(system::System) get_regulation_offers(system) | ||
@deprecate get_spinning(system::System) get_spinning_offers(system) | ||
@deprecate get_supplemental_on(system::System) get_on_supplemental_offers(system) | ||
@deprecate get_supplemental_off(system::System) get_off_supplemental_offers(system) | ||
|
||
@deprecate get_psds_per_bus(system::System) get_psls_per_bus(system) | ||
|
||
export get_bids | ||
function get_bids(system::SystemDA, type_of_bid::Symbol) | ||
if type_of_bid === :increment | ||
Base.depwarn("`get_bids(system, :increment)` is deprecated, use `get_increments(system)` instead.", :get_bids) | ||
return get_increments(system) | ||
elseif type_of_bid === :decrement | ||
Base.depwarn("`get_bids(system, :decrement)` is deprecated, use `get_decrements(system)` instead.", :get_bids) | ||
return get_decrements(system) | ||
elseif type_of_bid === :price_sensitive_demand | ||
Base.depwarn("`get_bids(system, :price_sensitive_demand)` is deprecated, use `get_price_sensitive_loads(system)` instead.", :get_bids) | ||
return get_price_sensitive_loads(system) | ||
else | ||
Base.depwarn("`get_bids` is deprecated, use `get_increments` or `get_decrements` or `get_price_sensitive_loads`.", :get_bids) | ||
return getproperty(system, type_of_bid) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
caf14c5
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.
@JuliaRegistrator register
caf14c5
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.
Registration pull request updated: JuliaRegistries/General/64688
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: