Skip to content

Commit f958d9e

Browse files
authored
Merge pull request #737 from plotly/dev
Dev
2 parents 26ff4f7 + 7fd8787 commit f958d9e

File tree

149 files changed

+67701
-1024
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+67701
-1024
lines changed

Diff for: .circleci/config.yml

+66-20
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,87 @@ jobs:
1212
- checkout
1313

1414
- run:
15-
name: Write deps cache key
16-
command: cat "$REQUIREMENTS_FILE" > reqs.txt
15+
name: ℹ️ CI Context
16+
command: |
17+
echo "TRIGGERER: ${CIRCLE_USERNAME}"
18+
echo "BUILD_NUMBER: ${CIRCLE_BUILD_NUM}"
19+
echo "BUILD_URL: ${CIRCLE_BUILD_URL}"
20+
echo "BRANCH: ${CIRCLE_BRANCH}"
21+
echo "RUNNING JOB: ${CIRCLE_JOB}"
22+
echo "JOB PARALLELISM: ${CIRCLE_NODE_TOTAL}"
23+
echo "CIRCLE_REPOSITORY_URL: ${CIRCLE_REPOSITORY_URL}"
24+
cat "$REQUIREMENTS_FILE" > reqs.txt
25+
echo $CIRCLE_JOB > circlejob.txt
1726
27+
- restore_cache:
28+
key: py-{{ .Branch }}-{{ checksum "circlejob.txt" }}-{{ checksum "reqs.txt" }}-{{ checksum ".circleci/config.yml" }}
1829
- run:
19-
name: Write job name
20-
command: echo $CIRCLE_JOB > circlejob.txt
30+
name: 🚧 pip dev requirements
31+
command: |
32+
sudo pip install --upgrade virtualenv
33+
python -m venv venv || virtualenv venv
34+
. venv/bin/activate
35+
pip install -r $REQUIREMENTS_FILE --quiet
36+
- save_cache:
37+
key: py-{{ .Branch }}-{{ checksum "circlejob.txt" }}-{{ checksum "reqs.txt" }}-{{ checksum ".circleci/config.yml" }}
38+
paths:
39+
- "venv"
2140

2241
- run:
23-
name: Install dependencies
42+
name: 🌸 linting
2443
command: |
25-
sudo pip install virtualenv
26-
virtualenv venv
27-
. venv/bin/activate
28-
pip install -r $REQUIREMENTS_FILE --force-reinstall
44+
. venv/bin/activate
45+
pip install -e . --quiet
46+
pip list | grep dash
47+
flake8 dash setup.py
48+
flake8 --ignore=E123,E126,E501,E722,E731,F401,F841,W503,W504 --exclude=metadata_test.py tests
49+
pylint dash setup.py --rcfile=$PYLINTRC
50+
pylint tests/unit -d all -e C0410,C0411,C0412,C0413,W0109
51+
cd dash-renderer && npm install --ignore-scripts && npm run lint:test && npm run format:test
2952
3053
- run:
31-
name: Install dependencies (dash)
54+
name: ⛑ Run unit tests
55+
command: |
56+
. venv/bin/activate
57+
mkdir test-reports
58+
pytest --junitxml=test-reports/junit.xml tests/unit
59+
- store_test_results:
60+
path: test-reports
61+
- store_artifacts:
62+
path: test-reports
63+
64+
- run:
65+
name: 🚧 build renderer
3266
command: |
33-
git clone [email protected]:plotly/dash-renderer.git
34-
git clone [email protected]:plotly/dash-core-components.git
35-
git clone [email protected]:plotly/dash-html-components.git
36-
git clone [email protected]:plotly/dash-table.git
3767
. venv/bin/activate
68+
cd dash-renderer
69+
npm install --ignore-scripts && npm run build:dev && npm run build
3870
pip install -e . --quiet
39-
cd dash-renderer && npm install --ignore-scripts && npm run build && pip install -e . && cd ..
71+
72+
- run:
73+
name: 🚧 install dependencies from latest master commit
74+
command: |
75+
git clone --depth 1 https://github.com/plotly/dash-core-components.git
76+
git clone --depth 1 https://github.com/plotly/dash-html-components.git
77+
git clone --depth 1 https://github.com/plotly/dash-table.git
78+
git clone --depth 1 https://github.com/plotly/dash-renderer-test-components
79+
. venv/bin/activate
4080
cd dash-core-components && npm install --ignore-scripts && npm run build && pip install -e . && cd ..
4181
cd dash-html-components && npm install --ignore-scripts && npm run build && pip install -e . && cd ..
4282
cd dash-table && npm install --ignore-scripts && npm run build && pip install -e . && cd ..
83+
cd dash-renderer-test-components && npm install --ignore-scripts && npm run build:all && pip install -e . && cd ..
4384
4485
- run:
45-
name: Run tests
86+
name: ⚙️ run integration test
4687
command: |
47-
. venv/bin/activate
48-
python --version
49-
./test.sh
88+
. venv/bin/activate
89+
pytest --junitxml=test-reports/junit_intg.xml tests/integration/
90+
91+
- store_test_results:
92+
path: test-reports
93+
- store_artifacts:
94+
path: test-reports
95+
5096

