Skip to content

Commit 373d109

Browse files
authored
Merge pull request #808 from plotly/testing-deps
remove strong testing dependencies.
2 parents 2aca307 + a755e04 commit 373d109

File tree

6 files changed

+37
-29
lines changed

6 files changed

+37
-29
lines changed

.circleci/config.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,24 @@ jobs:
2525
echo $CIRCLE_JOB > circlejob.txt
2626
2727
- restore_cache:
28-
key: v-{{ checksum "circlejob.txt" }}-{{ checksum "requires-ci.txt" }}-{{ checksum "requires-install.txt" }}
28+
key: v-{{ checksum "circlejob.txt" }}-{{ checksum "requires-ci.txt" }}-{{ checksum "requires-install.txt" }}-{{ checksum "requires-testing.txt" }}
2929
- run:
3030
name: 🚧 pip dev requirements
3131
command: |
3232
sudo pip install --upgrade virtualenv
3333
python -m venv venv || virtualenv venv
3434
. venv/bin/activate
35-
pip install -r requires-install.txt -r requires-ci.txt --quiet
35+
pip install -r requires-install.txt -r requires-ci.txt -r requires-testing.txt --quiet
3636
- save_cache:
37-
key: v-{{ checksum "circlejob.txt" }}-{{ checksum "requires-ci.txt" }}-{{ checksum "requires-install.txt" }}
37+
key: v-{{ checksum "circlejob.txt" }}-{{ checksum "requires-ci.txt" }}-{{ checksum "requires-install.txt" }}-{{ checksum "requires-testing.txt" }}
3838
paths:
3939
- "venv"
4040

4141
- run:
4242
name: 🌸 linting
4343
command: |
4444
. venv/bin/activate
45-
pip install -e .[ci] --quiet
45+
pip install -e .[ci,testing] --quiet
4646
pip list | grep dash
4747
flake8 dash setup.py
4848
flake8 --ignore=E123,E126,E501,E722,E731,F401,F841,W503,W504 --exclude=metadata_test.py tests

dash/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2+
## [Unreleased]
3+
4+
### Changed
5+
6+
- 💥 [#808](https://github.com/plotly/dash/pull/808) Remove strong `dash.testing` dependencies per community feedbacks.
7+
Testing users should do `pip install dash[testing]` afterwards.
8+
19
## [1.0.0] - 2019-06-20
210
### Changed
311
- 💥 [#761](https://github.com/plotly/dash/pull/761) Several breaking changes to the `dash.Dash` API:

dash/testing/plugin.py

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
# pylint: disable=missing-docstring,redefined-outer-name
2-
import pytest
2+
import warnings
33

4-
from selenium import webdriver
4+
try:
5+
import pytest
56

6-
from dash.testing.application_runners import ThreadedRunner, ProcessRunner
7-
from dash.testing.browser import Browser
8-
from dash.testing.composite import DashComposite
7+
from dash.testing.application_runners import ThreadedRunner, ProcessRunner
8+
from dash.testing.browser import Browser
9+
from dash.testing.composite import DashComposite
10+
except ImportError:
11+
warnings.warn("run `pip install dash[testing]` if you need dash.testing")
912

10-
WEBDRIVERS = {
11-
"Chrome": webdriver.Chrome,
12-
"Firefox": webdriver.Firefox,
13-
"Remote": webdriver.Remote,
14-
}
13+
WEBDRIVERS = {"Chrome", "Firefox", "Remote"}
1514

1615

1716
def pytest_addoption(parser):
@@ -21,7 +20,7 @@ def pytest_addoption(parser):
2120

2221
dash.addoption(
2322
"--webdriver",
24-
choices=tuple(WEBDRIVERS.keys()),
23+
choices=tuple(WEBDRIVERS),
2524
default="Chrome",
2625
help="Name of the selenium driver to use",
2726
)

requires-install.txt

+2-13
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
1-
Flask>=0.12
1+
Flask>=1.0.2
22
flask-compress
33
plotly
44
dash_renderer==1.0.0
55
dash-core-components==1.0.0
66
dash-html-components==1.0.0
7-
dash-table==4.0.0
8-
9-
# dash.testing
10-
pytest
11-
pytest-sugar
12-
pytest-mock
13-
lxml
14-
selenium
15-
percy
16-
requests[security]
17-
beautifulsoup4
18-
waitress
7+
dash-table==4.0.0

requires-testing.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
pytest<5.0.0
2+
pytest-sugar
3+
pytest-mock
4+
lxml
5+
selenium
6+
percy
7+
requests[security]
8+
beautifulsoup4
9+
waitress

setup.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ def read_req_file(req_type):
2626
long_description=io.open("README.md", encoding="utf-8").read(),
2727
long_description_content_type="text/markdown",
2828
install_requires=read_req_file("install"),
29-
extras_require={"ci": read_req_file("ci")},
29+
extras_require={
30+
"ci": read_req_file("ci"),
31+
"testing": read_req_file("testing"),
32+
},
3033
entry_points={
3134
"console_scripts": [
3235
"dash-generate-components ="

0 commit comments

Comments
 (0)