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

scope: Restart kaleido only if properties change #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions repos/kaleido/py/kaleido/scopes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,10 @@ def chromium_args(self):

@chromium_args.setter
def chromium_args(self, val):
self._chromium_args = tuple(val)
self._shutdown_kaleido()
val = tuple(val)
if self._chromium_args != tuple(val):
self._chromium_args = tuple(val)
self._shutdown_kaleido()

def _json_dumps(self, val):
return json.dumps(val)
Expand Down
20 changes: 12 additions & 8 deletions repos/kaleido/py/kaleido/scopes/plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,9 @@ def plotlyjs(self):

@plotlyjs.setter
def plotlyjs(self, val):
self._plotlyjs = val
self._shutdown_kaleido()
if self._plotlyjs != val:
self._plotlyjs = val
self._shutdown_kaleido()

@property
def mathjax(self):
Expand All @@ -196,8 +197,9 @@ def mathjax(self):

@mathjax.setter
def mathjax(self, val):
self._mathjax = val
self._shutdown_kaleido()
if self._mathjax != val:
self._mathjax = val
self._shutdown_kaleido()

@property
def topojson(self):
Expand All @@ -209,8 +211,9 @@ def topojson(self):

@topojson.setter
def topojson(self, val):
self._topojson = val
self._shutdown_kaleido()
if self._topojson != val:
self._topojson = val
self._shutdown_kaleido()

@property
def mapbox_access_token(self):
Expand All @@ -223,5 +226,6 @@ def mapbox_access_token(self):

@mapbox_access_token.setter
def mapbox_access_token(self, val):
self._mapbox_access_token = val
self._shutdown_kaleido()
if self._mapbox_access_token != val:
self._mapbox_access_token = val
self._shutdown_kaleido()