5197
"python-3.6":
5298
<<: *test-template
@@ -73,4 +119,4 @@ workflows:
73119
jobs:
74120
- "python-2.7"
75121
- "python-3.6"
76-
- "python-3.7"
122+
- "python-3.7"

Diff for: .circleci/requirements/dev-requirements-py37.txt

+6
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,9 @@ requests[security]
1111
flake8
1212
pylint==2.3.1
1313
astroid==2.2.5
14+
lxml
15+
requests
16+
beautifulsoup4
17+
pytest
18+
pytest-sugar
19+
pytest-mock

Diff for: .circleci/requirements/dev-requirements.txt

+6
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@ plotly==3.7.1
1010
requests[security]
1111
flake8
1212
pylint==1.9.4
13+
pytest
14+
pytest-sugar
15+
pytest-mock
16+
lxml
17+
requests
18+
beautifulsoup4

Diff for: .github/CODEOWNERS

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# These owners will be the default owners for everything in
2+
# the repo. Unless a later match takes precedence
3+
* @alexcjohnson @byronz @Marc-Andre-Rivet
4+
5+
tests/* @byronz
6+
7+
*.js @Marc-Andre-Rivet @alexcjohnson
8+
9+
_r_* @rpkyle
10+
11+
*.md @alexcjohnson @chriddyp
12+
13+
*.py @alexcjohnson @byronz
14+
15+
16+

Diff for: .gitignore

+58-14
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,67 @@
1-
*.pyc
21
*.ipynb_notebooks
32
*.ipynb
3+
44
ignore
5-
*~
6-
venv
5+
*.csv
6+
*.log
7+
.DS_Store
8+
9+
# Environments
10+
.env
11+
.venv
12+
env/
13+
venv/
14+
ENV/
15+
env.bak/
16+
venv.bak/
17+
18+
# IDE
19+
.idea/*
20+
.vscode/*
21+
22+
# Byte-compiled / optimized / DLL files
23+
__pycache__/
24+
*.py[cod]
25+
*$py.class
26+
.mypy_cache/
27+
28+
# Unit test / coverage reports
29+
htmlcov/
30+
.tox/
31+
.nox/
32+
.coverage
33+
.coverage.*
34+
.cache
35+
nosetests.xml
36+
coverage.xml
37+
*.cover
38+
.hypothesis/
39+
.pytest_cache/
40+
41+
# Distribution / packaging
42+
.Python
743
build/
44+
develop-eggs/
845
dist/
46+
downloads/
47+
eggs/
48+
.eggs/
949
lib/
50+
lib64/
51+
parts/
52+
sdist/
53+
var/
54+
wheels/
55+
pip-wheel-metadata/
56+
share/python-wheels/
57+
*.egg-info/
58+
.installed.cfg
59+
*.egg
60+
MANIFEST
1061
node_modules/
1162
.npm
12-
vv/
13-
venv/
14-
*.pyc
15-
*.egg-info
16-
*.log
17-
.DS_Store
18-
dist
19-
*egg-info*
2063
npm-debug*
21-
/.tox
22-
.idea
23-
.mypy_cache/
64+
65+
dash_renderer/bundle.js
66+
dash_renderer/bundle.js.map
67+

Diff for: .vscode/settings.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"python.linting.flake8Enabled": false,
3+
"python.linting.enabled": true,
4+
"python.linting.pylintEnabled": true,
5+
"python.pythonPath": "/Users/byron/code/.venv/dev/bin/python"
6+
}

0 commit comments

Comments
 (0)