Closed juhoinkinen closed 12 months ago
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Patch coverage: 100.00
% and project coverage change: -0.01
:warning:
Comparison is base (
320af2b
) 99.67% compared to head (bf5f844
) 99.66%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
I noticed that if a STWFSA project configuration did not set the
limit
paramter, the operations based on suggest functionality (CLI commands suggest, eval, index...) were crashing:The default
limit
parameter was not obtainable fromAnnifBackend.DEFAULT_PARAMETERS
, becauseStwfsaBackend
class defined its ownDEFAULT_PARAMETERS
field (without the limit parameter), but not adefault_params()
method. Other backends having their ownDEFAULT_PARAMETERS
field had that method to include theAnnifBackend.DEFAULT_PARAMETERS
in the parameters.I changed the
AnnifBackend.default_params()
method to include bothDEFAULT_PARAMETERS
fromAnnifBackend
(base) class and from the instances of the concrete backend (derived) classes, like most backends were already doing. This way there is no need to duplicate the method in so many backend classes.In the fasttext backend the
default_params()
method includes alsoDEFAULT_PARAMETERS
frommixins.ChunkingBackend
, so it is needed to be retained to override the newAnnifBackend.default_params()
method.