contribution_guide.rst 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. =================
  2. How to contribute
  3. =================
  4. Prime directives: Privacy, Hackability
  5. ======================================
  6. Searx has two prime directives, **privacy-by-design and hackability** . The
  7. hackability comes in three levels:
  8. - support of search engines
  9. - plugins to alter search behaviour
  10. - hacking searx itself
  11. Note the lack of "world domination" among the directives. Searx has no
  12. intention of wide mass-adoption, rounded corners, etc. The prime directive
  13. "privacy" deserves a separate chapter, as it's quite uncommon unfortunately.
  14. Privacy-by-design
  15. -----------------
  16. Searx was born out of the need for a **privacy-respecting** search tool which
  17. can be extended easily to maximize both, its search and its privacy protecting
  18. capabilities.
  19. A few widely used features work differently or turned off by default or not
  20. implemented at all **as a consequence of privacy-by-design**.
  21. If a feature reduces the privacy preserving aspects of searx, it should be
  22. switched off by default or should not implemented at all. There are plenty of
  23. search engines already providing such features. If a feature reduces the
  24. protection of searx, users must be informed about the effect of choosing to
  25. enable it. Features that protect privacy but differ from the expectations of
  26. the user should also be explained.
  27. Also, if you think that something works weird with searx, it's might be because
  28. of the tool you use is designed in a way to interfere with the privacy respect.
  29. Submitting a bugreport to the vendor of the tool that misbehaves might be a good
  30. feedback to reconsider the disrespect to its customers (e.g. ``GET`` vs ``POST``
  31. requests in various browsers).
  32. Remember the other prime directive of searx is to be hackable, so if the above
  33. privacy concerns do not fancy you, simply fork it.
  34. *Happy hacking.*
  35. Code
  36. ====
  37. .. _PEP8: https://www.python.org/dev/peps/pep-0008/
  38. In order to submit a patch, please follow the steps below:
  39. - Follow coding conventions.
  40. - PEP8_ standards apply, except the convention of line length
  41. - Maximum line length is 120 characters
  42. - Check if your code breaks existing tests. If so, update the tests or fix your
  43. code.
  44. - If your code can be unit-tested, add unit tests.
  45. - Add yourself to the :origin:`AUTHORS.rst` file.
  46. - Create a pull request.
  47. For more help on getting started with searx development, see :ref:`devquickstart`.
  48. Translation
  49. ===========
  50. Translation currently takes place on :ref:`transifex <translation>`.
  51. .. caution::
  52. Please, do not update translation files in the repo.
  53. Documentation
  54. =============
  55. .. _Sphinx: http://www.sphinx-doc.org
  56. .. _reST: http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
  57. .. sidebar:: The reST sources
  58. has been moved from ``gh-branch`` into ``master`` (:origin:`docs`).
  59. The documentation is built using Sphinx_. So in order to be able to generate
  60. the required files, you have to install it on your system. Much easier, use
  61. Makefile our targets.
  62. Here is an example which makes a complete rebuild:
  63. .. code:: sh
  64. $ make docs-clean docs
  65. ...
  66. The HTML pages are in dist/docs.
  67. live build
  68. ----------
  69. .. sidebar:: docs-clean
  70. It is recommended to assert a complete rebuild before deploying (use
  71. ``docs-clean``).
  72. Live build is like WYSIWYG, If you want to edit the documentation, its
  73. recommended to use. The Makefile target ``docs-live`` builds the docs, opens URL
  74. in your favorite browser and rebuilds every time a reST file has been changed.
  75. .. code:: sh
  76. $ make docs-live
  77. ...
  78. The HTML pages are in dist/docs.
  79. ... Serving on http://0.0.0.0:8080
  80. ... Start watching changes
  81. deploy on github.io
  82. -------------------
  83. To deploy documentation at :docs:`github.io <.>` use Makefile target
  84. ``gh-pages``, which will builds the documentation, clones searx into a sub
  85. folder ``gh-pages``, cleans it, copies the doc build into and runs all the
  86. needed git add, commit and push:
  87. .. code:: sh
  88. $ make docs-clean gh-pages
  89. ...
  90. SPHINX docs --> file://<...>/dist/docs
  91. The HTML pages are in dist/docs.
  92. ...
  93. Cloning into 'gh-pages' ...
  94. ...
  95. cd gh-pages; git checkout gh-pages >/dev/null
  96. Switched to a new branch 'gh-pages'
  97. ...
  98. doc available at --> https://asciimoo.github.io/searx