From 016ab5c1e87fa86b5e618616e1dd9d49d880c506 Mon Sep 17 00:00:00 2001 From: Noemi Vanyi Date: Mon, 1 Feb 2016 21:28:13 +0100 Subject: add development quickstart --- docs/dev/quickstart.rst | 90 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 docs/dev/quickstart.rst (limited to 'docs/dev/quickstart.rst') diff --git a/docs/dev/quickstart.rst b/docs/dev/quickstart.rst new file mode 100644 index 000000000..edca8af5e --- /dev/null +++ b/docs/dev/quickstart.rst @@ -0,0 +1,90 @@ +Development Quickstart +---------------------- + +This quickstart guide gets your environment set up with searx. Furthermore, it gives a +short introduction to the new manage.sh script. + +How to setup your development environment +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +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. + +.. code:: sh + + cd ~/myprojects + git clone https://github.com/asciimoo/searx.git + cd searx + virtualenv searx-ve + . ./searx-ve/bin/activate + ./manage.sh update_dev_packages + + +How to run tests +~~~~~~~~~~~~~~~~ + +Tests can be run using the manage.sh script. + +Following tests and checks are available: + +- Unit tests + +- Selenium tests + +- PEP8 validation + +- Unit test coverage check + +For example unit tests are run with the command below: + +.. code:: sh + + ./manage.sh unit_tests + +For further test options, please consult the help of the manage.sh script. + + +How to compile styles and javascript +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +How to build styles +^^^^^^^^^^^^^^^^^^^ + +Less is required to build the styles of searx. Less can be installed using either NodeJS or Apt. + +.. code:: sh + + sudo apt-get install nodejs + sudo npm install -g less + + +OR + +.. code:: sh + + sudo apt-get install node-less + +After satisfying the requirements styles can be build using manage.sh + +.. code:: sh + + ./manage.sh styles + + +How to build the source of the oscar theme +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Grunt must be installed in order to build the javascript sources. It depends on NodeJS, so first +Node has to be installed. + +.. code:: sh + + sudo apt-get install nodejs + sudo npm install -g grunt-cli + +After installing grunt, the files can be built using the following command: + +.. code:: sh + + ./manage.sh build_grunt -- cgit v1.2.3 From 9c56154cfe121c6b89f48dd6b9af4e5e029d8a6e Mon Sep 17 00:00:00 2001 From: Noemi Vanyi Date: Thu, 21 Apr 2016 13:15:04 +0200 Subject: add dev tips to quickstart --- docs/dev/quickstart.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'docs/dev/quickstart.rst') diff --git a/docs/dev/quickstart.rst b/docs/dev/quickstart.rst index edca8af5e..92ef62385 100644 --- a/docs/dev/quickstart.rst +++ b/docs/dev/quickstart.rst @@ -1,3 +1,5 @@ +.. _devquickstart: + Development Quickstart ---------------------- @@ -88,3 +90,19 @@ After installing grunt, the files can be built using the following command: .. code:: sh ./manage.sh build_grunt + + + +Tips for debugging/development +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Turn on debug logging + 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 ``Internal Server Error`` message. It can be turned on by setting + ``debug: False`` to ``debug: True`` in settings.yml. + +2. Run ``./manage.sh tests`` before creating a PR. + 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 ``./manage.sh tests`` is run + locally before creating a PR. -- cgit v1.2.3 From 94af140318338ab6e7b064b3b26b5fb45523d17a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Bourrel?= Date: Thu, 30 Aug 2018 11:14:03 +0200 Subject: Update quickstart.rst Rename `build_grunt` to `grunt_build` as in manage.sh --- docs/dev/quickstart.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/dev/quickstart.rst') diff --git a/docs/dev/quickstart.rst b/docs/dev/quickstart.rst index 92ef62385..e7d4baf46 100644 --- a/docs/dev/quickstart.rst +++ b/docs/dev/quickstart.rst @@ -89,7 +89,7 @@ After installing grunt, the files can be built using the following command: .. code:: sh - ./manage.sh build_grunt + ./manage.sh grunt_build -- cgit v1.2.3