Skip to content
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

Deprecation notice has a confusing warning message #530

Closed
jdhoffa opened this issue Jan 23, 2024 · 3 comments · Fixed by #532
Closed

Deprecation notice has a confusing warning message #530

jdhoffa opened this issue Jan 23, 2024 · 3 comments · Fixed by #532

Comments

@jdhoffa
Copy link
Member

jdhoffa commented Jan 23, 2024

In particular, calling r2dii.plot::plot_emission_intensity(data) prior to calling r2dii.plot::plot_emission_intensity() doesn't really make sense?

See reprex:

library(r2dii.plot)

plot_emission_intensity(sda)
#> Warning: The `data` argument of `plot_emission_intensity()` must be prepped already as
#> of r2dii.plot 0.4.0.
#> ℹ From the next release you will need to call
#>   `r2dii.plot::plot_emission_intensity(data)` prior to calling
#>   `r2dii.plot::plot_emission_intensity()`.
#> ℹ Alternatively custom data preparation will also become possible.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated.

Created on 2024-01-23 with reprex v2.0.2

@MonikaFu
Copy link
Collaborator

you're right, it should be
ℹ From the next release you will need to call
r2dii.plot::prep_emission_intensity(data) prior to calling
r2dii.plot::plot_emission_intensity()

However, I would be happy to discuss if we want to introduce this change or not. Back then with Mauro we thought it would be a more intuitive interface. Happy to re-evaluate and either introduce the change or get rid of the message (even though it is probably not the best practice to promise something and then not do it.

@jdhoffa
Copy link
Member Author

jdhoffa commented Jan 23, 2024

If the design choice is desirable is another topic, but we should first make sure the warning message dictates what we expect it to. :-)

@MonikaFu
Copy link
Collaborator

Agreed. But it is still remaining question :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants