You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...
File "/home/local/jmminkin/git/Annif/annif/cli.py", line 322, in run_index
results = project.suggest_corpus(documents, backend_params).filter(limit, threshold)
File "/home/local/jmminkin/git/Annif/annif/project.py", line 238, in suggest_corpus
return annif.suggestion.SuggestionResults(suggestions)
AttributeError: module 'annif' has no attribute 'suggestion'
But this was not detected by tests for index command. Seems that some commands that are tested before import annif.suggestion, and this import remains for index command.
The tests should probably be some way more isolated to be able to detected this kind of possibility for bugs.
The text was updated successfully, but these errors were encountered:
I think that could be a consequence of running the CLI tests via CliRunner. It simulates a CLI execution environment, but isn't quite the same as running the commands separately from a real CLI. If we wanted to test that, we'd need something like a shell script (or possibly even a bats test suite) that runs the annif commands separately.
When working on PR #708, I accidentally removed this inline import:
Annif/annif/project.py
Line 205 in fb51292
This made
annif index
command fail:But this was not detected by tests for
index
command. Seems that some commands that are tested before importannif.suggestion
, and this import remains forindex
command.The tests should probably be some way more isolated to be able to detected this kind of possibility for bugs.
The text was updated successfully, but these errors were encountered: