Update readthedocs config place

Refactor __call__ method to do nothing as needed by sklearn
This commit is contained in:
2024-08-14 16:37:36 +02:00
parent 941c2ff5e0
commit 517013be09
4 changed files with 5 additions and 5 deletions

View File

@@ -4,7 +4,7 @@ sphinx:
configuration: docs/source/conf.py configuration: docs/source/conf.py
python: python:
version: 3.8 version: 3.11
install: install:
- requirements: requirements.txt - requirements: requirements.txt
- requirements: docs/requirements.txt - requirements: docs/requirements.txt

View File

@@ -174,10 +174,10 @@ class Stree(BaseEstimator, ClassifierMixin):
"""Return the version of the package.""" """Return the version of the package."""
return __version__ return __version__
def __call__(self) -> str: def __call__(self) -> None:
"""Only added to comply with scikit-learn base sestimator for ensembles """Only added to comply with scikit-learn base sestimator for ensembles
""" """
return self.version() pass
def _more_tags(self) -> dict: def _more_tags(self) -> dict:
"""Required by sklearn to supply features of the classifier """Required by sklearn to supply features of the classifier

View File

@@ -1 +1 @@
__version__ = "1.4.0" __version__ = "1.4.1"

View File

@@ -728,7 +728,7 @@ class Stree_test(unittest.TestCase):
def test_call(self) -> None: def test_call(self) -> None:
"""Check call method.""" """Check call method."""
clf = Stree() clf = Stree()
self.assertEqual(__version__, clf()) self.assertIsNone(clf())
def test_graph(self): def test_graph(self):
"""Check graphviz representation of the tree.""" """Check graphviz representation of the tree."""