You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 3 modules inside ArviZ are already quite independent, it would be good to divide them into smaller packages, and in the process clean up the dependency handling.
Create an arviz-data, inferencedata or arviz-converters package. It should contain only the InferenceData base library (or maybe we could use the opportunity to change to DataTree Track DataTree progress #2015) and package the converters, maybe iterators like the ones on sel utils? and little more. The main pro for this library would be to keep it minimal to make it as easy as possible for other libraries to depend on this. i.e. both netcdf and zarr should be optional but not required dependencies. It would need to depend on xarray (therefore also numpy and pandas) but not even scipy would be needed, much less matplotlib.
Create an arviz-stats, arviz-diagnostics or arviz-compute package with the stats module and general utilities (i.e. the labeller classes are used mostly in plots but also in summary, so it would go here). It would depend on the library above plus scipy and xarray-einstats, probably nothing else
Create an arviz-plots. Depends on the two above and has the plots module, both matplotlib and bokeh would be optional.
Things for consideration:
I think keeping an arviz library even if it is only a metalibrary that installs and imports the ones above would be much more friendly to the average user, not sure about the dependencies though, should that library continue to depend on netcdf and matplotlib as defaults for example?
Useful references:
I used https://github.com/astrojuanlu/cookiecutter-pylib as template from which to generate xarray-einstats. It made the whole process quite easy and fast. I basically only had to set up codecov, remove mypy and change flake for pylint. It set up all the building infrastructure, testing locally and CI with github actions, readthedocs, black, isort, pydocstyle. It could be useful for this.
For the datastructures package what do you think about adopting the protobuf-generated datastructures? (e.g. meta.proto → meta.py)
This would formalize a PPL-agnostic specification of the metadata structures that will end up in storage structures such as InferenceData.
And you could generate the Julia code or even C++ code for Stan.
Library with base ArviZ functionality that is common between plots, stats and converters. i.e. converters themselves, xarray_to_sel_iter and similars, labellers, var_names filtering utilities, rcparams. I would try using DataTree instead of InferenceData to see if we can reduce the codebase.
Library with "plug and play" plotting functions similar to existing ones as well as lower level building blocks to ease creation of custom plots when combined with xrtist.
The 3 modules inside ArviZ are already quite independent, it would be good to divide them into smaller packages, and in the process clean up the dependency handling.
arviz-data
,inferencedata
orarviz-converters
package. It should contain only the InferenceData base library (or maybe we could use the opportunity to change to DataTree Track DataTree progress #2015) and package the converters, maybe iterators like the ones on sel utils? and little more. The main pro for this library would be to keep it minimal to make it as easy as possible for other libraries to depend on this. i.e. both netcdf and zarr should be optional but not required dependencies. It would need to depend on xarray (therefore also numpy and pandas) but not even scipy would be needed, much less matplotlib.arviz-stats
,arviz-diagnostics
orarviz-compute
package with thestats
module and general utilities (i.e. the labeller classes are used mostly in plots but also in summary, so it would go here). It would depend on the library above plus scipy and xarray-einstats, probably nothing elsearviz-plots
. Depends on the two above and has the plots module, both matplotlib and bokeh would be optional.Things for consideration:
arviz
library even if it is only a metalibrary that installs and imports the ones above would be much more friendly to the average user, not sure about the dependencies though, should that library continue to depend on netcdf and matplotlib as defaults for example?Useful references:
Extra notes:
The text was updated successfully, but these errors were encountered: