From a30160cb77a7ba5a2ac1a2f347e9295932961aaf Mon Sep 17 00:00:00 2001 From: Didier Barzin Date: Fri, 24 Feb 2023 14:21:34 +0100 Subject: [PATCH 1/3] poetry update and workers --- install.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/install.sh b/install.sh index 21f4b61..a140910 100755 --- a/install.sh +++ b/install.sh @@ -121,16 +121,8 @@ wget http://cdn.download.comodo.com/av/updates58/sigs/bases/bases.cav -O /opt/CO # Configure workers # su - $SUDO_USER -c 'cd pandora; for file in pandora/workers/*.sample; do cp -i ${file} ${file%%.sample}; done' -# Disable all workers -su - $SUDO_USER -c 'cd pandora && mkdir pandora/workers/disabled && mv pandora/workers/*.sample pandora/workers/*.py pandora/workers/disabled' - -# select some workers -su - $SUDO_USER -c 'cd pandora; cp pandora/workers/disabled/base.* pandora/workers' -su - $SUDO_USER -c 'cd pandora; cp pandora/workers/disabled/clamav.* pandora/workers' -su - $SUDO_USER -c 'cd pandora; cp pandora/workers/disabled/extractor.* pandora/workers' - # Update Pandora -su - $SUDO_USER -c 'cd pandora; poetry run update --yes' +su - $SUDO_USER -c 'cd pandora; ../.local/bin/poetry run update --yes' #--------------------- # Pandora-box From 0250164f010cad53330031a2b478dc4ecfa58d3a Mon Sep 17 00:00:00 2001 From: Didier Barzin Date: Sat, 25 Feb 2023 11:17:41 +0100 Subject: [PATCH 2/3] Flake8 --- .github/workflows/ci.yml | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14829d8..ab0a977 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,27 +1,23 @@ -name: Continuous Integration +name: flake8 Lint -on: - push: - branches: - - main - pull_request: - branches: [main] +on: [push, pull_request] jobs: - - qa: - name: Quality check - runs-on: ubuntu-latest + flake8-lint: + runs-on: ubuntu-latest + name: Lint steps: - - name: Checkout + - name: Check out source repository uses: actions/checkout@v3 - - - name: Set up Python + - name: Set up Python environment uses: actions/setup-python@v4 - - - name: code quality checkout - run: | - pip install pyudev psutil pypandora - pip install pylint - pylint ./pandora-box.py - + with: + python-version: "3.11" + - name: flake8 Lint + uses: py-actions/flake8@v2 + with: + exclude: "test/*" + max-line-length: "128" + path: "." + plugins: "flake8-bugbear==22.1.11 flake8-black" + From 1eb35962ee5dd7863e31fb47c6515614a299b2db Mon Sep 17 00:00:00 2001 From: Didier Barzin Date: Sat, 25 Feb 2023 11:18:47 +0100 Subject: [PATCH 3/3] exclude tests --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab0a977..d381547 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: flake8 Lint uses: py-actions/flake8@v2 with: - exclude: "test/*" + exclude: "tests/*" max-line-length: "128" path: "." plugins: "flake8-bugbear==22.1.11 flake8-black"