2017-06-12 12:34:30 +02:00
2019-12-30 18:31:17 +01:00
<!DOCTYPE html>
2016-02-01 21:28:13 +01:00
2020-06-19 11:15:15 +02:00
< html >
2016-02-01 21:28:13 +01:00
< head >
2019-12-30 18:31:17 +01:00
< meta charset = "utf-8" / >
2020-06-19 11:15:15 +02:00
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
2019-12-30 18:31:17 +01:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
2020-02-15 10:08:58 +01:00
< title > Development Quickstart — Searx Documentation (Searx-0.16.0.tex)< / title >
2019-12-30 18:31:17 +01:00
< link rel = "stylesheet" href = "../_static/searx.css" type = "text/css" / >
2016-02-01 21:28:13 +01:00
< link rel = "stylesheet" href = "../_static/pygments.css" type = "text/css" / >
2020-02-15 10:08:58 +01:00
< script id = "documentation_options" data-url_root = "../" src = "../_static/documentation_options.js" > < / script >
< script src = "../_static/jquery.js" > < / script >
< script src = "../_static/underscore.js" > < / script >
< script src = "../_static/doctools.js" > < / script >
< script src = "../_static/language_data.js" > < / script >
2016-11-04 21:56:14 +01:00
< link rel = "index" title = "Index" href = "../genindex.html" / >
< link rel = "search" title = "Search" href = "../search.html" / >
2016-04-21 13:15:04 +02:00
< link rel = "next" title = "How to contribute" href = "contribution_guide.html" / >
2019-12-30 18:31:17 +01:00
< link rel = "prev" title = "Developer documentation" href = "index.html" / >
< script > DOCUMENTATION _OPTIONS . URL _ROOT = '../' ; < / script >
2016-02-01 21:28:13 +01:00
2019-12-30 18:31:17 +01:00
< / head > < body >
< 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 = "contribution_guide.html" title = "How to contribute"
accesskey="N">next< / a > |< / li >
< li class = "right" >
< a href = "index.html" title = "Developer documentation"
accesskey="P">previous< / a > |< / li >
2020-02-15 10:08:58 +01:00
< li class = "nav-item nav-item-0" > < a href = "../index.html" > Searx Documentation (Searx-0.16.0.tex)< / a > » < / li >
2020-06-19 11:15:15 +02:00
< li class = "nav-item nav-item-1" > < a href = "index.html" accesskey = "U" > Developer documentation< / a > » < / li >
< li class = "nav-item nav-item-this" > < a href = "" > Development Quickstart< / a > < / li >
2019-12-30 18:31:17 +01:00
< / ul >
< / div >
2016-02-01 21:28:13 +01:00
< div class = "document" >
< div class = "documentwrapper" >
< div class = "bodywrapper" >
< div class = "body" role = "main" >
< div class = "section" id = "development-quickstart" >
2016-04-21 13:15:04 +02:00
< span id = "devquickstart" > < / span > < h1 > Development Quickstart< a class = "headerlink" href = "#development-quickstart" title = "Permalink to this headline" > ¶< / a > < / h1 >
2019-12-30 18:31:17 +01:00
< div class = "sidebar" >
< p class = "sidebar-title" > < a class = "reference internal" href = "makefile.html#makefile" > < span class = "std std-ref" > Makefile Targets< / span > < / a > < / p >
< p > For additional developer purpose there are < a class = "reference internal" href = "makefile.html#makefile" > < span class = "std std-ref" > Makefile Targets< / span > < / a > .< / p >
< / div >
< p > This quickstart guide gets your environment set up with searx. Furthermore, it
gives a short introduction to the < code class = "docutils literal notranslate" > < span class = "pre" > manage.sh< / span > < / code > script.< / p >
2016-02-01 21:28:13 +01:00
< 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 >
2019-12-30 18:31:17 +01:00
< div class = "sidebar" >
< p class = "sidebar-title" > < a class = "reference internal" href = "makefile.html#make-pyenv" > < span class = "std std-ref" > make pyenv< / span > < / a > < / p >
< p > Alternatively use the < a class = "reference internal" href = "makefile.html#make-pyenv" > < span class = "std std-ref" > Python environment< / span > < / a > .< / p >
< / div >
< p > First, clone the source code of searx to the desired folder. In this case the
source is cloned to < code class = "docutils literal notranslate" > < span class = "pre" > ~/myprojects/searx< / span > < / code > . Then create and activate the
searx-ve virtualenv and install the required packages using < code class = "docutils literal notranslate" > < span class = "pre" > manage.sh< / span > < / code > .< / p >
< div class = "highlight-sh notranslate" > < div class = "highlight" > < pre > < span > < / span > < span class = "nb" > cd< / span > ~/myprojects
git clone https://github.com/asciimoo/searx.git
< span class = "nb" > cd< / span > searx
2020-06-19 11:15:15 +02:00
python3 -m venv searx-ve
2019-12-30 18:31:17 +01:00
. ./searx-ve/bin/activate
./manage.sh update_dev_packages
2016-02-01 21:28:13 +01:00
< / 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 >
2019-12-30 18:31:17 +01:00
< div class = "sidebar" >
< p class = "sidebar-title" > < a class = "reference internal" href = "makefile.html#make-test" > < span class = "std std-ref" > make test.unit< / span > < / a > < / p >
< p > Alternatively use the < code class = "docutils literal notranslate" > < span class = "pre" > test.pep8< / span > < / code > , < code class = "docutils literal notranslate" > < span class = "pre" > test.unit< / span > < / code > , < code class = "docutils literal notranslate" > < span class = "pre" > test.robot< / span > < / code > targets.< / p >
< / div >
< p > Tests can be run using the < code class = "docutils literal notranslate" > < span class = "pre" > manage.sh< / span > < / code > script. Following tests and checks are
available:< / p >
2016-02-01 21:28:13 +01:00
< ul class = "simple" >
2019-12-30 18:31:17 +01:00
< li > < p > Unit tests< / p > < / li >
< li > < p > Selenium tests< / p > < / li >
< li > < p > PEP8 validation< / p > < / li >
< li > < p > Unit test coverage check< / p > < / li >
2016-02-01 21:28:13 +01:00
< / ul >
< p > For example unit tests are run with the command below:< / p >
2019-12-30 18:31:17 +01:00
< div class = "highlight-sh notranslate" > < div class = "highlight" > < pre > < span > < / span > ./manage.sh unit_tests
2016-02-01 21:28:13 +01:00
< / pre > < / div >
< / div >
2019-12-30 18:31:17 +01:00
< p > For further test options, please consult the help of the < code class = "docutils literal notranslate" > < span class = "pre" > manage.sh< / span > < / code > script or
read < a class = "reference internal" href = "makefile.html#make-test" > < span class = "std std-ref" > make test< / span > < / a > .< / p >
2016-02-01 21:28:13 +01:00
< / 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 >
2019-12-30 18:31:17 +01:00
< p > < a class = "reference external" href = "http://lesscss.org/" > Less< / a > is required to build the styles of searx. < a class = "reference external" href = "http://lesscss.org/" > Less< / a > can be installed using
either < a class = "reference external" href = "https://nodejs.org" > NodeJS< / a > or Apt.< / p >
< div class = "highlight-sh notranslate" > < div class = "highlight" > < pre > < span > < / span > sudo -H apt-get install nodejs
sudo -H npm install -g less
2016-02-01 21:28:13 +01:00
< / pre > < / div >
< / div >
< p > OR< / p >
2019-12-30 18:31:17 +01:00
< div class = "highlight-sh notranslate" > < div class = "highlight" > < pre > < span > < / span > sudo -H apt-get install node-less
2016-02-01 21:28:13 +01:00
< / pre > < / div >
< / div >
2019-12-30 18:31:17 +01:00
< p > After satisfying the requirements styles can be build using < code class = "docutils literal notranslate" > < span class = "pre" > manage.sh< / span > < / code > < / p >
< div class = "highlight-sh notranslate" > < div class = "highlight" > < pre > < span > < / span > ./manage.sh styles
2016-02-01 21:28:13 +01:00
< / pre > < / div >
< / div >
< / div >
2019-12-30 18:31:17 +01:00
< / div >
2020-06-19 11:15:15 +02:00
< div class = "section" id = "how-to-build-the-source-of-the-themes" >
< h2 > How to build the source of the themes< a class = "headerlink" href = "#how-to-build-the-source-of-the-themes" title = "Permalink to this headline" > ¶< / a > < / h2 >
2019-12-30 18:31:17 +01:00
< p > < a class = "reference external" href = "https://gruntjs.com/" > Grunt< / a > must be installed in order to build the javascript sources. It depends on
NodeJS, so first Node has to be installed.< / p >
< div class = "highlight-sh notranslate" > < div class = "highlight" > < pre > < span > < / span > sudo -H apt-get install nodejs
2020-06-19 11:15:15 +02:00
make node.env
2016-02-01 21:28:13 +01:00
< / pre > < / div >
< / div >
< p > After installing grunt, the files can be built using the following command:< / p >
2020-06-19 11:15:15 +02:00
< div class = "highlight-sh notranslate" > < div class = "highlight" > < pre > < span > < / span > make themes
2016-02-01 21:28:13 +01:00
< / pre > < / div >
< / div >
< / div >
2016-04-21 13:15:04 +02:00
< 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 >
2019-12-30 18:31:17 +01:00
< div class = "sidebar" >
< p class = "sidebar-title" > < a class = "reference internal" href = "makefile.html#make-run" > < span class = "std std-ref" > make run< / span > < / a > < / p >
< p > Makefile target < code class = "docutils literal notranslate" > < span class = "pre" > run< / span > < / code > already enables debug option for your developer
session / see < a class = "reference internal" href = "makefile.html#make-run" > < span class = "std std-ref" > make run< / span > < / a > .< / p >
< / div >
< dl class = "simple" >
< dt > Turn on debug logging< / dt > < dd > < p > 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
2020-04-19 12:57:50 +02:00
< a class = "reference external" href = "https://github.com/asciimoo/searx/blob/master/searx/settings.yml" > settings.yml< / a > .< / p >
2019-12-30 18:31:17 +01:00
< / dd >
2016-04-21 13:15:04 +02:00
< / dl >
2019-12-30 18:31:17 +01:00
< div class = "sidebar" >
< p class = "sidebar-title" > < a class = "reference internal" href = "makefile.html#make-test" > < span class = "std std-ref" > make test< / span > < / a > < / p >
< p > Alternatively use the < a class = "reference internal" href = "makefile.html#make-test" > < span class = "std std-ref" > make test< / span > < / a > targets.< / p >
< / div >
< dl class = "simple" >
< 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 > < p > 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.< / p >
< / dd >
2016-04-21 13:15:04 +02:00
< / dl >
< / div >
2016-02-01 21:28:13 +01:00
< / div >
2020-06-19 11:15:15 +02:00
< div class = "clearer" > < / div >
2016-02-01 21:28:13 +01:00
< / div >
< / div >
< / div >
2019-12-30 18:31:17 +01:00
< span id = "sidebar-top" > < / span >
2016-02-01 21:28:13 +01:00
< div class = "sphinxsidebar" role = "navigation" aria-label = "main navigation" >
2019-12-30 18:31:17 +01:00
< div class = "sphinxsidebarwrapper" >
< p class = "logo" > < a href = "../index.html" >
< img class = "logo" src = "../_static/searx_logo_small.png" alt = "Logo" / >
< / a > < / p >
< h3 > Project Links< / h3 >
< ul >
2020-04-19 12:57:50 +02:00
< li > < a href = "https://github.com/asciimoo/searx" > Source< / a >
2019-12-30 18:31:17 +01:00
< li > < a href = "https://github.com/asciimoo/searx/wiki" > Wiki< / a >
2020-02-15 10:08:58 +01:00
< li > < a href = "https://searx.space/" > Public instances< / a >
2019-12-30 18:31:17 +01:00
< li > < a href = "https://twitter.com/Searx_engine" > Twitter< / a >
< / ul > < h3 > Navigation< / h3 >
2016-02-01 21:28:13 +01:00
< ul >
2019-12-30 18:31:17 +01:00
< li > < a href = "../index.html" > Overview< / a >
< ul >
< li > < a href = "index.html" > Developer documentation< / a >
< ul >
< li > Previous: < a href = "index.html" title = "previous chapter" > Developer documentation< / a >
< li > Next: < a href = "contribution_guide.html" title = "next chapter" > How to contribute< / a > < / ul >
< / li >
< / ul >
< / li >
2016-02-01 21:28:13 +01:00
< / ul >
2019-12-30 18:31:17 +01:00
< div id = "searchbox" style = "display: none" role = "search" >
< h3 id = "searchlabel" > Quick search< / h3 >
< div class = "searchformwrapper" >
< form class = "search" action = "../search.html" method = "get" >
< input type = "text" name = "q" aria-labelledby = "searchlabel" / >
< input type = "submit" value = "Go" / >
< / form >
< / div >
2016-02-01 21:28:13 +01:00
< / div >
2020-02-15 10:08:58 +01:00
< script > $ ( '#searchbox' ) . show ( 0 ) ; < / script >
2016-02-01 21:28:13 +01:00
< / div >
< / div >
< div class = "clearer" > < / div >
< / div >
2019-12-30 18:31:17 +01:00
< div class = "footer" role = "contentinfo" >
2020-02-20 19:32:55 +01:00
© Copyright 2015-2020, Adam Tauber, Noémi Ványi.
2020-06-19 11:15:15 +02:00
Created using < a href = "https://www.sphinx-doc.org/" > Sphinx< / a > 3.1.1.
2016-02-01 21:28:13 +01:00
< / div >
2020-02-15 10:08:58 +01:00
< script src = "../_static/version_warning_offset.js" > < / script >
2019-12-30 18:31:17 +01:00
2016-02-01 21:28:13 +01:00
< / body >
< / html >