Skip to content

[ENH] Make filters available in Orange.data namespace.#3170

Merged
lanzagar merged 1 commit intobiolab:masterfrom
thocevar:filter
Aug 3, 2018
Merged

[ENH] Make filters available in Orange.data namespace.#3170
lanzagar merged 1 commit intobiolab:masterfrom
thocevar:filter

Conversation

@thocevar
Copy link
Contributor

@thocevar thocevar commented Jul 30, 2018

Issue

It would be convenient to access filters in the same way as other classes from the data module.

import Orange
tab = Orange.data.Table("iris")
filter = Orange.data.SameValue("petal length", 5.1)
print(len(filter(tab)))
Description of changes

Import everything from filters in data/__init__.py.

Includes
  • Code changes
  • Tests
  • Documentation

@codecov-io
Copy link

codecov-io commented Jul 30, 2018

Codecov Report

Merging #3170 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3170      +/-   ##
==========================================
+ Coverage   82.54%   82.54%   +<.01%     
==========================================
  Files         337      337              
  Lines       58431    58432       +1     
==========================================
+ Hits        48229    48230       +1     
  Misses      10202    10202

Copy link
Contributor

@lanzagar lanzagar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to import * from filter, you have to add an __all__ declaration there.

@lanzagar lanzagar merged commit 410e45c into biolab:master Aug 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants