Loading .dir-locals.el +8 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,10 @@ ;; Jedi, flycheck & other python stuff should use the 'python-shell-interpreter' ;; from the local py3 environment. ;; ;; For pyright support you need to install:: ;; ;; M-x package-install lsp-pyright ;; ;; Other useful jedi stuff you might add to your ~/.emacs:: ;; ;; (global-set-key [f6] 'flycheck-mode) Loading Loading @@ -104,7 +108,10 @@ (python-mode . ((eval . (progn ;; use nodejs from the (local) NVM environment (see nvm-dir) (nvm-use-for-buffer) (if (featurep 'lsp-pyright) (lsp)) (setq-local python-environment-virtualenv (list (expand-file-name "bin/virtualenv" python-shell-virtualenv-root) ;;"--system-site-packages" Loading .gitignore +4 −1 Original line number Diff line number Diff line # to sync with .dockerignore # to sync with .dockerignore & pyrightconfig.json *.pyc */*.pyc Loading @@ -16,3 +16,6 @@ dist/ local/ gh-pages/ *.egg-info/ /package-lock.json /node_modules/ .nvm_packagesdeleted 100644 → 0 +0 −8 Original line number Diff line number Diff line # -*- coding: utf-8; mode: conf-unix -*- # # Developement tools pre-installed in NVM's node installation [1] # # [1] https://github.com/nvm-sh/nvm#default-global-packages-from-file-while-installing eslint Makefile +3 −3 Original line number Diff line number Diff line Loading @@ -50,8 +50,8 @@ search.checker.%: install $(Q)./manage pyenv.cmd searx-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))" PHONY += test ci.test test.shell ci.test: test.yamllint test.black test.pylint test.unit test.robot test.rst test: test.yamllint test.black test.pylint test.unit test.robot test.rst test.shell ci.test: test.yamllint test.black test.pyright test.pylint test.unit test.robot test.rst test: test.yamllint test.black test.pyright test.pylint test.unit test.robot test.rst test.shell test.shell: $(Q)shellcheck -x -s dash \ dockerfiles/docker-entrypoint.sh Loading Loading @@ -86,7 +86,7 @@ MANAGE += py.build py.clean MANAGE += pyenv pyenv.install pyenv.uninstall MANAGE += pypi.upload pypi.upload.test MANAGE += format.python MANAGE += test.yamllint test.pylint test.black test.unit test.coverage test.robot test.rst test.clean MANAGE += test.yamllint test.pylint test.pyright test.black test.unit test.coverage test.robot test.rst test.clean MANAGE += themes.all themes.oscar themes.simple themes.simple.test pygments.less MANAGE += static.build.commit static.build.drop static.build.restore MANAGE += nvm.install nvm.clean nvm.status nvm.nodejs Loading manage +19 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ source "$(dirname "${BASH_SOURCE[0]}")/utils/lib_go.sh" # shellcheck source=utils/lib_redis.sh source "$(dirname "${BASH_SOURCE[0]}")/utils/lib_redis.sh" PATH="${REPO_ROOT}/node_modules/.bin:${PATH}" # config PYOBJECTS="searx" Loading Loading @@ -103,6 +105,7 @@ format.: test.: yamllint : lint YAML files (YAMLLINT_FILES) pylint : lint PYLINT_FILES, searx/engines, searx & tests pyright : static type check of python sources black : check black code format unit : run unit tests coverage : run unit tests with coverage Loading Loading @@ -558,6 +561,12 @@ node.env() { dump_return $? } node.env.devtools() { nodejs.ensure build_msg INSTALL "package.json: developer and CI tools" npm install } node.clean() { if ! required_commands npm 2>/dev/null; then build_msg CLEAN "npm is not installed / ignore npm dependencies" Loading Loading @@ -682,6 +691,16 @@ test.pylint() { dump_return $? } test.pyright() { build_msg TEST "[pyright] static type check of python sources" node.env.devtools # We run Pyright in the virtual environment because Pyright # executes "python" to determine the Python version. pyenv.cmd npx --no-install pyright -p pyrightconfig-ci.json dump_return $? } test.black() { build_msg TEST "[black] \$BLACK_TARGETS" pyenv.cmd black --check --diff "${BLACK_OPTIONS[@]}" "${BLACK_TARGETS[@]}" Loading Loading
.dir-locals.el +8 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,10 @@ ;; Jedi, flycheck & other python stuff should use the 'python-shell-interpreter' ;; from the local py3 environment. ;; ;; For pyright support you need to install:: ;; ;; M-x package-install lsp-pyright ;; ;; Other useful jedi stuff you might add to your ~/.emacs:: ;; ;; (global-set-key [f6] 'flycheck-mode) Loading Loading @@ -104,7 +108,10 @@ (python-mode . ((eval . (progn ;; use nodejs from the (local) NVM environment (see nvm-dir) (nvm-use-for-buffer) (if (featurep 'lsp-pyright) (lsp)) (setq-local python-environment-virtualenv (list (expand-file-name "bin/virtualenv" python-shell-virtualenv-root) ;;"--system-site-packages" Loading
.gitignore +4 −1 Original line number Diff line number Diff line # to sync with .dockerignore # to sync with .dockerignore & pyrightconfig.json *.pyc */*.pyc Loading @@ -16,3 +16,6 @@ dist/ local/ gh-pages/ *.egg-info/ /package-lock.json /node_modules/
.nvm_packagesdeleted 100644 → 0 +0 −8 Original line number Diff line number Diff line # -*- coding: utf-8; mode: conf-unix -*- # # Developement tools pre-installed in NVM's node installation [1] # # [1] https://github.com/nvm-sh/nvm#default-global-packages-from-file-while-installing eslint
Makefile +3 −3 Original line number Diff line number Diff line Loading @@ -50,8 +50,8 @@ search.checker.%: install $(Q)./manage pyenv.cmd searx-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))" PHONY += test ci.test test.shell ci.test: test.yamllint test.black test.pylint test.unit test.robot test.rst test: test.yamllint test.black test.pylint test.unit test.robot test.rst test.shell ci.test: test.yamllint test.black test.pyright test.pylint test.unit test.robot test.rst test: test.yamllint test.black test.pyright test.pylint test.unit test.robot test.rst test.shell test.shell: $(Q)shellcheck -x -s dash \ dockerfiles/docker-entrypoint.sh Loading Loading @@ -86,7 +86,7 @@ MANAGE += py.build py.clean MANAGE += pyenv pyenv.install pyenv.uninstall MANAGE += pypi.upload pypi.upload.test MANAGE += format.python MANAGE += test.yamllint test.pylint test.black test.unit test.coverage test.robot test.rst test.clean MANAGE += test.yamllint test.pylint test.pyright test.black test.unit test.coverage test.robot test.rst test.clean MANAGE += themes.all themes.oscar themes.simple themes.simple.test pygments.less MANAGE += static.build.commit static.build.drop static.build.restore MANAGE += nvm.install nvm.clean nvm.status nvm.nodejs Loading
manage +19 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ source "$(dirname "${BASH_SOURCE[0]}")/utils/lib_go.sh" # shellcheck source=utils/lib_redis.sh source "$(dirname "${BASH_SOURCE[0]}")/utils/lib_redis.sh" PATH="${REPO_ROOT}/node_modules/.bin:${PATH}" # config PYOBJECTS="searx" Loading Loading @@ -103,6 +105,7 @@ format.: test.: yamllint : lint YAML files (YAMLLINT_FILES) pylint : lint PYLINT_FILES, searx/engines, searx & tests pyright : static type check of python sources black : check black code format unit : run unit tests coverage : run unit tests with coverage Loading Loading @@ -558,6 +561,12 @@ node.env() { dump_return $? } node.env.devtools() { nodejs.ensure build_msg INSTALL "package.json: developer and CI tools" npm install } node.clean() { if ! required_commands npm 2>/dev/null; then build_msg CLEAN "npm is not installed / ignore npm dependencies" Loading Loading @@ -682,6 +691,16 @@ test.pylint() { dump_return $? } test.pyright() { build_msg TEST "[pyright] static type check of python sources" node.env.devtools # We run Pyright in the virtual environment because Pyright # executes "python" to determine the Python version. pyenv.cmd npx --no-install pyright -p pyrightconfig-ci.json dump_return $? } test.black() { build_msg TEST "[black] \$BLACK_TARGETS" pyenv.cmd black --check --diff "${BLACK_OPTIONS[@]}" "${BLACK_TARGETS[@]}" Loading