Loading pkgs/development/python-modules/kaleido/default.nix +3 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ stdenv, python, buildPythonPackage, callPackage, fetchurl, autoPatchelfHook, bash, Loading Loading @@ -96,6 +97,8 @@ buildPythonPackage rec { #ln -s ${lato}/share/fonts/lato/* $out/${python.sitePackages}/kaleido/executable/xdg/fonts/truetype/lato/ ''; passthru.tests.kaleido = callPackage ./tests.nix { }; meta = { description = "Fast static image export for web-based visualization libraries with zero dependencies"; homepage = "https://github.com/plotly/Kaleido"; Loading pkgs/development/python-modules/kaleido/tests.nix 0 → 100644 +15 −0 Original line number Diff line number Diff line { runCommand, python, plotly, pandas, kaleido, }: runCommand "${kaleido.pname}-tests" { nativeBuildInputs = [ python plotly pandas ]; } "python3 ${./tests.py}" pkgs/development/python-modules/kaleido/tests.py 0 → 100644 +11 −0 Original line number Diff line number Diff line import plotly.express as px import os import os.path out = os.environ["out"] if not os.path.exists(out): os.makedirs(out) outfile = os.path.join(out, "figure.png") fig = px.scatter(px.data.iris(), x="sepal_length", y="sepal_width", color="species") fig.write_image(outfile, engine="kaleido") Loading
pkgs/development/python-modules/kaleido/default.nix +3 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ stdenv, python, buildPythonPackage, callPackage, fetchurl, autoPatchelfHook, bash, Loading Loading @@ -96,6 +97,8 @@ buildPythonPackage rec { #ln -s ${lato}/share/fonts/lato/* $out/${python.sitePackages}/kaleido/executable/xdg/fonts/truetype/lato/ ''; passthru.tests.kaleido = callPackage ./tests.nix { }; meta = { description = "Fast static image export for web-based visualization libraries with zero dependencies"; homepage = "https://github.com/plotly/Kaleido"; Loading
pkgs/development/python-modules/kaleido/tests.nix 0 → 100644 +15 −0 Original line number Diff line number Diff line { runCommand, python, plotly, pandas, kaleido, }: runCommand "${kaleido.pname}-tests" { nativeBuildInputs = [ python plotly pandas ]; } "python3 ${./tests.py}"
pkgs/development/python-modules/kaleido/tests.py 0 → 100644 +11 −0 Original line number Diff line number Diff line import plotly.express as px import os import os.path out = os.environ["out"] if not os.path.exists(out): os.makedirs(out) outfile = os.path.join(out, "figure.png") fig = px.scatter(px.data.iris(), x="sepal_length", y="sepal_width", color="species") fig.write_image(outfile, engine="kaleido")