123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
-
- <!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="X-UA-Compatible" content="IE=Edge" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Development Quickstart — searx 0.12.0 documentation</title>
- <link rel="stylesheet" href="../_static/style.css" type="text/css" />
- <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
- <script type="text/javascript" src="../_static/documentation_options.js"></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="index" title="Index" href="../genindex.html" />
- <link rel="search" title="Search" href="../search.html" />
- <link rel="next" title="How to contribute" href="contribution_guide.html" />
- <link rel="prev" title="How to setup result proxy" href="../admin/morty.html" />
-
-
- <link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
- <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
-
- </head><body>
-
- <div class="document">
- <div class="documentwrapper">
- <div class="bodywrapper">
- <div class="body" role="main">
-
- <div class="section" id="development-quickstart">
- <span id="devquickstart"></span><h1>Development Quickstart<a class="headerlink" href="#development-quickstart" title="Permalink to this headline">¶</a></h1>
- <p>This quickstart guide gets your environment set up with searx. Furthermore, it gives a
- short introduction to the new manage.sh script.</p>
- <div class="section" id="how-to-setup-your-development-environment">
- <h2>How to setup your development environment<a class="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>
- <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="o">~/</span><span class="n">myprojects</span>
- <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">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">asciimoo</span><span class="o">/</span><span class="n">searx</span><span class="o">.</span><span class="n">git</span>
- <span class="n">cd</span> <span class="n">searx</span>
- <span class="n">virtualenv</span> <span class="n">searx</span><span class="o">-</span><span class="n">ve</span>
- <span class="o">.</span> <span class="o">./</span><span class="n">searx</span><span class="o">-</span><span class="n">ve</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">activate</span>
- <span class="o">./</span><span class="n">manage</span><span class="o">.</span><span class="n">sh</span> <span class="n">update_dev_packages</span>
- </pre></div>
- </div>
- </div>
- <div class="section" id="how-to-run-tests">
- <h2>How to run tests<a class="headerlink" href="#how-to-run-tests" title="Permalink to this headline">¶</a></h2>
- <p>Tests can be run using the manage.sh script.</p>
- <p>Following tests and checks are available:</p>
- <ul class="simple">
- <li>Unit tests</li>
- <li>Selenium tests</li>
- <li>PEP8 validation</li>
- <li>Unit test coverage check</li>
- </ul>
- <p>For example unit tests are run with the command below:</p>
- <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">./</span><span class="n">manage</span><span class="o">.</span><span class="n">sh</span> <span class="n">unit_tests</span>
- </pre></div>
- </div>
- <p>For further test options, please consult the help of the manage.sh script.</p>
- </div>
- <div class="section" id="how-to-compile-styles-and-javascript">
- <h2>How to compile styles and javascript<a class="headerlink" href="#how-to-compile-styles-and-javascript" title="Permalink to this headline">¶</a></h2>
- <div class="section" id="how-to-build-styles">
- <h3>How to build styles<a class="headerlink" href="#how-to-build-styles" title="Permalink to this headline">¶</a></h3>
- <p>Less is required to build the styles of searx. Less can be installed using either NodeJS or Apt.</p>
- <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">nodejs</span>
- <span class="n">sudo</span> <span class="n">npm</span> <span class="n">install</span> <span class="o">-</span><span class="n">g</span> <span class="n">less</span>
- </pre></div>
- </div>
- <p>OR</p>
- <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">node</span><span class="o">-</span><span class="n">less</span>
- </pre></div>
- </div>
- <p>After satisfying the requirements styles can be build using manage.sh</p>
- <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">./</span><span class="n">manage</span><span class="o">.</span><span class="n">sh</span> <span class="n">styles</span>
- </pre></div>
- </div>
- </div>
- <div class="section" id="how-to-build-the-source-of-the-oscar-theme">
- <h3>How to build the source of the oscar theme<a class="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
- Node has to be installed.</p>
- <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">nodejs</span>
- <span class="n">sudo</span> <span class="n">npm</span> <span class="n">install</span> <span class="o">-</span><span class="n">g</span> <span class="n">grunt</span><span class="o">-</span><span class="n">cli</span>
- </pre></div>
- </div>
- <p>After installing grunt, the files can be built using the following command:</p>
- <div class="code sh highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">./</span><span class="n">manage</span><span class="o">.</span><span class="n">sh</span> <span class="n">build_grunt</span>
- </pre></div>
- </div>
- </div>
- </div>
- <div class="section" id="tips-for-debugging-development">
- <h2>Tips for debugging/development<a class="headerlink" href="#tips-for-debugging-development" title="Permalink to this headline">¶</a></h2>
- <ol class="arabic simple">
- <li><dl class="first docutils">
- <dt>Turn on debug logging</dt>
- <dd>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 <code class="docutils literal notranslate"><span class="pre">Internal</span> <span class="pre">Server</span> <span class="pre">Error</span></code> message. It can be turned on by setting
- <code class="docutils literal notranslate"><span class="pre">debug:</span> <span class="pre">False</span></code> to <code class="docutils literal notranslate"><span class="pre">debug:</span> <span class="pre">True</span></code> in settings.yml.</dd>
- </dl>
- </li>
- <li><dl class="first docutils">
- <dt>Run <code class="docutils literal notranslate"><span class="pre">./manage.sh</span> <span class="pre">tests</span></code> before creating a PR.</dt>
- <dd>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 <code class="docutils literal notranslate"><span class="pre">./manage.sh</span> <span class="pre">tests</span></code> is run
- locally before creating a PR.</dd>
- </dl>
- </li>
- </ol>
- </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="#">Development Quickstart</a><ul>
- <li><a class="reference internal" href="#how-to-setup-your-development-environment">How to setup your development environment</a></li>
- <li><a class="reference internal" href="#how-to-run-tests">How to run tests</a></li>
- <li><a class="reference internal" href="#how-to-compile-styles-and-javascript">How to compile styles and javascript</a><ul>
- <li><a class="reference internal" href="#how-to-build-styles">How to build styles</a></li>
- <li><a class="reference internal" href="#how-to-build-the-source-of-the-oscar-theme">How to build the source of the oscar theme</a></li>
- </ul>
- </li>
- <li><a class="reference internal" href="#tips-for-debugging-development">Tips for debugging/development</a></li>
- </ul>
- </li>
- </ul>
- <div class="sidebar_container body">
- <h1>Searx</h1>
- <ul>
- <li><a href="../index.html">Home</a></li>
- <li><a href="https://github.com/asciimoo/searx">Source</a></li>
- <li><a href="../blog/blog.html">Blog</a></li>
- <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
- <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
- </ul>
- <hr />
- <ul>
- <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
- </ul>
- </div>
- <div role="note" aria-label="source link">
- <h3>This Page</h3>
- <ul class="this-page-menu">
- <li><a href="../_sources/dev/quickstart.rst.txt"
- rel="nofollow">Show Source</a></li>
- </ul>
- </div>
- <div id="searchbox" style="display: none" role="search">
- <h3>Quick search</h3>
- <div class="searchformwrapper">
- <form class="search" action="../search.html" method="get">
- <input type="text" name="q" />
- <input type="submit" value="Go" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
- </div>
- </div>
- <script type="text/javascript">$('#searchbox').show(0);</script>
- </div>
- </div>
- <div class="clearer"></div>
- </div>
- <div class="footer">
- © Copyright 2015-2017, Adam Tauber.
- </div>
- </body>
- </html>
|