Skip to content

Commit

Permalink
Release
Browse files Browse the repository at this point in the history
  • Loading branch information
Alwinator committed Feb 15, 2022
1 parent f494b1d commit 0598e1c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion tests/Local.Dockerfile → docker/Local.Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
7 changes: 7 additions & 0 deletions docker/Remote.Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
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"
Expand Down

0 comments on commit 0598e1c

Please sign in to comment.