Skip to content

CircleCI 2.0 migration #1109

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 30 commits into from
Aug 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a1019ff
Initial cut at simple circle 2.0 config for 2.7 and 3.5 core tests
jonmmease Aug 13, 2018
5f56b4d
Use docker image with python and node (Node needed for packaging)
jonmmease Aug 13, 2018
568e2ef
Removed empty job
jonmmease Aug 13, 2018
6040869
Move tests that interact with plot.ly to the tests/plot_ly directory
jonmmease Aug 13, 2018
0d035f7
Fix package import due to move
jonmmease Aug 14, 2018
c52b76a
Do npm install to setup jupyter tests
jonmmease Aug 14, 2018
5c4e15c
Add empty __init__.py to new test_plot_ly package
jonmmease Aug 14, 2018
6b3ac10
Move jupyter test directory setup from .tox to .circle/config.yml
jonmmease Aug 14, 2018
bdfecf5
CD in same command as npm install
jonmmease Aug 14, 2018
813b972
fix npm command
jonmmease Aug 14, 2018
79a24ed
Remove npm from tox.ini
jonmmease Aug 14, 2018
62a110a
Remove tests for Python 3.3. It's past EOL
jonmmease Aug 14, 2018
3db3b58
Remove npm from tox.ini
jonmmease Aug 14, 2018
0b0dc4f
Fill out test matrix
jonmmease Aug 14, 2018
25ea3d6
Fix YAML typo
jonmmease Aug 14, 2018
b8fb4b4
Fix tox typo
jonmmease Aug 14, 2018
9e77c16
Missing double quote
jonmmease Aug 14, 2018
4a76df0
plot_ly tests don't need to run core.
jonmmease Aug 14, 2018
45e42fe
Update shapely dependency to version 1.6.4 for Python 3.7 compatibility
jonmmease Aug 14, 2018
221612f
Added pytest validator tests
jonmmease Aug 14, 2018
be01cf6
Only run validator tests for optional configuration
jonmmease Aug 14, 2018
3cba342
shapely==1.6.4.post2 should have Python 3.7 support
jonmmease Aug 14, 2018
047a525
Fix validator tests for Python 2.7
jonmmease Aug 14, 2018
a89a9af
Disable optional tests for Python 3.7 due to shapely incompatibility
jonmmease Aug 15, 2018
7a8a88b
Add tox caching for 2.7-core
jonmmease Aug 15, 2018
05fc89b
Add tox caching for 3.6-optional
jonmmease Aug 15, 2018
498d9fc
Revert "Add tox caching for 3.6-optional"
jonmmease Aug 15, 2018
0e4668a
Caching .tox doesn't improve build performance very much, disable
jonmmease Aug 15, 2018
1df1100
Add longer no_output_timeout for tox and npm commands
jonmmease Aug 15, 2018
92b49d3
Remove old circle 1.0 file
jonmmease Aug 15, 2018
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
252 changes: 252 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
version: 2

jobs:
# Core
"python-2.7-core":
docker:
- image: circleci/python:2.7-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_27: python2.7

steps:
- checkout
- run:
name: Install tox
command: 'sudo pip install tox'
- run:
name: Test with tox
command: 'tox -e py27-core'
no_output_timeout: 20m

"python-3.4-core":
docker:
- image: circleci/python:3.4-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_34: python3.4

steps:
- checkout
- run:
name: Install tox
command: 'sudo pip install tox'
- run:
name: Test with tox
command: 'tox -e py34-core'
no_output_timeout: 20m

"python-3.5-core":
docker:
- image: circleci/python:3.5-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_35: python3.5

steps:
- checkout
- run:
name: Install tox
command: 'sudo pip install tox'
- run:
name: Test with tox
command: 'tox -e py35-core'
no_output_timeout: 20m

"python-3.6-core":
docker:
- image: circleci/python:3.6-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_36: python3.6

steps:
- checkout
- run:
name: Install tox
command: 'sudo pip install tox'
- run:
name: Test with tox
command: 'tox -e py36-core'
no_output_timeout: 20m

"python-3.7-core":
docker:
- image: circleci/python:3.7-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_37: python3.7

steps:
- checkout
- run:
name: Install tox
command: 'sudo pip install tox'
- run:
name: Test with tox
command: 'tox -e py37-core'
no_output_timeout: 20m

# Optional
"python-2.7-optional":
docker:
- image: circleci/python:2.7-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_27: python2.7

steps:
- checkout
- run:
name: Install tox
command: 'sudo pip install tox'
- run:
name: Install npm dependencies
command: cd plotly/tests/test_optional/test_jupyter && npm install
no_output_timeout: 20m
- run:
name: Test with tox
command: 'tox -e py27-optional'
no_output_timeout: 20m

"python-3.4-optional":
docker:
- image: circleci/python:3.4-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_34: python3.4

steps:
- checkout
- run:
name: Install tox
command: 'sudo pip install tox'
- run:
name: Install npm dependencies
command: cd plotly/tests/test_optional/test_jupyter && npm install
no_output_timeout: 20m
- run:
name: Test with tox
command: 'tox -e py34-optional'
no_output_timeout: 20m

"python-3.5-optional":
docker:
- image: circleci/python:3.5-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_35: python3.5

steps:
- checkout
- run:
name: Install tox
command: 'sudo pip install tox'
- run:
name: Install npm dependencies
command: cd plotly/tests/test_optional/test_jupyter && npm install
no_output_timeout: 20m
- run:
name: Test with tox
command: 'tox -e py35-optional'
no_output_timeout: 20m

"python-3.6-optional":
docker:
- image: circleci/python:3.6-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_36: python3.6

steps:
- checkout
- run:
name: Install tox
command: 'sudo pip install tox'
- run:
name: Install npm dependencies
command: cd plotly/tests/test_optional/test_jupyter && npm install
no_output_timeout: 20m
- run:
name: Test with tox
command: 'tox -e py36-optional'
no_output_timeout: 20m

"python-3.7-optional":
docker:
- image: circleci/python:3.7-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_37: python3.7

steps:
- checkout
- run:
name: Install tox
command: 'sudo pip install tox'
- run:
name: Install npm dependencies
command: cd plotly/tests/test_optional/test_jupyter && npm install
no_output_timeout: 20m
- run:
name: Test with tox
command: 'tox -e py37-optional'
no_output_timeout: 20m

# Plot.ly
"python-2.7-plot_ly":
docker:
- image: circleci/python:2.7-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_27: python2.7

steps:
- checkout
- run:
name: Install tox
command: 'sudo pip install tox'
- run:
name: Test with tox
command: 'tox -e py27-plot_ly'
no_output_timeout: 20m

"python-3.4-plot_ly":
docker:
- image: circleci/python:3.4-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_34: python3.4

steps:
- checkout
- run:
name: Install tox
command: 'sudo pip install tox'
- run:
name: Test with tox
command: 'tox -e py34-plot_ly'
no_output_timeout: 20m

"python-3.7-plot_ly":
docker:
- image: circleci/python:3.7-stretch-node-browsers
environment:
PLOTLY_TOX_PYTHON_37: python3.7

steps:
- checkout
- run:
name: Install tox
command: 'sudo pip install tox'
- run:
name: Test with tox
command: 'tox -e py37-plot_ly'
no_output_timeout: 20m

workflows:
version: 2
build:
jobs:
- "python-2.7-core"
- "python-3.4-core"
- "python-3.5-core"
- "python-3.6-core"
- "python-3.7-core"
- "python-2.7-optional"
- "python-3.4-optional"
- "python-3.5-optional"
- "python-3.6-optional"
# 3.7 optional disabled due to current shapely incompatibility
# - "python-3.7-optional"
- "python-2.7-plot_ly"
- "python-3.4-plot_ly"
- "python-3.7-plot_ly"
3 changes: 2 additions & 1 deletion _plotly_utils/tests/validators/test_angle_validator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest
#from ..basevalidators import AngleValidator
from _plotly_utils.basevalidators import AngleValidator
import numpy as np

