123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
- <title>Installation — Modelverse 0.4.0 documentation</title>
-
- <link rel="stylesheet" href="_static/classic.css" type="text/css" />
- <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
-
- <script type="text/javascript">
- var DOCUMENTATION_OPTIONS = {
- URL_ROOT: './',
- VERSION: '0.4.0',
- COLLAPSE_INDEX: false,
- FILE_SUFFIX: '.html',
- HAS_SOURCE: true
- };
- </script>
- <script type="text/javascript" src="_static/jquery.js"></script>
- <script type="text/javascript" src="_static/underscore.js"></script>
- <script type="text/javascript" src="_static/doctools.js"></script>
- <link rel="top" title="Modelverse 0.4.0 documentation" href="index.html" />
- <link rel="next" title="Modelverse components" href="components.html" />
- <link rel="prev" title="Welcome to Modelverse’s documentation!" href="index.html" />
- </head>
- <body role="document">
- <div class="related" role="navigation" aria-label="related navigation">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="genindex.html" title="General Index"
- accesskey="I">index</a></li>
- <li class="right" >
- <a href="components.html" title="Modelverse components"
- accesskey="N">next</a> |</li>
- <li class="right" >
- <a href="index.html" title="Welcome to Modelverse’s documentation!"
- accesskey="P">previous</a> |</li>
- <li class="nav-item nav-item-0"><a href="index.html">Modelverse 0.4.0 documentation</a> »</li>
- </ul>
- </div>
- <div class="document">
- <div class="documentwrapper">
- <div class="bodywrapper">
- <div class="body" role="main">
-
- <div class="section" id="installation">
- <h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
- <div class="section" id="dependencies">
- <h2>Dependencies<a class="headerlink" href="#dependencies" title="Permalink to this headline">¶</a></h2>
- <p>The Modelverse reference implementation is relatively dependency-free.
- As its code is written in Python 2, a working Python 2.7 interpreter is necessary.</p>
- <p>To run the tests, this interpreter needs to have the <a class="reference external" href="http://docs.pytest.org/en/latest/">pytest</a> module installed.</p>
- <p>To run the statecharts, the <a class="reference external" href="https://msdl.uantwerpen.be/git/simon/SCCD">SCCD</a> module needs to be installed.</p>
- </div>
- <div class="section" id="id1">
- <h2>Installation<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
- <p>The Modelverse is merely a set of scripts, and there is no real installation present.
- As such, you will only have to download the source code and are ready to use the Modelverse.</p>
- <ol class="arabic" start="0">
- <li><p class="first">Install dependencies.</p>
- </li>
- <li><p class="first">Download the <a class="reference external" href="https://msdl.uantwerpen.be/git/yentl/modelverse">Modelverse source code</a>.
- For example using git:</p>
- <div class="highlight-default"><div class="highlight"><pre><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">msdl</span><span class="o">.</span><span class="n">uantwerpen</span><span class="o">.</span><span class="n">be</span><span class="o">/</span><span class="n">git</span><span class="o">/</span><span class="n">yentl</span><span class="o">/</span><span class="n">modelverse</span>
- </pre></div>
- </div>
- <p>Or using your favorite HTTP download tool:</p>
- <div class="highlight-default"><div class="highlight"><pre><span class="n">wget</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">msdl</span><span class="o">.</span><span class="n">uantwerpen</span><span class="o">.</span><span class="n">be</span><span class="o">/</span><span class="n">git</span><span class="o">/</span><span class="n">yentl</span><span class="o">/</span><span class="n">modelverse</span><span class="o">/</span><span class="n">archive</span><span class="o">/</span><span class="n">master</span><span class="o">.</span><span class="n">zip</span>
- <span class="n">unzip</span> <span class="n">master</span><span class="o">.</span><span class="n">zip</span>
- </pre></div>
- </div>
- </li>
- <li><p class="first">That’s it! You can now run the scripts in the <em>scripts/</em> directory using Python.</p>
- </li>
- </ol>
- </div>
- <div class="section" id="tests">
- <h2>Tests<a class="headerlink" href="#tests" title="Permalink to this headline">¶</a></h2>
- <p>To make sure that everything is working correctly, you can execute the tests with the script <em>scripts/run_tests.sh</em>.
- This test file will execute tests in parallel, using as many cores as it can.
- Nonetheless, total execution time is still rather slow (e.g., 1200 seconds on a i5-4570 using PyPy).</p>
- <p>Executing the tests is as simple as the following command:</p>
- <div class="highlight-default"><div class="highlight"><pre><span class="n">python</span> <span class="n">scripts</span><span class="o">/</span><span class="n">run_tests</span><span class="o">.</span><span class="n">py</span>
- </pre></div>
- </div>
- <p>This will run a set of tests for all different projects.</p>
- <div class="section" id="pypy">
- <h3>PyPy<a class="headerlink" href="#pypy" title="Permalink to this headline">¶</a></h3>
- <p>The default way of executing tests is probably through CPython.
- Note, however, that CPython is a very slow implementation of Python, which makes everything in the Modelverse slower.
- While it is not impossible to use CPython, using PyPy is highly recommended at the moment!
- Nonetheless, PyPy is often not the default interpretter present on the system.
- You will therefore have to explicitly give control to PyPy instead of CPython.</p>
- <p>This is fairly simple: all scripts in <em>scripts/</em> execute their subprocesses using the Python interpreter used to start the script.
- As such, the following command suffices to execute the Modelverse tests using PyPy:</p>
- <div class="highlight-default"><div class="highlight"><pre><span class="n">pypy</span> <span class="n">scripts</span><span class="o">/</span><span class="n">run_tests</span><span class="o">.</span><span class="n">py</span>
- </pre></div>
- </div>
- <p>The problem, however, is that all modules need to be readily installed on PyPy.
- For SCCD, you can simply install it using PyPy instead of CPython.
- For pytest, you also need to install all of pytest’s dependencies.
- The easiest way to do this is through <em>pip</em>, which you also have to install first:</p>
- <div class="highlight-default"><div class="highlight"><pre><span class="n">wget</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">bootstrap</span><span class="o">.</span><span class="n">pypa</span><span class="o">.</span><span class="n">io</span><span class="o">/</span><span class="n">get</span><span class="o">-</span><span class="n">pip</span><span class="o">.</span><span class="n">py</span>
- <span class="n">pypy</span> <span class="n">get</span><span class="o">-</span><span class="n">pip</span><span class="o">.</span><span class="n">py</span> <span class="o">--</span><span class="n">user</span>
- <span class="n">pypy</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="n">pytest</span> <span class="o">--</span><span class="n">user</span>
- </pre></div>
- </div>
- <p>Afterwards, you can simply run:</p>
- <div class="highlight-default"><div class="highlight"><pre><span class="n">pypy</span> <span class="n">scripts</span><span class="o">/</span><span class="n">run_tests</span><span class="o">.</span><span class="n">py</span>
- </pre></div>
- </div>
- <p>To execute the tests using PyPy.</p>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
- <div class="sphinxsidebarwrapper">
- <h3><a href="index.html">Table Of Contents</a></h3>
- <ul>
- <li><a class="reference internal" href="#">Installation</a><ul>
- <li><a class="reference internal" href="#dependencies">Dependencies</a></li>
- <li><a class="reference internal" href="#id1">Installation</a></li>
- <li><a class="reference internal" href="#tests">Tests</a><ul>
- <li><a class="reference internal" href="#pypy">PyPy</a></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- <h4>Previous topic</h4>
- <p class="topless"><a href="index.html"
- title="previous chapter">Welcome to Modelverse’s documentation!</a></p>
- <h4>Next topic</h4>
- <p class="topless"><a href="components.html"
- title="next chapter">Modelverse components</a></p>
- <div role="note" aria-label="source link">
- <h3>This Page</h3>
- <ul class="this-page-menu">
- <li><a href="_sources/installation.txt"
- rel="nofollow">Show Source</a></li>
- </ul>
- </div>
- <div id="searchbox" style="display: none" role="search">
- <h3>Quick search</h3>
- <form class="search" action="search.html" method="get">
- <div><input type="text" name="q" /></div>
- <div><input type="submit" value="Go" /></div>
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
- </div>
- <script type="text/javascript">$('#searchbox').show(0);</script>
- </div>
- </div>
- <div class="clearer"></div>
- </div>
- <div class="related" role="navigation" aria-label="related navigation">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="genindex.html" title="General Index"
- >index</a></li>
- <li class="right" >
- <a href="components.html" title="Modelverse components"
- >next</a> |</li>
- <li class="right" >
- <a href="index.html" title="Welcome to Modelverse’s documentation!"
- >previous</a> |</li>
- <li class="nav-item nav-item-0"><a href="index.html">Modelverse 0.4.0 documentation</a> »</li>
- </ul>
- </div>
- <div class="footer" role="contentinfo">
- © Copyright 2016, Yentl Van Tendeloo.
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.6.
- </div>
- </body>
- </html>
|