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

Don’t hard-code repo name in circle-stuff. #333

Merged
merged 12 commits into from
Oct 21, 2015
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
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ machine:

environment:

PLOTLY_PACKAGE_ROOT: /home/ubuntu/python-api
PLOTLY_PACKAGE_ROOT: /home/ubuntu/${CIRCLE_PROJECT_REPONAME}
PLOTLY_CONFIG_DIR: ${HOME}/.plotly
PLOTLY_PYTHON_VERSIONS: 2.7.8 3.3.3 3.4.1
PLOTLY_CORE_REQUIREMENTS_FILE: ${PLOTLY_PACKAGE_ROOT}/requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion circle/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ for version in ${PLOTLY_PYTHON_VERSIONS[@]}; do
error_exit "${SIG} ${LINENO}: can't import plotly package"

echo "${SIG} Running tests for Python ${version} as user '$(whoami)'."
nosetests -x plotly/tests ||
nosetests -x -a '!matplotlib' plotly/tests ||
error_exit "${SIG} ${LINENO}: test suite failed for Python ${version}"

done
4 changes: 2 additions & 2 deletions optional-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
numpy

## matplotlylib dependencies ##
matplotlib==1.3.1
# matplotlib==1.3.1

## testing dependencies ##
nose==1.3.3

## ipython dependencies ##
ipython[all]
ipython[all]==3.0.0

## pandas deps for some matplotlib functionality ##
pandas
Expand Down
4 changes: 2 additions & 2 deletions plotly/graph_reference/default-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4737,7 +4737,7 @@
"valType": "color"
},
"outliercolor": {
"description": "Sets the border line color of the outlier sample points.",
"description": "Sets the border line color of the outlier sample points. Defaults to marker.color",
"role": "style",
"valType": "color"
},
Expand Down Expand Up @@ -4769,7 +4769,7 @@
},
"outliercolor": {
"description": "Sets the color of the outlier sample points.",
"dflt": "rgba(0,0,0,0)",
"dflt": "rgba(0, 0, 0, 0)",
"role": "style",
"valType": "color"
},
Expand Down
34 changes: 26 additions & 8 deletions plotly/matplotlylib/mplexporter/tests/test_basic.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
from ..exporter import Exporter
from ..renderers import FakeRenderer, FullFakeRenderer
# TODO: matplotlib-build-wip
from nose.plugins.attrib import attr
from plotly.tools import _matplotlylib_imported

import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
if _matplotlylib_imported:
from ..exporter import Exporter
from ..renderers import FakeRenderer, FullFakeRenderer

import numpy as np
from numpy.testing import assert_warns
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt

import numpy as np
from numpy.testing import assert_warns


@attr('matplotlib')
def fake_renderer_output(fig, Renderer):
renderer = Renderer()
exporter = Exporter(renderer)
exporter.run(fig)
return renderer.output


@attr('matplotlib')
def _assert_output_equal(text1, text2):
for line1, line2 in zip(text1.strip().split(), text2.strip().split()):
assert line1 == line2


@attr('matplotlib')
def test_lines():
fig, ax = plt.subplots()
ax.plot(range(20), '-k')
Expand All @@ -44,6 +52,7 @@ def test_lines():
""")


@attr('matplotlib')
def test_markers():
fig, ax = plt.subplots()
ax.plot(range(2), 'ok')
Expand All @@ -68,6 +77,7 @@ def test_markers():
""")


@attr('matplotlib')
def test_path_collection():
fig, ax = plt.subplots()
ax.scatter(range(3), range(3))
Expand All @@ -93,6 +103,7 @@ def test_path_collection():
""")


@attr('matplotlib')
def test_text():
fig, ax = plt.subplots()
ax.set_xlabel("my x label")
Expand All @@ -113,6 +124,7 @@ def test_text():
""")


@attr('matplotlib')
def test_path():
fig, ax = plt.subplots()
ax.add_patch(plt.Circle((0, 0), 1))
Expand All @@ -129,6 +141,7 @@ def test_path():
""")


@attr('matplotlib')
def test_multiaxes():
fig, ax = plt.subplots(2)
ax[0].plot(range(4))
Expand All @@ -147,6 +160,7 @@ def test_multiaxes():
""")


@attr('matplotlib')
def test_image():
np.random.seed(0) # image size depends on the seed
fig, ax = plt.subplots()
Expand All @@ -163,6 +177,7 @@ def test_image():
""")


@attr('matplotlib')
def test_legend():
fig, ax = plt.subplots()
ax.plot([1,2,3], label='label')
Expand All @@ -178,6 +193,8 @@ def test_legend():
closing figure
""")


