-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Define an api module #20
Comments
It's not quite clear to me how this will work, so I will wait until you converted at least one other plugin 😉 Should the interface between Spyder and the plugin be part of the Running tests takes a while so the API needs to be asynchronous. The plugin is actually almost language agnostic. The Python specific parts are the definition of the different testing frameworks (py.test, nose, unittest, etc., though only the first one works at the moment) and some special handling of pythonpath. Implementation of coverage is still quite far off. |
Agreed, I am still working on that proposal to get feedback. But the general idea is that all plugins will have an api and that is point of extension. For a basic idea you can look at https://github.com/spyder-ide/spyder/wiki/API-decoupling
Sure, we need to have a runner/worker for this...
The general idea is to define the basic agnostic api and a Manager that will take care of the registration of new languages. I would even say that since this is something of common use, I would make the generic parts part of spyder and only define the specific python ones either in this package, or as part of the spyder_python package (that will by default be part of spyder). So if someone want to create an extension of this plugin for another language they use the api. from spyder.api import unit_test
class SomeOtherLanguage(unit_test.BaseWidget):
def some_common_use_api(self):
pass
api.unit_test.register(R', SomeOtherLanguage) The available languages should come from the spyder API, so that we are sure we give gradual support. |
Another option would be to leave this as a separate package that defines the two submodules
Or something |
My plan was for the widget to be agnostic, and to define a TestRunner class for every test framework (that's what #9 is about):
The plugin would then define subclasses for every unit test framework. That should be quite easy to combine with |
Awesome, yes this is the general idea :-) looks good. Sure we need to register language and test framework... So either the TestRunner defines a class variable with the info, or that is provided upon registry :-) |
The idea for the new api decoupling is that every plugin on spyder (even third party) or at least the one we make, should include an
api
module and define there any public api we want to expose.Since this is a language related plugin, I need to brief you a bit on how I think we can handle that.
But so far we need to have a language agnostic functionality assuming that a unit test suite gives a list of tests (failed, passed, xfailed, xpassed) plus some optional coverage.
The text was updated successfully, but these errors were encountered: