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

PR: Migrate completion plugin to the new API #14314

Merged
merged 97 commits into from
Mar 6, 2021

Conversation

andfoy
Copy link
Member

@andfoy andfoy commented Nov 25, 2020

Description of Changes

This PR migrates the completion plugin (former CompletionManager) to the new API. As part of this PR, we also introduce a CompletionProvider interface, from which all completion providers inherit. The new CompletionPlugin will take all the providers (whom are registered via entrypoints), initialize them and manage them.

  • Wrote at least one-line docstrings (for any new functions)
  • Added unit test(s) covering the changes (if testable)
  • Included a screenshot or animation (if affecting the UI, see Licecap)

Issue(s) Resolved

Fixes #12192

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: @andfoy

@andfoy andfoy added this to the v5.0alpha3 milestone Nov 25, 2020
@andfoy andfoy self-assigned this Nov 25, 2020
@pep8speaks

This comment has been minimized.

@ccordoba12 ccordoba12 modified the milestones: v5.0alpha3, v5.0alpha4 Jan 8, 2021
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Thanks a lot @andfoy for your hard work on this one! I left an initial review for you.

spyder/api/preferences.py Show resolved Hide resolved
spyder/api/preferences.py Outdated Show resolved Hide resolved
spyder/api/preferences.py Outdated Show resolved Hide resolved
spyder/config/manager.py Show resolved Hide resolved
spyder/config/manager.py Show resolved Hide resolved
spyder/plugins/editor/plugin.py Outdated Show resolved Hide resolved
spyder/plugins/editor/widgets/editor.py Outdated Show resolved Hide resolved
spyder/plugins/preferences/api.py Outdated Show resolved Hide resolved
spyder/plugins/pylint/plugin.py Outdated Show resolved Hide resolved
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

@andfoy, this is a new review for you.

spyder/app/mainwindow.py Outdated Show resolved Hide resolved
spyder/app/mainwindow.py Outdated Show resolved Hide resolved
spyder/plugins/completion/api.py Show resolved Hide resolved
spyder/plugins/completion/api.py Outdated Show resolved Hide resolved
spyder/plugins/completion/api.py Outdated Show resolved Hide resolved
spyder/plugins/completion/plugin.py Show resolved Hide resolved
spyder/plugins/completion/plugin.py Show resolved Hide resolved
spyder/plugins/completion/plugin.py Outdated Show resolved Hide resolved
spyder/plugins/completion/api.py Outdated Show resolved Hide resolved
@andfoy andfoy changed the title [WIP] PR: Migrate completion plugin to the new API PR: Migrate completion plugin to the new API Mar 2, 2021
@dalthviz
Copy link
Member

dalthviz commented Mar 5, 2021

Regarding the Kite support I did an initial test but seems like enabling disabling kite is not being properly updated in the status bar:

After unchecking the enable kite config (and after restarting Spyder) I still see the Kite logo and base text in the status bar:
image

Enabling/disabling Kite:

kite

@ccordoba12
Copy link
Member

Hey @dalthviz, thanks for your feedback. I'm going to merge this PR now so we can use the observer pattern one (#14852) to finish the migration of the pending plugins. So please open a new issue about the problems you find with the Kite provider and @andfoy will take care of it in another PR.

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Thanks a lot @andfoy for this!! It's a fantastic improvement!

@ccordoba12 ccordoba12 merged commit 1660c13 into spyder-ide:master Mar 6, 2021
@andfoy andfoy deleted the migrate_completions branch March 6, 2021 17:51
@steff456
Copy link
Member

steff456 commented Mar 6, 2021

In my testing of this PR all the options of the preference pane are working as expected! Thanks @andfoy for this work

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.

Move Completion plugin to use new API
5 participants