Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Smart widget suggestions #3112

Merged
merged 15 commits into from
Jul 24, 2018
Merged

Conversation

irgolic
Copy link
Member

@irgolic irgolic commented Jul 3, 2018

Issue

When adding an input or output to a widget, the suggested widgets in the search window follow a default ordering, regardless of which widget is being extended (aside incompatible widgets being filtered out).

Description of changes

Addition of Suggestions singleton class, which tracks which widgets the user most often connects, ordering the widgets presented in the 'quick menu' search tab accordingly.

Includes
  • Code changes
  • Tests
  • Documentation

@CLAassistant
Copy link

CLAassistant commented Jul 3, 2018

CLA assistant check
All committers have signed the CLA.

@irgolic irgolic changed the title [WIPSmart widget suggestions [WIP] Smart widget suggestions Jul 3, 2018
@codecov-io
Copy link

codecov-io commented Jul 23, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@b54398c). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #3112   +/-   ##
=========================================
  Coverage          ?   82.35%           
=========================================
  Files             ?      335           
  Lines             ?    58254           
  Branches          ?        0           
=========================================
  Hits              ?    47975           
  Misses            ?    10279           
  Partials          ?        0

"""
class __Suggestions:
def __init__(self):
self.__frequencies_path = config.data_dir() + "/widget-use-frequency.p"
Copy link
Contributor

Choose a reason for hiding this comment

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

os.path.join

def load_link_frequency(self):
if not os.path.isfile(self.__frequencies_path):
return False
file = open(self.__frequencies_path, "rb")
Copy link
Contributor

Choose a reason for hiding this comment

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

with open(...) as f:
    imported_freq = pickle.load(f)

@irgolic irgolic changed the title [WIP] Smart widget suggestions Smart widget suggestions Jul 23, 2018
@lanzagar lanzagar changed the title Smart widget suggestions [ENH] Smart widget suggestions Jul 24, 2018
@lanzagar lanzagar added this to the 3.15 milestone Jul 24, 2018
@lanzagar lanzagar merged commit 97f5a0c into biolab:master Jul 24, 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.

4 participants