From ce53b12b5a2d3daa41140f2da50c0bd57834c8c8 Mon Sep 17 00:00:00 2001 From: Liora Milbaum Date: Mon, 1 Apr 2024 17:10:20 +0300 Subject: [PATCH] Cleanup the code Signed-off-by: Liora Milbaum --- .github/workflows/chatbot.yaml | 6 ++++++ .github/workflows/model_servers.yaml | 6 ++++++ recipes/natural_language_processing/chatbot/Makefile | 3 --- .../chatbot/tests/conftest.py | 12 +++--------- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/chatbot.yaml b/.github/workflows/chatbot.yaml index 60e924f2..c02abb59 100644 --- a/.github/workflows/chatbot.yaml +++ b/.github/workflows/chatbot.yaml @@ -4,9 +4,15 @@ on: pull_request: branches: - main + # paths: + # - ./recipes/natural_language_processing/chatbot/** + # - .github/workflows/chatbot.yaml push: branches: - main + # paths: + # - ./recipes/natural_language_processing/chatbot/** + # - .github/workflows/chatbot.yaml env: REGISTRY: ghcr.io diff --git a/.github/workflows/model_servers.yaml b/.github/workflows/model_servers.yaml index f27e7d26..8a2e5f8a 100644 --- a/.github/workflows/model_servers.yaml +++ b/.github/workflows/model_servers.yaml @@ -4,9 +4,15 @@ on: pull_request: branches: - main + # paths: + # - ./model_servers/llamacpp_python/** + # - .github/workflows/model_servers.yaml push: branches: - main + # paths: + # - ./model_servers/llamacpp_python/** + # - .github/workflows/model_servers.yaml env: REGISTRY: ghcr.io diff --git a/recipes/natural_language_processing/chatbot/Makefile b/recipes/natural_language_processing/chatbot/Makefile index a8cd4c7e..dcf335e1 100644 --- a/recipes/natural_language_processing/chatbot/Makefile +++ b/recipes/natural_language_processing/chatbot/Makefile @@ -29,9 +29,6 @@ quadlet: .PHONY: install install: - # wget -qO- https://github.com/mozilla/geckodriver/releases/download/v0.34.0/geckodriver-v0.34.0-linux64.tar.gz | tar xvz - # sudo apt update - # sudo apt upgrade wget https://www.slimjetbrowser.com/chrome/files/103.0.5060.53/google-chrome-stable_current_amd64.deb sudo dpkg -i google-chrome-stable_current_amd64.deb wget https://chromedriver.storage.googleapis.com/103.0.5060.53/chromedriver_linux64.zip diff --git a/recipes/natural_language_processing/chatbot/tests/conftest.py b/recipes/natural_language_processing/chatbot/tests/conftest.py index 6002d715..e2b77c1a 100644 --- a/recipes/natural_language_processing/chatbot/tests/conftest.py +++ b/recipes/natural_language_processing/chatbot/tests/conftest.py @@ -48,18 +48,12 @@ def pytest_addoption(parser): pytest_container.add_logging_level_options(parser) @pytest.fixture -def firefox_options(firefox_options): - firefox_options.headless = True - firefox_options.set_preference("webdriver.log.file", "/tmp/driver.log") - return firefox_options +def chrome_options(chrome_options): + chrome_options.add_argument("--headless") + return chrome_options @pytest.fixture def custom_selenium(selenium, firefox_options): selenium.webdriver = webdriver.Firefox(firefox_options=firefox_options) yield selenium selenium.webdriver.quit() - -@pytest.fixture -def chrome_options(chrome_options): - chrome_options.add_argument("--headless") - return chrome_options