Skip to content

Commit

Permalink
Updated build instructions and disable black on GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
hbmartin committed Jul 2, 2024
1 parent 6e1fe2b commit d310018
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
if [[ '${{ steps.cpython3.outputs.python-version }}' == *"3.12"* ]]; then
echo "pytype does not support 3.12: https://github.com/google/pytype/issues/1475"
else
pytype -j auto podcast_transcript_tools
pytype -j auto graphviz2drawio
fi
- uses: psf/black@stable
with:
options: "--check --verbose"
# - uses: psf/black@stable
# with:
# options: "--check --verbose"
- run: pytest
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<a href="https://pypi.org/project/graphviz2drawio/"><img src="https://img.shields.io/pypi/v/graphviz2drawio.svg" alt="pypi"></a>
<a href="https://pypi.python.org/pypi/graphviz2drawio/"><img src="https://img.shields.io/pypi/pyversions/graphviz2drawio.svg" /></a>
[![Build Status](https://travis-ci.com/hbmartin/graphviz2drawio.svg?branch=master)](https://travis-ci.com/hbmartin/graphviz2drawio)
[![Lint and Test](https://github.com/hbmartin/graphviz2drawio/actions/workflows/lint.yml/badge.svg)](https://github.com/hbmartin/graphviz2drawio/actions/workflows/lint.yml)
[![codecov.io](https://codecov.io/github/hbmartin/graphviz2drawio/coverage.svg?branch=master)](https://codecov.io/github/hbmartin/graphviz2drawio?branch=master)
<a href="https://github.com/ambv/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" /></a>

Expand All @@ -15,12 +15,20 @@ Convert graphviz (dot) files into draw.io (mxGraph) format

graphviz2drawio requires [Python 3](https://www.python.org/downloads/) and [Graphviz](https://www.graphviz.org/download/)

* On Mac OS these can be installed with [Homebrew](https://brew.sh/):
* On mac OS you MUST install and configure the graphviz binary. This can be installed with [Homebrew](https://brew.sh/):

```
brew update; brew install python3 graphviz
pip3 install pygraphviz --install-option="--include-path=/usr/local/include/graphviz" --install-option="--library-path=/usr/local/lib/graphviz/"
pip3 install pygraphviz
```

If you encounter build errors you may need to point pygraphviz with links to the graphviz libraries

```
export CFLAGS="-I$(brew --prefix graphviz)/include/"
export LDFLAGS="-L$(brew --prefix graphviz)/lib/"
```

* On Ubuntu / Debian based Linux, install graphviz using:

```
Expand Down Expand Up @@ -67,6 +75,18 @@ Pull requests are welcome. For major changes, please open an issue first to disc

This project is linted with [pyflakes](https://github.com/PyCQA/pyflakes) and makes strict use of [Black](https://github.com/ambv/black) for code formatting.

## Developing

```bash
git clone [email protected]:hbmartin/graphviz2drawio.git
cd graphviz2drawio
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Replace with the actual path to your dot files
python -m graphviz2drawio test/directed/hello.gv.txt
```


## Authors

Expand Down
10 changes: 3 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,15 @@
"Topic :: Scientific/Engineering :: Visualization",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
license="GPLv3",
keywords="graphviz graph agraph dot convert conversion draw drawio mxgraph xml",
packages=find_packages(exclude=["contrib", "docs", "tests"]),
install_requires=["pygraphviz", "raven", "svg.path"],
tests_require=["pytest"],
entry_points={
"console_scripts": ["graphviz2drawio=graphviz2drawio.__main__:main"]
},
entry_points={"console_scripts": ["graphviz2drawio=graphviz2drawio.__main__:main"]},
project_urls={
"Bug Reports": "https://github.com/hbmartin/graphviz2drawio/issues",
"Source": "https://github.com/hbmartin/graphviz2drawio/",
Expand Down

0 comments on commit d310018

Please sign in to comment.