From 0598e1c52446e7ac20bb9092ca17c6d369c30e9d Mon Sep 17 00:00:00 2001 From: Alwin Schuster Date: Tue, 15 Feb 2022 15:26:04 +0100 Subject: [PATCH] Release --- README.md | 11 ++++++----- {tests => docker}/Local.Dockerfile | 2 +- docker/Remote.Dockerfile | 7 +++++++ pyproject.toml | 10 +++++++--- 4 files changed, 21 insertions(+), 9 deletions(-) rename {tests => docker}/Local.Dockerfile (71%) create mode 100644 docker/Remote.Dockerfile diff --git a/README.md b/README.md index d9e0e9c..b001444 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# WIP: graphviz-py -Allows Python code execution inside of [graphviz](https://graphviz.org/) diagrams - +# graphviz-py [![package version](https://img.shields.io/pypi/v/graphviz-py?style=flat-square)](https://pypi.org/project/graphviz-py/) [![py versions](https://img.shields.io/pypi/pyversions/graphviz-py?style=flat-square)](https://pypi.org/project/graphviz-py/) [![license](https://img.shields.io/github/license/Alwinator/graphviz-py?style=flat-square)](LICENSE) +Allows Python code execution inside of [graphviz](https://graphviz.org/) diagrams + ## Example ```dot graph python_graph { @@ -29,11 +29,13 @@ cos = math.cos(value) ![output](assets/output.svg) ## Install -Coming soon! ```bash pip install graphviz-py ``` +**Important: Make sure graphviz is installed!** See [graphviz installation instructions](https://graphviz.org/download/). + + ## Usage ### Using files ```bash @@ -49,5 +51,4 @@ echo 'digraph { A -> B [label="{{= 38 * 73 }}"] }' | graphviz-py -Tsvg > output. graphviz-py passes all unknown arguments to graphviz. So you can use all [graphviz arguments](https://graphviz.org/doc/info/command.html). ## Coming soon -- Requested the graphviz-py Pypi name - Compartibility with asciidoctor-diagram diff --git a/tests/Local.Dockerfile b/docker/Local.Dockerfile similarity index 71% rename from tests/Local.Dockerfile rename to docker/Local.Dockerfile index 2673f87..40bf8e6 100644 --- a/tests/Local.Dockerfile +++ b/docker/Local.Dockerfile @@ -1,7 +1,7 @@ FROM python:3.9 +RUN apt-get update && apt-get install graphviz -y RUN mkdir /work WORKDIR /work COPY . . -RUN apt install grap RUN pip install . CMD ["graphviz-py", "-Tsvg", "example/example.py.dot"] \ No newline at end of file diff --git a/docker/Remote.Dockerfile b/docker/Remote.Dockerfile new file mode 100644 index 0000000..285f63e --- /dev/null +++ b/docker/Remote.Dockerfile @@ -0,0 +1,7 @@ +FROM python:3.9 +RUN apt-get update && apt-get install graphviz -y +RUN mkdir /work +WORKDIR /work +COPY . . +RUN pip install graphviz_py +CMD ["graphviz-py", "-Tsvg", "example/example.py.dot"] \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 046b6b8..5523637 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,14 @@ [tool.poetry] name = "graphviz-py" -version = "0.0.4" +version = "1.0.0" description = "Allows Python code execution inside of graphviz diagrams." -authors = ["Alwin Schuster"] -license = 'MPL-2' +authors = ["Alwin Schuster "] +license = 'MPL-2.0' homepage = "https://github.com/Alwinator/graphviz-py" +repository = "https://github.com/Alwinator/graphviz-py" +documentation = "https://github.com/Alwinator/graphviz-py" +readme = "README.md" +keywords = ["graphviz", "dot", "python", "graphviz-python", "gv"] [tool.poetry.dependencies] python = ">=3.7.0"