Skip to content

Split ArviZ modules into separate packages #2088

Open
@OriolAbril

Description

@OriolAbril

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.

Extra notes:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions