Skip to content
Merged

Fix #29

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
3 changes: 0 additions & 3 deletions docs/_misc/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

sys.path.append("../../../easychart") # add the easychart path

import re
import json
import easychart

directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), "examples")

Expand Down
6 changes: 2 additions & 4 deletions easychart/extensions/racechart/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,10 @@ def render(self, *, theme=None):
}
)

return IPython.display.HTML(
f"""
return IPython.display.HTML(f"""
<iframe
style="border:0;outline:none;width:{easychart.internals.Size(easychart.config.rendering.container.width)};max-width:{easychart.internals.Size(easychart.config.rendering.container.get("max-width", "100%"))}"
onload='javascript:(function(o){{o.style.height=o.contentWindow.document.body.scrollHeight+"px";}}(this));'
srcdoc="{html.escape(template)}">
</iframe>
"""
)
""")
9 changes: 2 additions & 7 deletions easychart/models/chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

from .series import Series


# rate-limiting throttle
_throttler = internals.Throttler()

Expand Down Expand Up @@ -1266,15 +1265,11 @@ def export(self, filename, *, theme=None, scale=2, throttle=None, **kwargs):
)

if res.status_code == 429:
raise Exception(
textwrap.dedent(
"""
raise Exception(textwrap.dedent("""
The export server responded with HTTP code 429, which means you are making too many export requests in too short a period of time.

Please increase the throttle value, or manually set a time.sleep between each export request.
"""
)
)
"""))

if res.status_code != 200:
raise Exception(
Expand Down
11 changes: 6 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
pytest
pandas
numpy
easytree>=0.2.3
ipython
jinja2
simplejson
numpy
pandas
pytest
pytz
requests
ipython
simplejson
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"Operating System :: OS Independent",
],
install_requires=[
"pytz",
"pandas",
"numpy",
"easytree>=0.2.3",
Expand Down
1 change: 0 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def pytest_addoption(parser):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-1.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-10.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-11.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-12.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-13.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-14.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-15.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-17.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-18.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-19.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-20.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-21.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-22.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-23.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-24.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-25.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-26.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-27.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-28.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-29.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-30.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-31.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-32.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-33.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-34.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-35.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-36.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-37.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-38.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-39.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-40.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-41.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-42.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-43.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-44.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-45.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-46.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-47.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-48.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-49.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-5.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-50.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-51.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-52.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-53.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-54.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-55.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-56.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-57.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-58.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-59.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-6.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-7.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-8.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/regression-tests/tests/chart-9.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest


def regress(regression):
Expand Down
1 change: 0 additions & 1 deletion tests/unit-tests/functions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest
import easychart


Expand Down
1 change: 0 additions & 1 deletion tests/unit-tests/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pytest

import easychart
import easychart.models
Expand Down