From 19c055a494b4c2369dada2f4f35aff831b7cd1b4 Mon Sep 17 00:00:00 2001 From: trevorb1 Date: Tue, 24 Oct 2023 11:25:24 -0700 Subject: [PATCH 1/3] update graphviz install instructions --- docs/examples.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/examples.rst b/docs/examples.rst index 281a9831..97c52554 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -215,6 +215,20 @@ Run the following command, where the RES will be saved as the file ``res.png``:: $ otoole viz res excel simplicity.xlsx res.png config.yaml +.. WARNING:: + If you encounter a ``graphviz`` dependency error, please install it in your + virtual environment through:: + + pip install graphviz # if using pip + conda install graphviz # if using conda + + Alternatively, you can install it on your system via the commands:: + + sudo apt install graphviz # if on Ubuntu + brew install graphviz # if on Mac + + Or from the graphviz_ website if on Windows. + 2. View the RES ~~~~~~~~~~~~~~~ Open the newly created file, ``res.png`` and the following image should be @@ -486,3 +500,4 @@ will also flag it as an isolated fuel. This means the fuel is unconnected from t .. _CPLEX: https://www.ibm.com/products/ilog-cplex-optimization-studio/cplex-optimizer .. _Anaconda: https://www.anaconda.com/ .. _Gurobi: https://www.gurobi.com/ +.. _graphviz: https://www.graphviz.org/download/ From 6843b5e5fc4eabbd564d6c61f9c424088991298d Mon Sep 17 00:00:00 2001 From: trevorb1 Date: Tue, 24 Oct 2023 11:44:22 -0700 Subject: [PATCH 2/3] added graphviz to requirements --- docs/requirements.txt | 1 + setup.cfg | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/requirements.txt b/docs/requirements.txt index 6b659fb8..0665d857 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,6 @@ amply>=0.1.4 docutils<0.18 +graphviz flatten_dict Jinja2<3.1 networkx diff --git a/setup.cfg b/setup.cfg index 7fbcbb43..3f94cc37 100644 --- a/setup.cfg +++ b/setup.cfg @@ -53,6 +53,7 @@ install_requires = flatten_dict openpyxl pydantic>=2 + graphviz [options.packages.find] where = src exclude = From d7f668ed9411f1087b231e21c5947762b83b4479 Mon Sep 17 00:00:00 2001 From: trevorb1 Date: Thu, 2 Nov 2023 20:44:25 -0700 Subject: [PATCH 3/3] fix graphviz dependency --- docs/examples.rst | 17 ++++++++--------- docs/requirements.txt | 1 - setup.cfg | 1 - 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/docs/examples.rst b/docs/examples.rst index 97c52554..ba779362 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -216,20 +216,19 @@ Run the following command, where the RES will be saved as the file ``res.png``:: $ otoole viz res excel simplicity.xlsx res.png config.yaml .. WARNING:: - If you encounter a ``graphviz`` dependency error, please install it in your - virtual environment through:: - - pip install graphviz # if using pip - conda install graphviz # if using conda - - Alternatively, you can install it on your system via the commands:: + If you encounter a ``graphviz`` dependency error, install it on your system + from the graphviz_ website (if on Windows) or via the command:: sudo apt install graphviz # if on Ubuntu brew install graphviz # if on Mac - Or from the graphviz_ website if on Windows. + To check that ``graphviz`` installed correctly, run ``dot -V`` to check the + version:: + + ~$ dot -V + dot - graphviz version 2.43.0 (0) -2. View the RES +1. View the RES ~~~~~~~~~~~~~~~ Open the newly created file, ``res.png`` and the following image should be displayed diff --git a/docs/requirements.txt b/docs/requirements.txt index 0665d857..6b659fb8 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,6 +1,5 @@ amply>=0.1.4 docutils<0.18 -graphviz flatten_dict Jinja2<3.1 networkx diff --git a/setup.cfg b/setup.cfg index 3f94cc37..7fbcbb43 100644 --- a/setup.cfg +++ b/setup.cfg @@ -53,7 +53,6 @@ install_requires = flatten_dict openpyxl pydantic>=2 - graphviz [options.packages.find] where = src exclude =