commit: 1786ca33c2789be46034e20841b1916a2ed2b1e2 Author: Tomas Fabrizio Orsi <torsi <AT> fi <DOT> uba <DOT> ar> AuthorDate: Tue May 16 04:11:08 2023 +0000 Commit: Tomas Fabrizio Orsi <torsi <AT> fi <DOT> uba <DOT> ar> CommitDate: Tue May 16 04:14:29 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1786ca33
dev-python/dtreeviz: Added test suite Bug: https://bugs.gentoo.org/NNNNNN Signed-off-by: Tomas Fabrizio Orsi <torsi <AT> fi.uba.ar> dev-python/dtreeviz/dtreeviz-2.2.1.ebuild | 35 ++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/dev-python/dtreeviz/dtreeviz-2.2.1.ebuild b/dev-python/dtreeviz/dtreeviz-2.2.1.ebuild index 797574875..4c8501171 100644 --- a/dev-python/dtreeviz/dtreeviz-2.2.1.ebuild +++ b/dev-python/dtreeviz/dtreeviz-2.2.1.ebuild @@ -16,6 +16,8 @@ SRC_URI="https://github.com/parrt/dtreeviz/archive/refs/tags/${PV}.tar.gz -> ${P LICENSE="MIT" SLOT="0" KEYWORDS="~amd64" +# IUSE="test xgboost pyspark lightgbm" +IUSE="test xgboost" RDEPEND=" >=dev-python/graphviz-0.9 @@ -24,9 +26,36 @@ RDEPEND=" sci-libs/scikit-learn dev-python/matplotlib dev-python/colour - dev-python/pytest + xgboost? ( dev-python/xgboost ) " +# xgboost: available at the science overlay: https://github.com/gentoo/sci - Tested +# pyspark: available at the spark overlay: https://github.com/6-6-6/spark-overlay - Not tested +# lightgbm: available at the pypi-sci overlay: https://github.com/jiegec/gentoo-pypi-sci - Not tested -src_install() { - distutils-r1_src_install +DEPEND="test? ( dev-python/pytest )" + +TEST_DIR="testing/testlib/models" + +python_prepare_all() { + # FIXME + if ! use xgboost; then + rm $TEST_DIR/test_decision_trees_xgb_classifier.py || die + rm $TEST_DIR/test_decision_tree_xgb_regressor.py || die + fi + + # if ! use pyspark; then + rm $TEST_DIR/test_decision_tree_spark_classifier.py || die + # fi + + # if ! use lightgbm; then + rm $TEST_DIR/test_decision_tree_lightgbm_classifier.py || die + # fi + + #TODO: tensorflow_decision_forests ebuild + rm $TEST_DIR/test_decision_tree_tensorflow_classifier.py || die + + + distutils-r1_python_prepare_all } + +distutils_enable_tests pytest
