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 RunConfig to Plugin with new API #13100

Merged
merged 1 commit into from
Jul 29, 2020

Conversation

goanpeca
Copy link
Member

@goanpeca goanpeca commented Jun 24, 2020

Description of Changes

  • 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 #13099

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: @goanpeca

@pep8speaks
Copy link

pep8speaks commented Jun 24, 2020

Hello @goanpeca! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-07-29 14:58:41 UTC

@goanpeca goanpeca self-assigned this Jun 24, 2020
@goanpeca goanpeca added this to the Sprint June milestone Jun 24, 2020
@goanpeca goanpeca marked this pull request as ready for review June 25, 2020 00:44
@goanpeca
Copy link
Member Author

Hi @dalthviz, this one is ready for QA testing. Thanks!

Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

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

After an initial test, seems like the options are working as expected 👍

@goanpeca
Copy link
Member Author

This is ready for review @ccordoba12

@goanpeca goanpeca requested a review from dalthviz July 28, 2020 17:57
@goanpeca
Copy link
Member Author

@dalthviz and @ccordoba12 this one is ready for review.

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.

@goanpeca, one quick question so I understand things better: why do you think it's important to create a plugin for this config page? Since the plugin API for Run is not used anywhere in this case, it seems unnecessary to me.

Also, it seems you forgot to declare a setuptools entry point for it.

@goanpeca
Copy link
Member Author

goanpeca commented Jul 29, 2020

one quick question so I understand things better: why do you think it's important to create a plugin for this config page? Since the plugin API for Run is not used anywhere in this case, it seems unnecessary to me.

Again the idea of generalizing all these things is to be able to have a single way to handle all the things. All plugins are loaded in the same way no matter what (no if this is a global page do this, or if this is a completion or if this is a third party or if .... etcc you get the idea). This also applies to config pages.

This "run" plugin is a plugin that depends on the Editor AND the Console so that it can do things, so I think having it as a separate plugin (besides simplifying code in preferences/ and in main window) opens the door to handle in a cleaner way how the console interacts with the editor to run stuff. (like the current implicit dependency the ipyconsole shellwidget has on the editor). This is the plugin that should be in charge of all the Run actions (not the editor). Also the core plugin would override the run action (that would be handled by this plugin). All these things will become apparent with the editor migration (which currently hardcodes a lot of behavior and also results in circular dependencies).

That is why all the "global preferences" should become a plugin, to have a single way of handling all plugins and remove code that is doing checks for special cases. After this is made there is no need to handle "global" configs in any different way, they will basically disappear with the whole spyder.preferences module. and the configdialog.py could be moved to the configs folder or the global API directly at spyder.api.preferences.

@ccordoba12
Copy link
Member

Ok, thanks for the clarification.

@ccordoba12 ccordoba12 added this to Release in v5.0alpha1 Jul 29, 2020
@ccordoba12 ccordoba12 merged commit c00d52d into spyder-ide:master Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v5.0alpha1
Release
Development

Successfully merging this pull request may close these issues.

Migrate RunConfig to Plugin with new API
4 participants