Skip to content

Andrew/fix/352 #354

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

Open
wants to merge 3 commits 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
3 changes: 3 additions & 0 deletions src/py/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v1.0.1
- Fix bug where attribute was inconsistently named

v1.0.0
- Add warning if using incompatible Plotly version

Expand Down
8 changes: 4 additions & 4 deletions src/py/kaleido/kaleido.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class Kaleido(choreo.Browser):

async def close(self):
"""Close the browser."""
if self.tmp_dir:
self.tmp_dir.clean()
if self._tmp_dir:
self._tmp_dir.clean()
_logger.info("Cancelling tasks.")
for task in self._main_tasks:
if not task.done():
Expand Down Expand Up @@ -137,8 +137,8 @@ def __init__(self, *args, **kwargs): # noqa: D417 no args/kwargs in description
elif page and hasattr(page, "is_file") and page.is_file():
self._index = page.as_uri()
else:
self.tmp_dir = TmpDirectory(sneak=self.is_isolated())
index = self.tmp_dir.path / "index.html"
self._tmp_dir = TmpDirectory(sneak=self.is_isolated())
index = self._tmp_dir.path / "index.html"
self._index = index.as_uri()
if not page:
page = PageGenerator(plotly=self._plotlyjs, mathjax=self._mathjax)
Expand Down
14 changes: 10 additions & 4 deletions src/py/site/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@


<link rel="icon" href="/plotly/kaleido/assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.5">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.15">



<title>kaleido</title>



<link rel="stylesheet" href="/plotly/kaleido/assets/stylesheets/main.8608ea7d.min.css">
<link rel="stylesheet" href="/plotly/kaleido/assets/stylesheets/main.342714a4.min.css">



Expand Down Expand Up @@ -176,6 +176,7 @@
<a href="/plotly/kaleido/." class="md-nav__link">



<span class="md-ellipsis">
Readme

Expand All @@ -197,6 +198,7 @@
<a href="/plotly/kaleido/examples/" class="md-nav__link">



<span class="md-ellipsis">
Examples

Expand All @@ -218,6 +220,7 @@
<a href="/plotly/kaleido/api/kaleido/" class="md-nav__link">



<span class="md-ellipsis">
User API Reference

Expand All @@ -239,6 +242,7 @@
<a href="/plotly/kaleido/api/kaleido.errors/" class="md-nav__link">



<span class="md-ellipsis">
kaleido.errors

Expand Down Expand Up @@ -313,10 +317,12 @@ <h1>404 - Not found</h1>
</div>