Expand Down Expand Up @@ -33,7 +34,7 @@ def test_coercion(val, expected, validator):
# ### Test rejection ###
@pytest.mark.parametrize('val',
['hello', (), [], [1, 2, 3], set(), '34'])
def test_rejection(val, validator: AngleValidator):
def test_rejection(val, validator):
with pytest.raises(ValueError) as validation_failure:
validator.validate_coerce(val)

Expand Down
4 changes: 2 additions & 2 deletions _plotly_utils/tests/validators/test_any_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def validator_aok():
@pytest.mark.parametrize('val', [
set(), 'Hello', 123, np.inf, np.nan, {}
])
def test_acceptance(val, validator: AnyValidator):
def test_acceptance(val, validator):
assert validator.validate_coerce(val) is val


Expand All @@ -36,7 +36,7 @@ def test_acceptance(val, validator: AnyValidator):
['Hello', 'World'],
[np.pi, np.e, {}]
])
def test_acceptance_array(val, validator_aok: AnyValidator):
def test_acceptance_array(val, validator_aok):
coerce_val = validator_aok.validate_coerce(val)
if isinstance(val, np.ndarray):
assert isinstance(coerce_val, np.ndarray)
Expand Down
14 changes: 7 additions & 7 deletions _plotly_utils/tests/validators/test_basetraces_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def validator():

# Tests
# -----
def test_acceptance(validator: BaseDataValidator):
def test_acceptance(validator):
val = [Scatter(mode='lines'), Box(fillcolor='yellow')]
res = validator.validate_coerce(val)
res_present = validator.present(res)
Expand All @@ -36,7 +36,7 @@ def test_acceptance(validator: BaseDataValidator):
assert res_present[0].uid != res_present[1].uid


def test_acceptance_dict(validator: BaseDataValidator):
def test_acceptance_dict(validator):
val = (dict(type='scatter', mode='lines'),
dict(type='box', fillcolor='yellow'))
res = validator.validate_coerce(val)
Expand All @@ -56,7 +56,7 @@ def test_acceptance_dict(validator: BaseDataValidator):
assert res_present[0].uid != res_present[1].uid


def test_default_is_scatter(validator: BaseDataValidator):
def test_default_is_scatter(validator):
val = [dict(mode='lines')]
res = validator.validate_coerce(val)
res_present = validator.present(res)
Expand All @@ -68,7 +68,7 @@ def test_default_is_scatter(validator: BaseDataValidator):
assert res_present[0].mode == 'lines'


def test_rejection_type(validator: BaseDataValidator):
def test_rejection_type(validator):
val = 37

with pytest.raises(ValueError) as validation_failure:
Expand All @@ -77,7 +77,7 @@ def test_rejection_type(validator: BaseDataValidator):
assert "Invalid value" in str(validation_failure.value)


def test_rejection_element_type(validator: BaseDataValidator):
def test_rejection_element_type(validator):
val = [42]

with pytest.raises(ValueError) as validation_failure:
Expand All @@ -86,7 +86,7 @@ def test_rejection_element_type(validator: BaseDataValidator):
assert "Invalid element(s)" in str(validation_failure.value)


def test_rejection_element_attr(validator: BaseDataValidator):
def test_rejection_element_attr(validator):
val = [dict(type='scatter', bogus=99)]

with pytest.raises(ValueError) as validation_failure:
Expand All @@ -97,7 +97,7 @@ def test_rejection_element_attr(validator: BaseDataValidator):
str(validation_failure.value))


def test_rejection_element_tracetype(validator: BaseDataValidator):
def test_rejection_element_tracetype(validator):
val = [dict(type='bogus', a=4)]

with pytest.raises(ValueError) as validation_failure:
Expand Down
Loading