sfu-db / dataprep

Open-source low code data preparation library in python. Collect, clean and visualization your data in python with a few lines of code.
http://dataprep.ai
MIT License
2.05k stars 206 forks source link

Add test for imdt compute #780

Closed jinglinpeng closed 2 years ago

jinglinpeng commented 2 years ago

Background

For plot, plot_correlation and plot_missing, each function contains the compute part and render part. The function that computes intermediate for plot, plot_correlation and plot_missing are compute, compute_correlation and compute_missing, respectively.

Task

Currently we have tests for plot, plot_correlation and plot_missing. Although their tests cover part code of the corresponding compute function, the compute function + config case is not tested. Hence, we need to add some test cases for compute, compute_correlation and compute_missing with customized configuration. You could add it in this file: https://github.com/sfu-db/dataprep/blob/develop/dataprep/tests/eda/test_config.py

For the config, you can refer to the corresponding plot function. For example, for compute we can add the following test case:

compute(simpledf, cfg={"hist.bins": hist_bins, "hist.yscale": "log"})