<script id="__config" type="application/json">{"base": "/plotly/kaleido", "features": ["navigation.indexes"], "search": "/plotly/kaleido/assets/javascripts/workers/search.f8cc74c7.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>


<script id="__config" type="application/json">{"base": "/plotly/kaleido", "features": ["navigation.indexes"], "search": "/plotly/kaleido/assets/javascripts/workers/search.d50fe291.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>


<script src="/plotly/kaleido/assets/javascripts/bundle.f1b6f286.min.js"></script>
<script src="/plotly/kaleido/assets/javascripts/bundle.56ea9cef.min.js"></script>


</body>
Expand Down
91 changes: 18 additions & 73 deletions src/py/site/api/kaleido.errors/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@


<link rel="icon" href="../../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.5">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.15">



<title>kaleido.errors - kaleido</title>



<link rel="stylesheet" href="../../assets/stylesheets/main.8608ea7d.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/main.342714a4.min.css">



Expand Down Expand Up @@ -185,6 +185,7 @@
<a href="../.." class="md-nav__link">



<span class="md-ellipsis">
Readme

Expand All @@ -206,6 +207,7 @@
<a href="../../examples/" class="md-nav__link">



<span class="md-ellipsis">
Examples

Expand All @@ -227,6 +229,7 @@
<a href="../kaleido/" class="md-nav__link">



<span class="md-ellipsis">
User API Reference

Expand Down Expand Up @@ -257,6 +260,7 @@
<label class="md-nav__link md-nav__link--active" for="__toc">



<span class="md-ellipsis">
kaleido.errors

Expand All @@ -269,6 +273,7 @@
<a href="./" class="md-nav__link md-nav__link--active">



<span class="md-ellipsis">
kaleido.errors

Expand All @@ -293,25 +298,15 @@
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#classes" class="md-nav__link">
<span class="md-ellipsis">
Classes
</span>
</a>

<nav class="md-nav" aria-label="Classes">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#JavascriptError" class="md-nav__link">
<span class="md-ellipsis">
class JavascriptError()
</span>
</a>

</li>
<li class="md-nav__item">

<li class="md-nav__item">
<a href="#KaleidoError" class="md-nav__link">
<span class="md-ellipsis">
class KaleidoError()
Expand All @@ -322,16 +317,6 @@
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#methods" class="md-nav__link">
<span class="md-ellipsis">
methods
</span>
</a>

<nav class="md-nav" aria-label="methods">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#KaleidoError-a__init__" class="md-nav__link">
<span class="md-ellipsis">
__init__(...)
Expand All @@ -343,16 +328,6 @@
</ul>
</nav>

</li>

</ul>
</nav>

</li>

</ul>
</nav>

</li>

</ul>
Expand Down Expand Up @@ -390,25 +365,15 @@
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#classes" class="md-nav__link">
<span class="md-ellipsis">
Classes
</span>
</a>

<nav class="md-nav" aria-label="Classes">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#JavascriptError" class="md-nav__link">
<span class="md-ellipsis">
class JavascriptError()
</span>
</a>

</li>
<li class="md-nav__item">

<li class="md-nav__item">
<a href="#KaleidoError" class="md-nav__link">
<span class="md-ellipsis">
class KaleidoError()
Expand All @@ -419,16 +384,6 @@
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#methods" class="md-nav__link">
<span class="md-ellipsis">
methods
</span>
</a>

<nav class="md-nav" aria-label="methods">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#KaleidoError-a__init__" class="md-nav__link">
<span class="md-ellipsis">
__init__(...)
Expand All @@ -440,16 +395,6 @@
</ul>
</nav>

</li>

</ul>
</nav>

</li>

</ul>
</nav>

</li>

</ul>
Expand All @@ -475,21 +420,19 @@ <h1 id="module-errors">module: <code>errors</code></h1>
<div class="long-description text">
<p>A list of errors available from the kaleido package.</p>
</div>
<h2 id="classes">Classes</h2>
<div class="individual-class">
<h3 id="JavascriptError"><code>class JavascriptError(RuntimeError):</code></h3>
<h3 id="JavascriptError"><span class="reserved-word">class</span><span class="fade"> JavascriptError(RuntimeError):</span></h3>
<div class="long-description text">
<p>Used to report errors from javascript.</p>
</div>
</div>
<div class="individual-class">
<h3 id="KaleidoError"><code>class KaleidoError(Exception):</code></h3>
<h3 id="KaleidoError"><span class="reserved-word">class</span><span class="fade"> KaleidoError(Exception):</span></h3>
<div class="long-description text">
<p>An error to interpret errors from Kaleido's JS side.</p>
</div>
<h4 id="methods">methods</h4>
<div class="indent">
<h5 id="KaleidoError-a__init__"><code>__init__(self, code, message)</code></h5>
<h5 id="KaleidoError-a__init__"><span class="reserved-word">method</span> <strong>init</strong>(self, code, message)</h5>
<div class="long-description">
<div class="text">
<p>Construct an error object.</p>
Expand Down Expand Up @@ -554,10 +497,12 @@ <h5 id="KaleidoError-a__init__"><code>__init__(self, code, message)</code></h5>
</div>


<script id="__config" type="application/json">{"base": "../..", "features": ["navigation.indexes"], "search": "../../assets/javascripts/workers/search.f8cc74c7.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>


<script id="__config" type="application/json">{"base": "../..", "features": ["navigation.indexes"], "search": "../../assets/javascripts/workers/search.d50fe291.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>


<script src="../../assets/javascripts/bundle.f1b6f286.min.js"></script>
<script src="../../assets/javascripts/bundle.56ea9cef.min.js"></script>


</body>
Expand Down
Loading