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: Use target env instead of Spyder env when checking dependencies #182

Merged
merged 7 commits into from
Aug 17, 2022

Conversation

jitseniesen
Copy link
Member

When checking dependencies (pytest, nose, and their plugins), either for the Dependencies information dialog or for the plugin configuration dialog, use the target environment instead of the Spyder environment. As a nice side-effect, the user no longer needs to install Qt in the target environment when using the pytest framework; the only dependencies in the target environment now are pytest itself and zeromq (the latter is also a dependency of spyder-kernels so likely to be installed).

Fixes #177

This is to seperate code for the Spyder environment from code for the
target environment. Next I will put them in different directories.
Put all code to be run in the target environment in a separate
directory called workers. This should aid maintainability, but it
also removes the requirement to have Qt installed in the target
environment.
When displaying the dependencies of the plugin, which lists which testing
frameworks are installed and their versions, use the target environment
instead of the Spyder environment to retrieve the dependencies.
The plugin configuration dialog window greys out testing frameworks
which are not available. This commit uses the target environment
instead of the Spyder environment when detecting which frameworks
are available.
These are no longer used after the previous commits.
Store dependency information in a cache when it is retrieved.
Use the cached information when displaying the plugin configuration
dialog, unless user changed the target environment (because the
dependency information depends on the target environment).
If coverage is unavailable, then uncheck the checkbox (it is already
disabled in the current code), so that if the user changes the target
environment and the new environment does not have pytest_cov then
the user does not get a disabled checkbox with no possibility of
unchecking it.
@codecov-commenter
Copy link

Codecov Report

Merging #182 (876962e) into master (7ed1349) will decrease coverage by 0.21%.
The diff coverage is 89.28%.

Impacted Files Coverage Δ
spyder_unittest/backend/noserunner.py 87.03% <ø> (-1.68%) ⬇️
spyder_unittest/backend/runnerbase.py 100.00% <ø> (ø)
spyder_unittest/backend/unittestrunner.py 93.33% <ø> (-0.26%) ⬇️
spyder_unittest/backend/zmqreader.py 100.00% <ø> (ø)
spyder_unittest/backend/workers/pytestworker.py 92.40% <50.00%> (ø)
spyder_unittest/backend/workers/print_versions.py 83.33% <83.33%> (ø)
spyder_unittest/widgets/configdialog.py 92.00% <91.66%> (+0.33%) ⬆️
spyder_unittest/widgets/unittestgui.py 85.04% <91.66%> (+0.78%) ⬆️
spyder_unittest/backend/pytestrunner.py 95.23% <100.00%> (-0.42%) ⬇️
spyder_unittest/backend/workers/__init__.py 100.00% <100.00%> (ø)
... and 1 more

@jitseniesen jitseniesen merged commit 94126d8 into spyder-ide:master Aug 17, 2022
@jitseniesen jitseniesen deleted the target-env branch August 17, 2022 11:59
@stevetracvc stevetracvc mentioned this pull request Aug 22, 2022
@jitseniesen jitseniesen added this to the v0.5.1 milestone Sep 3, 2022
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.

Check target environment instead of Spyder environment for dependencies
2 participants