Docs still showcase deprecated methods and new methods switch away from in-place assignment without warning #136
Labels
accepting pull request
Contribute by raising a pull request to resolve this issue!
documentation
Improvements or additions to documentation
This one took a bit to debug! Note that the
climada-petals
documentation uses deprecated methods for setting up e.g. Wildfire as a hazard. They useWildFire.set_hist_fire_FIRMS
, which leads to a deprecation warning asking to useWildFire.get_hist_fire_FIRMS
. There is no note in the docs, docstrings, or warning that expected behavior changes away from in-place assignment.The following from the tutorial (https://climada-petals.readthedocs.io/en/latest/tutorial/climada_hazard_Wildfire.html) works:
You get the following deprecation warning:
Okay, so we check out the
wf_pt.from_hist_fire_FIRMS
docstring and it's quite similar it seems. So we try the following, just changing the method:This leads to the following cryptic error:
I noticed in the code, you are actually returning something for
from_hist_fire_FIRMS
, so let's try with re-assignment of variable:Aha! This works! But note if you try re-assignment with the deprecated method, you get an error since it doesn't return an object:
This leads unsurprisingly to:
I would suggest a few things to help alleviate issues for new users:
get_hist_fire_FIRMS
, I would add a clear note of the changing behaviorThe text was updated successfully, but these errors were encountered: