| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 | 
							- <!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>Development Quickstart — searx 0.9.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">
 -       var DOCUMENTATION_OPTIONS = {
 -         URL_ROOT:    '../',
 -         VERSION:     '0.9.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="searx 0.9.0 documentation" href="../index.html" />
 -     <link rel="next" title="How to contribute" href="contribution_guide.html" />
 -     <link rel="prev" title="Administration API" href="../admin/api.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 role="document">  
 - 
 -     <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"><div class="highlight"><pre><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"><div class="highlight"><pre><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"><div class="highlight"><pre><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"><div class="highlight"><pre><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"><div class="highlight"><pre><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"><div class="highlight"><pre><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"><div class="highlight"><pre><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">
 - <li><dl class="first docutils">
 - <dt>Turn on debug logging</dt>
 - <dd><p class="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 <code class="docutils literal"><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"><span class="pre">debug:</span> <span class="pre">False</span></code> to <code class="docutils literal"><span class="pre">debug:</span> <span class="pre">True</span></code> in settings.yml.</p>
 - </dd>
 - </dl>
 - </li>
 - <li><dl class="first docutils">
 - <dt>Run <code class="docutils literal"><span class="pre">./manage.sh</span> <span class="pre">tests</span></code> before creating a PR.</dt>
 - <dd><p class="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 <code class="docutils literal"><span class="pre">./manage.sh</span> <span class="pre">tests</span></code> is run
 - locally before creating a PR.</p>
 - </dd>
 - </dl>
 - </li>
 - </ol>
 - </div>
 - </div>
 - 
 - 
 -           </div>
 -         </div>
 -       </div>
 -       <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
 -         <div class="sphinxsidebarwrapper"><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="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>
 -     <li><a href="https://flattr.com/submit/auto?user_id=asciimoo&url=https://github.com/asciimoo/searx&title=searx&language=&tags=github&category=software">Flattr</a></li>
 -     <li><a href="https://gratipay.com/searx">Gratipay</a></li>
 - </ul>
 - </div>
 -         </div>
 -       </div>
 -       <div class="clearer"></div>
 -     </div>
 -     <div class="footer">
 -       © Copyright 2015-2016, Adam Tauber.
 -     </div>
 -   </body>
 - </html>
 
 
  |