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

pytest plugin does not load with dash >= 2.9.0 #123

Open
1 task done
rymndhng opened this issue May 1, 2023 · 6 comments
Open
1 task done

pytest plugin does not load with dash >= 2.9.0 #123

rymndhng opened this issue May 1, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@rymndhng
Copy link

rymndhng commented May 1, 2023

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

Since dash 2.9.0, the pytest plugin does not load unless the dependency "dash_testing_stub" is installed. This change breaks tests that rely on the plugin. See plotly/dash#2417

Upstream recommends installing pip install dash[testing] to get the tests to pass (similar to issue #100)

I believe we can restore the previous behaviour in a straightforward way by installing dash_testing_stub.

Installed packages

n/a

Environment info

n/a
@rymndhng rymndhng added the bug Something isn't working label May 1, 2023
@moorepants
Copy link
Contributor

I'm not sure what you are suggesting. dash does not seem to depend on dash_testing_stub but if you want to run Dash's test suite it may be needed. We run some minor tests in this recipe but those did not fail on the 2.9.3 builds. So what is actually the issue?

@rymndhng
Copy link
Author

rymndhng commented May 1, 2023

Correct, this error only shows up if a user of this feedstock uses this package uses testing (i.e. for e2e testing dash apps).

The testing module import without errors, however, if a test uses any of the symbols, the pytest plugin raises an exception when dash_testing_stub is not installed. See https://github.com/plotly/dash/pull/2417/files#diff-103dd9b465768e0bec146c9ea9b04b9e762d9a6e2532c18e3ec4887a987e8d13.

@moorepants
Copy link
Contributor

One option is to add the testing dependencies to the run_constrained section. Users would have to manually install those dependencies, but if they do the version pins would be enforced for a compatible set.

@moorepants
Copy link
Contributor

moorepants commented May 1, 2023

The only other option is to create a new output, e.g. dash-testing which has the dependencies that match those in the testing requirements file. Then a user would do conda install dash-testing to get that set of dependencies and dash.

@rymndhng
Copy link
Author

rymndhng commented May 1, 2023

Even if we package out dash-testing, the package dash-testing-stub does not exist in conda.

I think the solution is to create a feedstock for dash-testing-stub (or add a second output for building the package dash-testing-stub).

@moorepants
Copy link
Contributor

I think the solution is to create a feedstock for dash-testing-stub (or add a second output for building the package dash-testing-stub).

Yes, any dependencies must have a conda feedstock, so that is the first step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants