Skip to content

remove strong testing dependencies. #808

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

Merged
merged 3 commits into from
Jul 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,24 @@ jobs:
echo $CIRCLE_JOB > circlejob.txt

- restore_cache:
key: v-{{ checksum "circlejob.txt" }}-{{ checksum "requires-ci.txt" }}-{{ checksum "requires-install.txt" }}
key: v-{{ checksum "circlejob.txt" }}-{{ checksum "requires-ci.txt" }}-{{ checksum "requires-install.txt" }}-{{ checksum "requires-testing.txt" }}
- run:
name: 🚧 pip dev requirements
command: |
sudo pip install --upgrade virtualenv
python -m venv venv || virtualenv venv
. venv/bin/activate
pip install -r requires-install.txt -r requires-ci.txt --quiet
pip install -r requires-install.txt -r requires-ci.txt -r requires-testing.txt --quiet
- save_cache:
key: v-{{ checksum "circlejob.txt" }}-{{ checksum "requires-ci.txt" }}-{{ checksum "requires-install.txt" }}
key: v-{{ checksum "circlejob.txt" }}-{{ checksum "requires-ci.txt" }}-{{ checksum "requires-install.txt" }}-{{ checksum "requires-testing.txt" }}
paths:
- "venv"

- run:
name: 🌸 linting
command: |
. venv/bin/activate
pip install -e .[ci] --quiet
pip install -e .[ci,testing] --quiet
pip list | grep dash
flake8 dash setup.py
flake8 --ignore=E123,E126,E501,E722,E731,F401,F841,W503,W504 --exclude=metadata_test.py tests
Expand Down
8 changes: 8 additions & 0 deletions dash/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@

## [Unreleased]

### Changed

- 💥 [#808](https://github.com/plotly/dash/pull/808) Remove strong `dash.testing` dependencies per community feedbacks.
Testing users should do `pip install dash[testing]` afterwards.

## [1.0.0] - 2019-06-20
### Changed
- 💥 [#761](https://github.com/plotly/dash/pull/761) Several breaking changes to the `dash.Dash` API:
Expand Down
21 changes: 10 additions & 11 deletions dash/testing/plugin.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# pylint: disable=missing-docstring,redefined-outer-name
import pytest
import warnings

from selenium import webdriver
try:
import pytest

from dash.testing.application_runners import ThreadedRunner, ProcessRunner
from dash.testing.browser import Browser
from dash.testing.composite import DashComposite
from dash.testing.application_runners import ThreadedRunner, ProcessRunner
from dash.testing.browser import Browser
from dash.testing.composite import DashComposite
except ImportError:
warnings.warn("run `pip install dash[testing]` if you need dash.testing")

WEBDRIVERS = {
"Chrome": webdriver.Chrome,
"Firefox": webdriver.Firefox,
"Remote": webdriver.Remote,
}
WEBDRIVERS = {"Chrome", "Firefox", "Remote"}


def pytest_addoption(parser):
Expand All @@ -21,7 +20,7 @@ def pytest_addoption(parser):

dash.addoption(
"--webdriver",
choices=tuple(WEBDRIVERS.keys()),
choices=tuple(WEBDRIVERS),
default="Chrome",
help="Name of the selenium driver to use",
)
Expand Down
15 changes: 2 additions & 13 deletions requires-install.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
Flask>=0.12
Flask>=1.0.2
flask-compress
plotly
dash_renderer==1.0.0
dash-core-components==1.0.0
dash-html-components==1.0.0
dash-table==4.0.0

# dash.testing
pytest
pytest-sugar
pytest-mock
lxml
selenium
percy
requests[security]
beautifulsoup4
waitress
dash-table==4.0.0
9 changes: 9 additions & 0 deletions requires-testing.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pytest<5.0.0
pytest-sugar
pytest-mock
lxml
selenium
percy
requests[security]
beautifulsoup4
waitress
Copy link
Contributor

@Marc-Andre-Rivet Marc-Andre-Rivet Jul 5, 2019

Choose a reason for hiding this comment

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

Does testing require

dash_flow_example==0.0.5
dash-dangerously-set-inner-html
virtualenv;python_version=="2.7"
mock

if not in the ci environment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

they should go -ci.txt as only our integration tests need them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

let me double check the mock

5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def read_req_file(req_type):
long_description=io.open("README.md", encoding="utf-8").read(),
long_description_content_type="text/markdown",
install_requires=read_req_file("install"),
extras_require={"ci": read_req_file("ci")},
extras_require={
"ci": read_req_file("ci"),
"testing": read_req_file("testing"),
},
entry_points={
"console_scripts": [
"dash-generate-components ="
Expand Down