diff --git a/Cargo.lock b/Cargo.lock index 9b55c8e..442756d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -325,7 +325,7 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "avenger" -version = "0.0.4" +version = "0.0.5" dependencies = [ "image", "lyon_extra", @@ -339,7 +339,7 @@ dependencies = [ [[package]] name = "avenger-python" -version = "0.0.4" +version = "0.0.5" dependencies = [ "avenger", "avenger-vega", @@ -356,7 +356,7 @@ dependencies = [ [[package]] name = "avenger-vega" -version = "0.0.4" +version = "0.0.5" dependencies = [ "avenger", "cfg-if", @@ -378,7 +378,7 @@ dependencies = [ [[package]] name = "avenger-vega-renderer" -version = "0.0.4" +version = "0.0.5" dependencies = [ "avenger", "avenger-vega", @@ -402,7 +402,7 @@ dependencies = [ [[package]] name = "avenger-vega-test-data" -version = "0.0.4" +version = "0.0.5" dependencies = [ "pollster", "serde_json", @@ -411,7 +411,7 @@ dependencies = [ [[package]] name = "avenger-wgpu" -version = "0.0.4" +version = "0.0.5" dependencies = [ "avenger", "avenger-vega", diff --git a/avenger-python/Cargo.toml b/avenger-python/Cargo.toml index 766f75c..bca8c83 100644 --- a/avenger-python/Cargo.toml +++ b/avenger-python/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "avenger-python" -version = "0.0.4" +version = "0.0.5" edition = "2021" license = "BSD-3-Clause" description = "Python API to Avenger visualization framework" @@ -17,17 +17,17 @@ pollster = "0.3" [dependencies.avenger] path = "../avenger" features = [ "pyo3",] -version = "0.0.4" +version = "0.0.5" [dependencies.avenger-vega] path = "../avenger-vega" features = [ "pyo3",] -version = "0.0.4" +version = "0.0.5" [dependencies.avenger-wgpu] path = "../avenger-wgpu" features = [ "pyo3",] -version = "0.0.4" +version = "0.0.5" [dependencies.pyo3] workspace = true diff --git a/avenger-python/avenger/altair_utils.py b/avenger-python/avenger/altair_utils.py index d22686b..c0e0ab3 100644 --- a/avenger-python/avenger/altair_utils.py +++ b/avenger-python/avenger/altair_utils.py @@ -1,4 +1,5 @@ from ._avenger import SceneGraph +from . import __version__ import copy def avenger_png_renderer(spec: dict, **kwargs) -> dict: @@ -29,7 +30,7 @@ def avenger_png_renderer(spec: dict, **kwargs) -> dict: return {"image/png": sg.to_png(scale=kwargs.get("scale", None))} -def avenger_html_renderer(spec: dict, **kwargs) -> dict: +def avenger_html_renderer(spec: dict, verbose=False, **kwargs) -> dict: """ Altair renderer plugin that uses Avenger to render interactive charts @@ -46,8 +47,7 @@ def avenger_html_renderer(spec: dict, **kwargs) -> dict: from altair import VEGA_VERSION, VEGALITE_VERSION, VEGAEMBED_VERSION import jinja2 - template = jinja2.Template( - """\ + template_str = """\
@@ -67,8 +67,8 @@ def avenger_html_renderer(spec: dict, **kwargs) -> dict: