Open amaloney opened 4 weeks ago
That would be great, thanks! It would also make https://github.com/arviz-devs/arviz-plots/issues/66#issuecomment-2212494391 quite straightforward to implement
Great, I cannot assign myself the ticket. I will if you are okay giving me pull access to the repo. Otherwise I can clone etc...
You should have write permission to this repo as ArviZ core contributor. Probably means I messednup when setting it up. I'll check and fix it later today
Should be fixed now
There is replicated code amongst a couple different plots. As an example, when credible intervals kinds are checked, we duplicate the same code in two different places.
https://github.com/arviz-devs/arviz-plots/blob/a1e32a5dc565ec4ffad317ee106cf9f1f3592bda/src/arviz_plots/plots/forestplot.py#L168-L169
https://github.com/arviz-devs/arviz-plots/blob/a1e32a5dc565ec4ffad317ee106cf9f1f3592bda/src/arviz_plots/plots/distplot.py#L151-L152
I'd like to propose a new module in
plots
calledverify
, where we can add methods like the below example.This way in the plot code we can do the following.
We can extend this to other checks, e.g.
sample_dims
. We could also extend it further and have all "verification" checks for a plotting method wrapped up into a single method likeverify.forestplot_args()
or the equivalent. The goal would be to move theif
statements at the beginning of each of the*plot.py
methods to their own module where we could even add checks forplot_kwargs
orpc_kwargs
if needed in the future.@OriolAbril if this sounds reasonable, you can assign the task to me.