Skip to content

Commit

Permalink
fix readthedocs pdf build error
Browse files Browse the repository at this point in the history
  • Loading branch information
pjamesjoyce committed Aug 18, 2017
1 parent 4a357b7 commit 078c52c
Show file tree
Hide file tree
Showing 33 changed files with 69 additions and 381 deletions.
4 changes: 2 additions & 2 deletions docs/0_introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ How do you analyse a model?

.. sidebar:: Hotspot chart

.. image:: assets/hotspot_chart_tea.png
.. image:: assets/hotspot_chart_tea_sm.png

To analyse the model you have two options.

Expand All @@ -103,7 +103,7 @@ Lcopt calculates all of the parameters for each parameter set and then modifies

.. sidebar:: Tree diagram

.. image:: assets/tree.png
.. image:: assets/tree_sm.png

You can choose from over 700 different impact assessment methods (don't worry, there is a search function), and use as many as you like in one go. The default set is climate change (IPCC 2013 100a) and human toxicity (USEtox).

Expand Down
4 changes: 2 additions & 2 deletions docs/1_installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Alternative setup - FORWAST
Lcopt can be used without an ecoinvent license by using the `FORWAST <http://forwast.brgm.fr/>`_ database instead.

Option 1. Run the setup utility in a jupyter notebook/python shell
-----------------------------------------------------------------
------------------------------------------------------------------

.. highlight:: python

Expand All @@ -123,7 +123,7 @@ It'll take a while, but once its done it'll return ``True`` if it worked properl


Option 2. Download lcopt_bw2_setup.py and use that instead
---------------------------------------------------------
----------------------------------------------------------

Download the helper script from `here <https://raw.githubusercontent.com/pjamesjoyce/lcopt/master/lcopt_bw2_setup_forwast.py>`_

Expand Down
Binary file modified docs/_build/doctrees/0_introduction.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/1_installation.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/2_use.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/3_video_runthrough.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/4_technical.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/5_contact.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 41e5dda6913a81cd88e48fa087370482
config: bdcd9ef0d95e587e47efb9ff8b13dbd2
tags: 645f666f9bcd5a90fca523b33c5a78b7
41 changes: 21 additions & 20 deletions docs/_build/html/0_introduction.html

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions docs/_build/html/1_installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,16 @@ <h2>Basic Installation<a class="headerlink" href="#basic-installation" title="Pe
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="go">conda install -y -q -c conda-forge -c cmutel -c haasad brightway2 jupyter</span>
</pre></div>
</div>
<p>On windows there&#8217;s an extra dependency:</p>
<p>On windows theres an extra dependency:</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="go">conda install -y -q pywin32</span>
</pre></div>
</div>
<p>Once brightway2 is ready to go, theres two more steps before installing lcopt itself...</p>
<p>Once brightway2 is ready to go, theres two more steps before installing lcopt itself</p>
<p>Install pandas:</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="go">conda install -y -q pandas</span>
</pre></div>
</div>
<p>Update werkzeug (this is a python 3.6 thing...):</p>
<p>Update werkzeug (this is a python 3.6 thing):</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="go">pip install -U werkzeug</span>
</pre></div>
</div>
Expand All @@ -219,7 +219,7 @@ <h2>Basic Installation<a class="headerlink" href="#basic-installation" title="Pe
<h3>Step 1. Download the Ecoinvent 3.3 cutoff database (Ecoinvent license required)<a class="headerlink" href="#step-1-download-the-ecoinvent-3-3-cutoff-database-ecoinvent-license-required" title="Permalink to this headline"></a></h3>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Note - if you don&#8217;t have an ecoinvent license but want to try out lcopt, it can also be used with the freely available FORWAST database <a class="reference internal" href="#forwast-setup-step"><span class="std std-ref">Alternative setup - FORWAST</span></a>.</p>
<p class="last">Note - if you dont have an ecoinvent license but want to try out lcopt, it can also be used with the freely available FORWAST database <a class="reference internal" href="#forwast-setup-step"><span class="std std-ref">Alternative setup - FORWAST</span></a>.</p>
</div>
<p>Log into <a class="reference external" href="http://www.ecoinvent.org/login-databases.html">ecoinvent.org</a> and go to the Files tab</p>
<p>Download the file called <code class="docutils literal"><span class="pre">ecoinvent</span> <span class="pre">3.3_cutoff_ecoSpold02.7z</span></code></p>
Expand All @@ -234,7 +234,7 @@ <h3>Step 2a. Run the setup utility in a jupyter notebook/python shell<a class="h
<span class="n">lcopt_bw2_setup</span><span class="p">(</span><span class="n">ecospold_path</span><span class="p">)</span>
</pre></div>
</div>
<p>It&#8217;ll take a while, but once its done it&#8217;ll return <code class="docutils literal"><span class="pre">True</span></code> if it worked properly</p>
<p>Itll take a while, but once its done itll return <code class="docutils literal"><span class="pre">True</span></code> if it worked properly</p>
</div>
<div class="section" id="step-2b-download-lcopt-bw2-setup-py-and-use-that-instead">
<h3>Step 2b. Download lcopt_bw2_setup.py and use that instead<a class="headerlink" href="#step-2b-download-lcopt-bw2-setup-py-and-use-that-instead" title="Permalink to this headline"></a></h3>
Expand All @@ -252,11 +252,11 @@ <h3>Step 2b. Download lcopt_bw2_setup.py and use that instead<a class="headerlin
<div class="section" id="option-1-run-the-setup-utility-in-a-jupyter-notebook-python-shell">
<h3>Option 1. Run the setup utility in a jupyter notebook/python shell<a class="headerlink" href="#option-1-run-the-setup-utility-in-a-jupyter-notebook-python-shell" title="Permalink to this headline"></a></h3>
<p>Fire up your chosen python shell, then use:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">lcopt.utils</span> <span class="kn">import</span> <span class="n">lcopt_bw2_setup_forwast</span>
<span class="n">lcopt_bw2_setup_forwast</span><span class="p">()</span>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">lcopt.utils</span> <span class="kn">import</span> <span class="n">lcopt_bw2_forwast_setup</span>
<span class="n">lcopt_bw2_forwast_setup</span><span class="p">()</span>
</pre></div>
</div>
<p>It&#8217;ll take a while, but once its done it&#8217;ll return <code class="docutils literal"><span class="pre">True</span></code> if it worked properly</p>
<p>Itll take a while, but once its done itll return <code class="docutils literal"><span class="pre">True</span></code> if it worked properly</p>
</div>
<div class="section" id="option-2-download-lcopt-bw2-setup-py-and-use-that-instead">
<h3>Option 2. Download lcopt_bw2_setup.py and use that instead<a class="headerlink" href="#option-2-download-lcopt-bw2-setup-py-and-use-that-instead" title="Permalink to this headline"></a></h3>
Expand Down
22 changes: 11 additions & 11 deletions docs/_build/html/2_use.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@
<h1>Using LCOPT<a class="headerlink" href="#using-lcopt" title="Permalink to this headline"></a></h1>
<div class="section" id="launching-the-lcopt-gui">
<h2>Launching the lcopt GUI<a class="headerlink" href="#launching-the-lcopt-gui" title="Permalink to this headline"></a></h2>
<p>There are 2 options for using lcopt&#8217;s GUI (LCOPT INTERACT)</p>
<p>There are 2 options for using lcopts GUI (LCOPT INTERACT)</p>
<div class="section" id="option-1-jupyter-notebooks-more-complicated-more-powerful">
<h3>Option 1. Jupyter notebooks <em>(More complicated, more powerful)</em><a class="headerlink" href="#option-1-jupyter-notebooks-more-complicated-more-powerful" title="Permalink to this headline"></a></h3>
<p>Probably the best way to use lcopt is via a jupyter notebook. This gives you more access to the inner workings if you need to get at something you can&#8217;t see in the GUI.</p>
<p>Probably the best way to use lcopt is via a jupyter notebook. This gives you more access to the inner workings if you need to get at something you cant see in the GUI.</p>
<p><code class="docutils literal"><span class="pre">cd</span></code> into whatever folder you want your notebooks and lcopt models to be stored in, then start jupyter e.g.:</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="go">activate lcopt</span>
<span class="go">cd C:\Users\pjjoyce\Documents\01_Lcopt_models</span>
Expand All @@ -195,7 +195,7 @@ <h3>Option 1. Jupyter notebooks <em>(More complicated, more powerful)</em><a cla
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If you are using FORWAST instead of ecoinvent, you need to add the argument <cite>useForwast=True</cite> e.g. <cite>model = LcoptModel(load = &#8216;MyFirstModel&#8217;, useForwast=True)</cite></p>
<p class="last">If you are using FORWAST instead of ecoinvent, you need to add the argument <cite>useForwast=True</cite> e.g. <cite>model = LcoptModel(load = MyFirstModel, useForwast=True)</cite></p>
</div>
<p>Then launch the interactive model creator/analyser:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">model</span><span class="o">.</span><span class="n">launch_interact</span><span class="p">()</span>
Expand All @@ -214,24 +214,24 @@ <h3>Option 2. lcopt_launcher.py <em>(Simpler, only access to GUI)</em><a class="
<span class="go">python lcopt_launcher.py</span>
</pre></div>
</div>
<p>You&#8217;ll get an option to either create a new model or open an exising one. Make your choice and the GUI will open in your default browser.</p>
<p>Youll get an option to either create a new model or open an exising one. Make your choice and the GUI will open in your default browser.</p>
</div>
</div>
<div class="section" id="lcopt-interact-the-gui">
<h2>LCOPT INTERACT - the GUI<a class="headerlink" href="#lcopt-interact-the-gui" title="Permalink to this headline"></a></h2>
<p>Running the GUI via each of the options above launches a Flask server that gives you a nice UI to interact with the models. You can add processes, link them together, add biosphere and technosphere exchanges, and create parameter sets and functions using your parameters. It should be pretty intuitive, if you get stuck, try the &#8216;more info...&#8217; buttons.</p>
<p>When your model&#8217;s ready you can export it to SimaPro as a .csv file and the parameter sets you&#8217;ve created as an Excel file (Note: you need SimaPro developer to import the parameter sets from the Excel file).</p>
<p>To run the analyses interactively using brightway2, make sure you&#8217;ve completed the additional setup step (<a class="reference internal" href="1_installation.html#bw2-setup-step"><span class="std std-ref">Setting up brightway2 for lcopt</span></a>).</p>
<p>The &#8216;QUIT&#8217; button in the top right hand corner will shut down the Flask server and tell you to close the window.</p>
<p>If you&#8217;re running from a jupyter notebook, this frees up the notebook again so you can run any commands you need to.</p>
<p>Running the GUI via each of the options above launches a Flask server that gives you a nice UI to interact with the models. You can add processes, link them together, add biosphere and technosphere exchanges, and create parameter sets and functions using your parameters. It should be pretty intuitive, if you get stuck, try the more info…’ buttons.</p>
<p>When your models ready you can export it to SimaPro as a .csv file and the parameter sets youve created as an Excel file (Note: you need SimaPro developer to import the parameter sets from the Excel file).</p>
<p>To run the analyses interactively using brightway2, make sure youve completed the additional setup step (<a class="reference internal" href="1_installation.html#bw2-setup-step"><span class="std std-ref">Setting up brightway2 for lcopt</span></a>).</p>
<p>The QUIT button in the top right hand corner will shut down the Flask server and tell you to close the window.</p>
<p>If youre running from a jupyter notebook, this frees up the notebook again so you can run any commands you need to.</p>
<p>One useful command is <code class="docutils literal"><span class="pre">model.save()</span></code> which will save any unsaved changes (you can also save by clicking on the save button in LcoptInteract, but in case you forget you can use <code class="docutils literal"><span class="pre">model.save()</span></code>)</p>
<p>The model is saved as a .lcopt file in your working directory (its really a .pickle file, but the .lcopt extension makes it easier to filter on in the lcopt_launcher file picker)</p>
<p>NOTE: The next time you run the GUI from a notebook you need to use:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">model</span> <span class="o">=</span> <span class="n">LcoptModel</span><span class="p">(</span><span class="n">load</span> <span class="o">=</span> <span class="s1">&#39;MyFirstModel&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>If you don&#8217;t it&#8217;ll create a new blank model called &#8216;MyFirstModel&#8217;. If you do do this by accident fear not - it won&#8217;t overwrite your .lcopt file until you save it.
Quit interact by hitting the QUIT button and go back and change your command (just don&#8217;t click the save button or run <cite>model.save()</cite> in the meantime)</p>
<p>If you dont itll create a new blank model called MyFirstModel. If you do do this by accident fear not - it wont overwrite your .lcopt file until you save it.
Quit interact by hitting the QUIT button and go back and change your command (just dont click the save button or run <cite>model.save()</cite> in the meantime)</p>
</div>
</div>

Expand Down

0 comments on commit 078c52c

Please sign in to comment.