summaryrefslogtreecommitdiff
path: root/searx/infopage
AgeCommit message (Collapse)Author
2025-09-03[mod] addition of various type hints / tbcMarkus Heiser
- pyright configuration [1]_ - stub files: types-lxml [2]_ - addition of various type hints - enable use of new type system features on older Python versions [3]_ - ``.tool-versions`` - set python to lowest version we support (3.10.18) [4]_: Older versions typically lack some typing features found in newer Python versions. Therefore, for local type checking (before commit), it is necessary to use the older Python interpreter. .. [1] https://docs.basedpyright.com/v1.20.0/configuration/config-files/ .. [2] https://pypi.org/project/types-lxml/ .. [3] https://typing-extensions.readthedocs.io/en/latest/# .. [4] https://mise.jdx.dev/configuration.html#tool-versions Signed-off-by: Markus Heiser <markus.heiser@darmarit.de> Format: reST
2025-06-23[chore] docs: various grammatical fixesbenpiano800
2025-01-28[refactor] typification of SearXNG (initial) / result items (part 1)Markus Heiser
Typification of SearXNG ======================= This patch introduces the typing of the results. The why and how is described in the documentation, please generate the documentation .. $ make docs.clean docs.live and read the following articles in the "Developer documentation": - result types --> http://0.0.0.0:8000/dev/result_types/index.html The result types are available from the `searx.result_types` module. The following have been implemented so far: - base result type: `searx.result_type.Result` --> http://0.0.0.0:8000/dev/result_types/base_result.html - answer results --> http://0.0.0.0:8000/dev/result_types/answer.html including the type for translations (inspired by #3925). For all other types (which still need to be set up in subsequent PRs), template documentation has been created for the transition period. Doc of the fields used in Templates =================================== The template documentation is the basis for the typing and is the first complete documentation of the results (needed for engine development). It is the "working paper" (the plan) with which further typifications can be implemented in subsequent PRs. - https://github.com/searxng/searxng/issues/357 Answer Templates ================ With the new (sub) types for `Answer`, the templates for the answers have also been revised, `Translation` are now displayed with collapsible entries (inspired by #3925). !en-de dog Plugins & Answerer ================== The implementation for `Plugin` and `Answer` has been revised, see documentation: - Plugin: http://0.0.0.0:8000/dev/plugins/index.html - Answerer: http://0.0.0.0:8000/dev/answerers/index.html With `AnswerStorage` and `AnswerStorage` to manage those items (in follow up PRs, `ArticleStorage`, `InfoStorage` and .. will be implemented) Autocomplete ============ The autocompletion had a bug where the results from `Answer` had not been shown in the past. To test activate autocompletion and try search terms for which we have answerers - statistics: type `min 1 2 3` .. in the completion list you should find an entry like `[de] min(1, 2, 3) = 1` - random: type `random uuid` .. in the completion list, the first item is a random UUID Extended Types ============== SearXNG extends e.g. the request and response types of flask and httpx, a module has been set up for type extensions: - Extended Types --> http://0.0.0.0:8000/dev/extended_types.html Unit-Tests ========== The unit tests have been completely revised. In the previous implementation, the runtime (the global variables such as `searx.settings`) was not initialized before each test, so the runtime environment with which a test ran was always determined by the tests that ran before it. This was also the reason why we sometimes had to observe non-deterministic errors in the tests in the past: - https://github.com/searxng/searxng/issues/2988 is one example for the Runtime issues, with non-deterministic behavior .. - https://github.com/searxng/searxng/pull/3650 - https://github.com/searxng/searxng/pull/3654 - https://github.com/searxng/searxng/pull/3642#issuecomment-2226884469 - https://github.com/searxng/searxng/pull/3746#issuecomment-2300965005 Why msgspec.Struct ================== We have already discussed typing based on e.g. `TypeDict` or `dataclass` in the past: - https://github.com/searxng/searxng/pull/1562/files - https://gist.github.com/dalf/972eb05e7a9bee161487132a7de244d2 - https://github.com/searxng/searxng/pull/1412/files - https://github.com/searxng/searxng/pull/1356 In my opinion, TypeDict is unsuitable because the objects are still dictionaries and not instances of classes / the `dataclass` are classes but ... The `msgspec.Struct` combine the advantages of typing, runtime behaviour and also offer the option of (fast) serializing (incl. type check) the objects. Currently not possible but conceivable with `msgspec`: Outsourcing the engines into separate processes, what possibilities this opens up in the future is left to the imagination! Internally, we have already defined that it is desirable to decouple the development of the engines from the development of the SearXNG core / The serialization of the `Result` objects is a prerequisite for this. HINT: The threads listed above were the template for this PR, even though the implementation here is based on msgspec. They should also be an inspiration for the following PRs of typification, as the models and implementations can provide a good direction. Why just one commit? ==================== I tried to create several (thematically separated) commits, but gave up at some point ... there are too many things to tackle at once / The comprehensibility of the commits would not be improved by a thematic separation. On the contrary, we would have to make multiple changes at the same places and the goal of a change would be vaguely recognizable in the fog of the commits. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-08-20[mod] add French translation for infopageMarkus Heiser
The French translation was provided by @jcarnat in #3738. [3738] https://github.com/searxng/searxng/issues/3738 Co-authored-by: Joel Carnat @jcarnat https://github.com/jcarnat Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-05-28[fix] issues reported by pylint-3.2.2Markus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-11[mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTIONMarkus Heiser
In the past, some files were tested with the standard profile, others with a profile in which most of the messages were switched off ... some files were not checked at all. - ``PYLINT_SEARXNG_DISABLE_OPTION`` has been abolished - the distinction ``# lint: pylint`` is no longer necessary - the pylint tasks have been reduced from three to two 1. ./searx/engines -> lint engines with additional builtins 2. ./searx ./searxng_extra ./tests -> lint all other python files Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-03-08[l10n] Italian translation of infopagescentralscrutinizer21
2024-02-10[clean] drop obsolete py3.7 compatibilityMarkus Heiser
- https://github.com/searxng/searxng/discussions/2356 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-09-21[mod] search-syntax.md: add tutorial about the feeling lucky featureBnyro
2023-09-18[fix] spellingjazzzooo
2023-08-30Create search-syntax.md faJafar Farganlooj
2023-08-30[mod] Persian translation of the about page (fa_IR)Jafar Farganlooj
2023-04-08[fix] minor typo in de/search-syntax pageMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-01-21weblate: migration to https://translate.codeberg.org/Alexandre Flament
2023-01-07[mod] about page: add information about adding enginge to the brownserPrivateLalle
2023-01-07[fix] indentation and line size of the the markdown filesMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-07-02Donation link: default value to searxng.org, can be hidden or customAlexandre Flament
Add a new setting: general.donation_url By default the value is https://docs.searxng.org/donate.html When the value is false, the link is hidden When the value is true, the link goes to the infopage donation, the administrator can create a custom page.
2022-06-29Update searx/infopage/en/donate.mdAlexandre Flament
Co-authored-by: Émilien Devos <contact@emiliendevos.be>
2022-06-29Move donation page to docs.searxng.org and link to it from instancesAlexandre FLAMENT
Close #1378
2022-06-29infopage: a .md file can be remove without crashAlexandre FLAMENT
An administrator might decide to remove some of the .md files. This commit make sure to not crash the application.
2022-06-28Add donate.mdAlexandre Flament
2022-06-25Theme: add Help and Donate links in all pagesAlexandre Flament
Close https://github.com/searxng/searxng/issues/931
2022-06-03[fix] prepare for pylint 2.14.0Markus Heiser
Remove issue reported by Pylint 2.14.0: - no-self-use: has been moved to optional extension [1] - The refactoring checker now also raises 'consider-using-generator' messages for max(), min() and sum(). [2] .pylintrc: - <option name>-hint has been removed since long, Pylint 2.14.0 raises an error on invalid options - bad-continuation and bad-whitespace have been removed [3] [1] https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/summary.html#removed-checkers [2] https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/full.html#what-s-new-in-pylint-2-14-0 [2] https://pylint.pycqa.org/en/latest/whatsnew/2/2.6/summary.html#summary-release-highlights Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-05-28Merge pull request #1249 from Linerly/english-infopageMarkus Heiser
Capitalize website names in search-syntax.md, in the English infopage
2022-05-28Capitalize website namesLinerly
2022-05-28Replace linkLinerly
2022-05-28Capitalize website namesLinerly
2022-05-28Replace English links to Indonesian linksLinerly
2022-05-28[translation] add DE translation of about.md and search-syntax.mdMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-05-27Add Indonesian translations of about.md and search-syntax.mdLinerly
2022-05-07[format.python] based on bugfix in 9ed626130Markus Heiser
2022-04-09Merge pull request #1048 from Linerly/patch-1Alexandre Flament
Improve the about page
2022-04-06[mod] replace Markdown parser mistletoe by markdown-it-pyMarkus Heiser
There are several reasons why we should prefer markdown-it-py over mistletoe: - Get identical rendering results in SearXNG's `/info` pages and the SearXNG's project documentation which is build by Sphinx-doc. In the Sphinx-doc we use the MyST parser to render Markdown and the MyST parser itself is built on top of the markdown-it-py package. - markdown-it-py has a typographer that supports *replacements* and *smartquotes* (e.g. em-dash, copyright, ellipsis, ...) [1] - markdown-it-py is much more flexible compared to mistletoe [2] - markdown-it-py is the fastest CommonMark compliant parser in python [3] [1] https://markdown-it-py.readthedocs.io/en/latest/using.html#typographic-components [2] https://markdown-it-py.readthedocs.io/en/latest/plugins.html [3] https://markdown-it-py.readthedocs.io/en/latest/other.html#performance Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-06Fix spelling and punctuationLinerly
2022-04-06[mod] review of the "Search Syntax" page (en)Markus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-06[mod] review of the "About SearXNG" page (en)Markus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-02Improve the about pageLinerly
2022-03-16Info: code refactoring & bug fixesAlexandre Flament
2022-03-13Various change on PR 930Alexandre Flament
2022-03-12[fix] add module for backward compatibilityMarkus Heiser
cache_property has been added in py3.8 [1] To support cache_property in py3.7 the implementation from 3.8 has been copied to compat.py. This code can be cleanup with EOL of py3.7. [1] https://docs.python.org/3/library/functools.html#functools.cached_property Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-03-12[mod] replace /help by /info pages and include pages in project docsMarkus Heiser
This patch implements a bolierplate to share content from info-pages of the SearXNG instance (URL /info) with the project documentation (path /docs/user). The info pages are using Markdown (CommonMark), to include them in the project documentation (reST) the myst-parser [1] is used in the Sphinx-doc build chain. If base_url is known (defined in settings.yml) links to the instance are also inserted into the project documentation:: searxng_extra/docs_prebuild [1] https://www.sphinx-doc.org/en/master/usage/markdown.html Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>