@attr('matplotlib')
def test_legend_dots():
fig, ax = plt.subplots()
ax.plot([1,2,3], label='label')
Expand All @@ -200,8 +217,9 @@ def test_legend_dots():
closing figure
""")


@attr('matplotlib')
def test_blended():
fig, ax = plt.subplots()
ax.axvline(0)
assert_warns(UserWarning, fake_renderer_output, fig, FakeRenderer)

11 changes: 8 additions & 3 deletions plotly/matplotlylib/mplexporter/tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
from numpy.testing import assert_allclose, assert_equal
import matplotlib.pyplot as plt
from .. import utils
# TODO: matplotlib-build-wip
from nose.plugins.attrib import attr
from plotly.tools import _matplotlylib_imported

if _matplotlylib_imported:
from numpy.testing import assert_allclose, assert_equal
import matplotlib.pyplot as plt
from .. import utils

@attr('matplotlib')
def test_path_data():
circle = plt.Circle((0, 0), 1)
vertices, codes = utils.SVG_path(circle.get_path())
Expand Down
67 changes: 0 additions & 67 deletions plotly/tests/test_core/test_graph_objs/nose_tools.py

This file was deleted.

13 changes: 8 additions & 5 deletions plotly/tests/test_optional/optional_utils.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
from __future__ import absolute_import

import matplotlib
# Force matplotlib to not use any Xwindows backend.
matplotlib.use('Agg')

import numpy as np

from plotly.matplotlylib import Exporter, PlotlyRenderer
from plotly.tests.utils import is_num_list
from plotly.utils import get_by_path, node_generator

# TODO: matplotlib-build-wip
from plotly.tools import _matplotlylib_imported
if _matplotlylib_imported:
import matplotlib
# Force matplotlib to not use any Xwindows backend.
matplotlib.use('Agg')
from plotly.matplotlylib import Exporter, PlotlyRenderer


def run_fig(fig):
renderer = PlotlyRenderer()
Expand Down
21 changes: 14 additions & 7 deletions plotly/tests/test_optional/test_matplotlylib/test_annotations.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
from __future__ import absolute_import

import matplotlib
# Force matplotlib to not use any Xwindows backend.
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from nose.plugins.attrib import attr

from plotly.tests.utils import compare_dict
from plotly.tests.test_optional.optional_utils import run_fig
from plotly.tests.test_optional.test_matplotlylib.data.annotations import *
# TODO: matplotlib-build-wip
from plotly.tools import _matplotlylib_imported

if _matplotlylib_imported:
import matplotlib
# Force matplotlib to not use any Xwindows backend.
matplotlib.use('Agg')
import matplotlib.pyplot as plt

from plotly.tests.utils import compare_dict
from plotly.tests.test_optional.optional_utils import run_fig
from plotly.tests.test_optional.test_matplotlylib.data.annotations import *


@attr('matplotlib')
def test_annotations():
fig, ax = plt.subplots()
ax.plot([1, 2, 3], 'b-')
Expand Down
15 changes: 11 additions & 4 deletions plotly/tests/test_optional/test_matplotlylib/test_axis_scales.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
from __future__ import absolute_import

import matplotlib
# Force matplotlib to not use any Xwindows backend.
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from nose.plugins.attrib import attr

from plotly.tests.utils import compare_dict
from plotly.tests.test_optional.optional_utils import run_fig
from plotly.tests.test_optional.test_matplotlylib.data.axis_scales import *

# TODO: matplotlib-build-wip
from plotly.tools import _matplotlylib_imported

if _matplotlylib_imported:
import matplotlib
# Force matplotlib to not use any Xwindows backend.
matplotlib.use('Agg')
import matplotlib.pyplot as plt


@attr('matplotlib')
def test_even_linear_scale():
fig, ax = plt.subplots()
x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Expand Down
17 changes: 13 additions & 4 deletions plotly/tests/test_optional/test_matplotlylib/test_bars.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
from __future__ import absolute_import

import matplotlib
# Force matplotlib to not use any Xwindows backend.
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from nose.plugins.attrib import attr

from plotly.tests.utils import compare_dict
from plotly.tests.test_optional.optional_utils import run_fig
from plotly.tests.test_optional.test_matplotlylib.data.bars import *

# TODO: matplotlib-build-wip
from plotly.tools import _matplotlylib_imported
if _matplotlylib_imported:
import matplotlib

# Force matplotlib to not use any Xwindows backend.
matplotlib.use('Agg')
import matplotlib.pyplot as plt


@attr('matplotlib')
def test_vertical_bar():
fig, ax = plt.subplots()
ax.bar(left=D['left'], height=D['height'])
Expand All @@ -23,6 +30,7 @@ def test_vertical_bar():
assert equivalent, msg


@attr('matplotlib')
def test_horizontal_bar():
fig, ax = plt.subplots()
ax.barh(bottom=D['bottom'], width=D['width'])
Expand All @@ -36,6 +44,7 @@ def test_horizontal_bar():
assert equivalent, msg


@attr('matplotlib')
def test_h_and_v_bars():
fig, ax = plt.subplots()
ax.bar(left=D['multi_left'], height=D['multi_height'],
Expand Down
Loading