Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Originally I started to solve an issue that Corpus.from_file didn't load pickles together with preprocessing, since Corpus was transformed to Table after loading and then back.
It led to the decision to refactor Corpus to use Table's
__new__
class method and to match constructors signatures to Tables. There was no other nice way to fix the first error.Description of changes
Corpus constructor refactoring. All old ways of initializing corpus should still work (the user is warned that it will change in future).
Edit:
After a fix in Orange biolab/orange3#5812 it would even not be necessary to refactor the Corpus, but it is done already (since before this change there was no other way). I suggest that we refactor it anyway since it is implemented already.
This PR needs Orange to be released (it needs biolab/orange3#5812). Tests will not pass before version 3.32 or 3.31.2 is available.
Includes