Describe the bug
GreedyEncoder.get_test_params is defined as a regular instance method, but its parent class (BaseTransform, which inherits from skbase.base.BaseEstimator ) defines it as a classmethod. This means class-level calls ,which the test framework relies on, raise a TypeError for GreedyEncoder.
To Reproduce
from pyaptamer.trafos.base import BaseTransform
from pyaptamer.trafos.encode import GreedyEncoder
BaseTransform.get_test_params() # works, returns {}
GreedyEncoder.get_test_params() # TypeError: missing 1 required positional argument: 'self'
The class-level call works for every other transformer that inherits the parent's classmethod, but breaks specifically for GreedyEncoder because it overrides the method without @classmethod.
Expected behavior
GreedyEncoder.get_test_params() should be callable on the class itself (without instantiating first) and return the list of parameter dicts. This matches skbase convention.
Both parameter sets returned should also be valid for instantiation:
params = GreedyEncoder.get_test_params()
for p in params:
GreedyEncoder(**p) # should not raise
Describe the bug
GreedyEncoder.get_test_paramsis defined as a regular instance method, but its parent class (BaseTransform, which inherits fromskbase.base.BaseEstimator) defines it as aclassmethod. This means class-level calls ,which the test framework relies on, raise a TypeError for GreedyEncoder.To Reproduce
BaseTransform.get_test_params() # works, returns {}
GreedyEncoder.get_test_params() # TypeError: missing 1 required positional argument: 'self'
The class-level call works for every other transformer that inherits the parent's classmethod, but breaks specifically for
GreedyEncoderbecause it overrides the method without@classmethod.Expected behavior
GreedyEncoder.get_test_params()should be callable on the class itself (without instantiating first) and return the list of parameter dicts. This matches skbase convention.Both parameter sets returned should also be valid for instantiation: