From 4988f2b43c744453989b56a7ca9eba169f2aa4f9 Mon Sep 17 00:00:00 2001 From: Markus Petke Date: Wed, 6 Sep 2023 14:12:13 +0200 Subject: [PATCH] fix linter, add requirements --- .github/workflows/ci.yml | 1 + pantaris_integration/src/gen_desired_state.py | 5 ++--- pantaris_integration/test/integration/integration_test.py | 4 ++-- pantaris_integration/test/requirements.txt | 1 + pantaris_integration/test/test_gen_desired_state.py | 3 ++- 5 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 pantaris_integration/test/requirements.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77877675..97eed7fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -246,6 +246,7 @@ jobs: run: | sudo curl -L https://github.com/eclipse-velocitas/cli/releases/latest/download/velocitas-linux-x64 -o /usr/bin/velocitas sudo chmod +x /usr/bin/velocitas + pip install -r pantaris_integration/test/requirements.txt - name: Init velocitas project run: | diff --git a/pantaris_integration/src/gen_desired_state.py b/pantaris_integration/src/gen_desired_state.py index 1c988c7d..03c8d167 100644 --- a/pantaris_integration/src/gen_desired_state.py +++ b/pantaris_integration/src/gen_desired_state.py @@ -13,13 +13,12 @@ # SPDX-License-Identifier: Apache-2.0 import argparse -import json import hashlib +import json import re -import requests - from typing import Any, Dict, List +import requests import velocitas_lib import velocitas_lib.services diff --git a/pantaris_integration/test/integration/integration_test.py b/pantaris_integration/test/integration/integration_test.py index db2f7fef..261bd385 100644 --- a/pantaris_integration/test/integration/integration_test.py +++ b/pantaris_integration/test/integration/integration_test.py @@ -12,10 +12,10 @@ # # SPDX-License-Identifier: Apache-2.0 -from pathlib import Path -import subprocess import json import os +import subprocess +from pathlib import Path def test_output(): diff --git a/pantaris_integration/test/requirements.txt b/pantaris_integration/test/requirements.txt new file mode 100644 index 00000000..805eb2a9 --- /dev/null +++ b/pantaris_integration/test/requirements.txt @@ -0,0 +1 @@ +pytest==7.2.1 diff --git a/pantaris_integration/test/test_gen_desired_state.py b/pantaris_integration/test/test_gen_desired_state.py index 9e07b4b9..37ebf112 100644 --- a/pantaris_integration/test/test_gen_desired_state.py +++ b/pantaris_integration/test/test_gen_desired_state.py @@ -12,12 +12,13 @@ # # SPDX-License-Identifier: Apache-2.0 +from pathlib import Path + from pantaris_integration.src.gen_desired_state import ( get_md5_for_file, get_md5_from_uri, is_uri, ) -from pathlib import Path def test_get_md5_for_file():