-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename adjusted_scenario_demo
output to target_corporate_economy
#470
Comments
Smells like a definite version bump to me. My only question is if it's My inclination is that it's minor, since this is a breaking change (someone needs to rewrite code to get to the same behavior), but we're still not at the |
Definitely I guess my question was more if this warrants following a "deprecation" process, wherein we offer one release on CRAN with a warning about it's future deprecation. Or if we just deprecate it and explain. |
Hmm. this doesn't seem to fit in the @jdhoffa if we were to support a formal change (with time to adjust), is that even possible? That would change the structure of the data.frame (add rows, not just changing contents). One possibility for this type of deprecation is to add an argument (born deprecated 😢 ) that is default false, but cazn be used to restore the old behavior (to not block users until they can update their code) target_sda <- function(
blah,
blah,
blah,
use_old_names = FALSE
) {
if (use_old_names){
deprecate_warn("use_old_names argument is being removed in next release")
} else {
#whatever magic is needed to only show the warning the first time
message("r2dii.analysis 0.4.0 changed the values for emission_factor_metric. Here be dragons, etc")
}
#normal function body
} |
Hmm that seems like an awkward but appropriate solution, given that this code is very much already in the wild. Tangent for future @jdhoffa: What do you think would have been best practice here in terms of design principles?
Asking as a potential design consideration for any future "metric calculating" packages we may wish to create. |
I don't think there were any wrong choices made along the way. Everything seems reasonable so far, and this is just a normal (but weird) deprecation process. I think the weirdness comes in that we're using code to define the contents of a table, rather than letting that live in a data dictionary of some kind (though I don't know of a good way to handle deprecations in those either). |
I am generally on board with this change, although I think it is still not ideal. The new label would not have any reference to which scenario is being used, although the
Now we would get:
... where The consistent, albeit clunky solution would be to use |
maybe it would be easier to just drop the
still not ideal, just throwing out some ideas |
Mainly I para-phrased George in creating this issue as I was doing some spring-cleaning... so I think it best to discuss it with him? I don't have a lot of strong opinions here. |
although my two cents:
|
Do I understand correctly that this change would only affect the demo dataset? Or is it also somehow interwoven in My 2 cents about naming. Why don't we call it
Although this doesn't solve all ambiguity issues I guess.. |
Yes absolutely a breaking change (I tagged the issue as such), and yes absolutely has implications for Regarding the conversation, I think anyone with an opinion here should sit down on a call with George (not urgently, just eventually). I am not particularly picky what the values are, and the flag to change it in the first place came from him, so that will likely be the most efficient way to come to a decision :-) Labeled as "help wanted" until we get input and confirmation from George. |
George expressed (in a call ages ago) a preference to rename the "Adjusted Scenario Demo" output values to "Target Corporate Economy".
Methodologically, I think this sounds reasonable as they serve similar purposes. Curious what @jacobvjk thinks?
Also a question for @AlexAxthelm @MonikaFu , is this technically a breaking change? It affects the contents of
value
column of an output data-frame, but not the actual structure of the data-frame itself.To me, that is still affecting the expected API of the package and should be dealt with cautiously, but curious what your feelings are there?
Supersedes #311
Brief description of the problem
Created on 2024-02-06 with reprex v2.1.0
AB#9904
The text was updated successfully, but these errors were encountered: