Commit graph

5900 commits

Author SHA1 Message Date
Martin Fischer cac0352986 [mod] remove .nvm_packages, add eslint to package.json 2022-01-23 08:00:39 +01:00
Martin Fischer 6d701d2fea [fix] ensure that test.pyright installs pyright
nodejs.ensure only sets up NVM if there isn't a system-wide
installation of Node that matches our NODE_MINIMUM_VERSION.

The ubuntu image in the CI comes with an up to date node version,
so pyright from .nvm_packages is never installed.

This commit fixes this by introducing a package.json file.
2022-01-23 08:00:39 +01:00
Martin Fischer 96450b17d4 [mod] add test.pyright to test & ci.test targets
Since we currently have many type checking errors,
we for now only test with typeCheckingMode: off
which makes pyright only check files that contain a comment:

    # pyright: basic

to enable basic type checking, or

    # pyright: strict

to enable strict type checking.
2022-01-23 08:00:39 +01:00
Martin Fischer 3cd5ce55e8 [enh] clarify why we run pyright in the pyenv 2022-01-23 08:00:39 +01:00
Markus Heiser aaf616fbd6 [emacs] .dir-locals.el: activate pyright in python-mode
To get in use of pyright type cheker in Emacs, a pyright installation [1] is
needed and in Emacs the lsp-pyright package has to be installed::

    M-x package-install lsp-pyright

[1] https://github.com/Microsoft/pyright
[2] https://github.com/emacs-lsp/lsp-pyright

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-23 08:00:39 +01:00
Markus Heiser 8342773216 [mod] manage test.pyright: a commandline to run pyright tests
This patch implements the command and Makefile target::

    ./manage test.pyright
    make test.pyright

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-23 08:00:39 +01:00
Markus Heiser 5d9188c7e9 [mod] add pyright to nvm's node installation
Pyright [1] is in the nvm enviroment, may be you need to rebuild the nvm
environment and install nodejs in::

    ./manage nvm.clean
    ./manage nvm.nodejs

The last command installs nodejs and the packages from .nvm_packages.

You can test your pyright installation, to get a bash within the nvm run::

   ./manage nvm.bash

   (nvm) $ which pyright
   ./.nvm/versions/node/v16.13.0/bin/pyright

If you have a local nvm in your HOME folder, the output from ``which`` is
different.  Press ``[CTRL-D]`` to get out of this bash.

[1] https://github.com/microsoft/pyright

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-23 08:00:39 +01:00
Markus Heiser 87c8c5fd1b [fix] pyrightconfig.json include only dedicated folders in the test
Without specifying folders to check, pyright will also scan files in folders
like ./build, ./cache, ./.nvm and more.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-23 08:00:39 +01:00
Martin Fischer 5ce3091837 [enh] add pyrightconfig.json
By adding this file Pyright automatically detects the
packages from our Python virtual environment.

This can be tested by using the Pyright extension
for VS Code or by running npx pyright.
2022-01-23 08:00:39 +01:00
spalinger 6acc5b474f
[fix] url 2022-01-23 02:55:17 +01:00
Markus Heiser a163385474 [mod] lib_nvm.sh: minor improvements / no functional change
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-22 19:57:25 +01:00
Alexandre Flament 382f4f8fb0
Merge pull request #801 from dalf/fix-checker
[fix] checker: fix image fetch
2022-01-22 19:29:29 +01:00
Monty 80530befdc [build] /static 2022-01-22 17:23:43 +01:00
Monty 91ca5d1613 Changed preferences icon to settings icon in gruntfile 2022-01-22 17:14:19 +01:00
Alexandre Flament 5439dd5fb1 [fix] checker: fix image fetch
Since https://github.com/searxng/searxng/pull/354
the searx.network.stream(...) returns a tuple

This commits update the checker code according to
this function signature change.
2022-01-22 16:11:42 +01:00
Alexandre Flament f01ddd1932
Merge pull request #775 from return42/redis-4.1.1
Revert "[hotfix] interim fix to get docker-build of CI without issues"
2022-01-22 15:56:15 +01:00
Allen b8c98c4c0d [enh] Add autocompleter from Brave
Raw response example: https://search.brave.com/api/suggest?q=how%20to:%20with%20j

Headers are needed in order to get a 200 response, thus Searx user-agent is used.

Other URL param could be  '&rich=false' or  '&rich=true'.

Cherry-pick: 71786bf9cb
2022-01-21 14:39:10 +01:00
Markus Heiser f3d4b25e73
Merge pull request #795 from searxng/dependabot/pip/master/sphinx-4.4.0
Bump sphinx from 4.3.2 to 4.4.0
2022-01-21 10:06:21 +01:00
Markus Heiser bd4cdde70d [docs] fix some warnings from Sphinx-doc update 4.3.2 to 4.4.0
With Sphinx-doc update 4.4.0 we get some warnings about links that can be
replaced by already defined 'sphinx.ext.extlinks':

    admin/engines/sql-engines.rst:144: WARNING: hardcoded link 'https://pypi.org/project/mysql-connector-python' could be replaced by an extlink (try using ':pypi:`mysql-connector-python`' instead)
    docs/admin/installation-switch2ng.rst:10: WARNING: hardcoded link 'https://github.com/searxng/searxng/pull/446#issuecomment-954730358' could be replaced by an extlink (try using ':pull:`446#issuecomment-954730358`' instead)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-21 09:35:00 +01:00
Markus Heiser f0ee5103fe
Merge pull request #796 from searxng/translations_update
Update translations
2022-01-21 08:31:49 +01:00
searxng-bot 9b3122a84e [translations] update from Weblate
f3f70b7d - 2022-01-20 - Genghis Khan <genghiskhan@gmx.ca>
c66d23fb - 2022-01-15 - Linerly <linerly@protonmail.com>
c2b9f7f7 - 2022-01-18 - Markus Heiser <markus.heiser@darmarit.de>
159ec416 - 2022-01-18 - Markus Heiser <markus.heiser@darmarit.de>
8184a23b - 2022-01-17 - lucky13820 <hello@ryanyao.design>
c4b476d4 - 2022-01-18 - Go2SheeP <allen.ccccnm@gmail.com>
eaf18ed5 - 2022-01-17 - Markus Heiser <markus.heiser@darmarit.de>
e7fec156 - 2022-01-18 - Markus Heiser <markus.heiser@darmarit.de>
99368a91 - 2022-01-18 - Markus Heiser <markus.heiser@darmarit.de>
a8b23af9 - 2022-01-19 - Markus Heiser <markus.heiser@darmarit.de>
7af1ba21 - 2022-01-17 - Genghis Khan <genghiskhan@gmx.ca>
0af5a3ee - 2022-01-15 - Alexandre Flament <alex@al-f.net>
a448183b - 2022-01-14 - Markus Heiser <markus.heiser@darmarit.de>
ea4f95cf - 2022-01-19 - Markus Heiser <markus.heiser@darmarit.de>
2f3e7ac9 - 2022-01-17 - Iosevka <iosevka@protonmail.com>
c28ae5a8 - 2022-01-17 - Markus Heiser <markus.heiser@darmarit.de>
b664bd3b - 2022-01-17 - Pham Nguyen <akizminet@gmail.com>
2022-01-21 07:16:40 +00:00
dependabot[bot] 0dd5f5a830
Bump sphinx from 4.3.2 to 4.4.0
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 4.3.2 to 4.4.0.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/4.x/CHANGES)
- [Commits](https://github.com/sphinx-doc/sphinx/compare/v4.3.2...v4.4.0)

---
updated-dependencies:
- dependency-name: sphinx
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-21 07:04:53 +00:00
Martin Fischer 96a1f79c6d
Merge pull request #773 from not-my-profile/typing
More typing
2022-01-18 16:28:32 +01:00
Markus Heiser db6f617c0f
Merge pull request #781 from return42/fix-google
[fix] google engine: remove adds and fix mobile_ui selector
2022-01-18 16:27:56 +01:00
Markus Heiser edfbf94481
Merge pull request #782 from return42/fix-sh-issues
[fix] issues reported by and fix documentation of test.shell
2022-01-18 13:36:37 +01:00
Markus Heiser 1a0760c10a [fix] googel engine - "some results are invalids: invalid content"
Fix google issues listet in the `/stats?engine=google` and message::

    some results are invalids: invalid content

The log is::

    DEBUG   searx                         : result: invalid content: {'url': 'https://de.wikipedia.org/wiki/Foo', 'title': 'Foo - Wikipedia', 'content': None, 'engine': 'google'}
    WARNING searx.engines.google          : ErrorContext('searx/search/processors/abstract.py', 111, 'result_container.extend(self.engine_name, search_results)', None, 'some results are invalids: invalid content', ()) True

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-18 13:23:35 +01:00
Markus Heiser f910c0b3ee [fix] typo 'test.sh' in the docs/dev/makefile.rst to 'test.shell'
make test.sh --> make test.shell

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-18 12:30:32 +01:00
Markus Heiser fea9ad7927 [fix] issue reported by: make test.shell
$ make test.shell
    ./manage line 716:
    build_msg TEST "[reST markup] ${RST_FILES[@]}""
                                  ^-------------^ SC2145: Argument mixes string and array. Use * or separate argument.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-18 12:27:42 +01:00
Markus Heiser f0102a95c9 [fix] google engine: remove adds and fix mobile_ui selector
1. Fix issue reported in comment [1]
2. Fix XPath selector for the response of google's mobile UI, reported in
   comment [2]

[1] https://github.com/searxng/searxng/pull/777#issuecomment-1015121322
[2] https://github.com/searxng/searxng/pull/777#issuecomment-1015236238

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-18 11:05:45 +01:00
Alexandre Flament b972df255a
Merge pull request #776 from mrpaulblack/simple-ltr-vars
[simple theme] dont hardcode border radius
2022-01-18 07:56:03 +01:00
Alexandre Flament a94ab32b92
Merge pull request #777 from unixfox/patch-4
Update XPath for Google engine
2022-01-18 07:52:03 +01:00
Émilien Devos 6670063e0d
Update XPath for Google engine 2022-01-17 21:49:57 +00:00
mrpaulblack 6c1a64d4b3 [build] /static 2022-01-17 22:35:22 +01:00
mrpaulblack 7a0f5e6b19 [simple theme] dynamic border radius in CSS 2022-01-17 22:35:02 +01:00
Markus Heiser e85744c254 Revert "[hotfix] interim fix to get docker-build of CI without issues"
This reverts interim fix from commit 50c4b58db and adds requirement
`redis==4.1.1`.

The interim fix was needed by Alpine images (Docker) [1] and has been fixed in
commit [2] merged with the patch series from [3].  In redis-py version 4.1.1
this pach has been released on PyPi [4].

[1] https://github.com/redis/redis-py/issues/1869
[2] https://github.com/redis/redis-py/commit/1fc1233f
[3] https://github.com/redis/redis-py/pull/1854
[4] https://github.com/redis/redis-py/issues/1880

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-17 18:03:29 +01:00
Martin Fischer 96655cbd4e [typing] add type hints to webapp.py 2022-01-17 11:42:48 +01:00
Martin Fischer 193b0efd12 [typing] add results.UnresponsiveEngine 2022-01-17 11:42:48 +01:00
Martin Fischer 0c6a09cae3 [refactor] remove never used parameter 2022-01-17 11:42:48 +01:00
Martin Fischer def62c3a47 [typing] add type hints for dictionaries 2022-01-17 11:42:48 +01:00
Martin Fischer 6d43cf7952 [typing] add optional attrs to Plugin 2022-01-17 11:42:48 +01:00
Martin Fischer fdf562bc32 [typing] add results.Timing 2022-01-17 11:42:48 +01:00
Martin Fischer 1ed618222f [typing] add ExtendedRequest
webapp.py monkey-patches the Flask request global.
This commit adds a type cast so that e.g. Pyright[1]
doesn't show "Cannot access member" errors everywhere.

[1]: https://github.com/microsoft/pyright
2022-01-17 11:18:17 +01:00
Markus Heiser 96ab5e57ff
Merge pull request #622 from return42/switch2ng
[docs] Switch from searx to SearXNG
2022-01-17 10:22:08 +01:00
Markus Heiser 4577444ec4 [docs] Switch from searx to SearXNG
Closes: https://github.com/searxng/searxng/issues/450
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-17 10:05:13 +01:00
Markus Heiser 10f8763ac3
Merge pull request #760 from searxng/update-readme
[mod] update README.rst / differences to searx
2022-01-17 09:48:56 +01:00
Markus Heiser 27e3e56800 [mod] CI target test.rst: test reST markup of README.rst
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-01-17 09:35:42 +01:00
Alexandre Flament f88dec444b [mod] update README.rst / differences to searx
* add "Differences to searx" section
* normalize some reST markup & trailing whitespace
* Use `===` and `----` to markup chapters & sections (like we use in other
  documentations).

Co-authored-by: Markus Heiser <markus.heiser@darmarit.de>
Co-authored-by: Alexandre Flament <alex@al-f.net>
2022-01-17 09:34:42 +01:00
Alexandre Flament 0c036ae294
Merge pull request #750 from dalf/simple-rtl
Simple theme: implement RTL
2022-01-16 20:29:34 +01:00
Alexandre Flament e07417848f
Merge pull request #695 from return42/fix-sp
[fix] startpage engine / modified API
2022-01-16 20:27:36 +01:00
Alexandre Flament 468619abcb [build] /static 2022-01-16 18:52:46 +01:00