<spanid="devquickstart"></span><h1>Development Quickstart<aclass="headerlink"href="#development-quickstart"title="Permalink to this headline">¶</a></h1>
<h2>How to setup your development environment<aclass="headerlink"href="#how-to-setup-your-development-environment"title="Permalink to this headline">¶</a></h2>
<p>First, clone the source code of searx to the desired folder. In this case the source
is cloned to ~/myprojects/searx. Then create and activate the searx-ve
virtualenv and install the required packages using manage.sh.</p>
<divclass="code sh highlight-default"><divclass="highlight"><pre><spanclass="o">./</span><spanclass="n">manage</span><spanclass="o">.</span><spanclass="n">sh</span><spanclass="n">unit_tests</span>
<divclass="code sh highlight-default"><divclass="highlight"><pre><spanclass="n">sudo</span><spanclass="n">apt</span><spanclass="o">-</span><spanclass="n">get</span><spanclass="n">install</span><spanclass="n">nodejs</span>
<divclass="code sh highlight-default"><divclass="highlight"><pre><spanclass="n">sudo</span><spanclass="n">apt</span><spanclass="o">-</span><spanclass="n">get</span><spanclass="n">install</span><spanclass="n">node</span><spanclass="o">-</span><spanclass="n">less</span>
<divclass="code sh highlight-default"><divclass="highlight"><pre><spanclass="o">./</span><spanclass="n">manage</span><spanclass="o">.</span><spanclass="n">sh</span><spanclass="n">styles</span>
<h3>How to build the source of the oscar theme<aclass="headerlink"href="#how-to-build-the-source-of-the-oscar-theme"title="Permalink to this headline">¶</a></h3>
<p>Grunt must be installed in order to build the javascript sources. It depends on NodeJS, so first
<divclass="code sh highlight-default"><divclass="highlight"><pre><spanclass="n">sudo</span><spanclass="n">apt</span><spanclass="o">-</span><spanclass="n">get</span><spanclass="n">install</span><spanclass="n">nodejs</span>
<divclass="code sh highlight-default"><divclass="highlight"><pre><spanclass="o">./</span><spanclass="n">manage</span><spanclass="o">.</span><spanclass="n">sh</span><spanclass="n">build_grunt</span>
<h2>Tips for debugging/development<aclass="headerlink"href="#tips-for-debugging-development"title="Permalink to this headline">¶</a></h2>
<olclass="arabic">
<li><dlclass="first docutils">
<dt>Turn on debug logging</dt>
<dd><pclass="first last">Whether you are working on a new engine or trying to eliminate a bug, it is always a good idea
to turn on debug logging. When debug logging is enabled a stack trace appears,
instead of the cryptic <codeclass="docutils literal"><spanclass="pre">Internal</span><spanclass="pre">Server</span><spanclass="pre">Error</span></code> message. It can be turned on by setting
<codeclass="docutils literal"><spanclass="pre">debug:</span><spanclass="pre">False</span></code> to <codeclass="docutils literal"><spanclass="pre">debug:</span><spanclass="pre">True</span></code> in settings.yml.</p>
</dd>
</dl>
</li>
<li><dlclass="first docutils">
<dt>Run <codeclass="docutils literal"><spanclass="pre">./manage.sh</span><spanclass="pre">tests</span></code> before creating a PR.</dt>
<dd><pclass="first last">Failing build on Travis is common because of PEP8 checks. So a new commit must be created
containing these format fixes. This phase can be skipped if <codeclass="docutils literal"><spanclass="pre">./manage.sh</span><spanclass="pre">tests</span></code> is run