From 068e74e826948b51d0bcc1ebb22ece6b056d77be Mon Sep 17 00:00:00 2001 From: Vishnu Challa Date: Wed, 18 Dec 2024 10:11:14 -0500 Subject: [PATCH] Fix liniting errors and update lint workflow Signed-off-by: Vishnu Challa --- .github/workflows/pylint.yaml | 1 - .github/workflows/tests.yaml | 1 - orion.py | 2 +- pkg/config.py | 3 +-- requirements.txt | 1 + 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pylint.yaml b/.github/workflows/pylint.yaml index 267f7eb..59da43d 100644 --- a/.github/workflows/pylint.yaml +++ b/.github/workflows/pylint.yaml @@ -23,7 +23,6 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pylint pip install -r requirements.txt - name: Analysing the code with pylint diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 15f31f5..e4ab27b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -34,7 +34,6 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pylint pip install -r requirements.txt pip install . diff --git a/orion.py b/orion.py index d9a21b9..3690213 100644 --- a/orion.py +++ b/orion.py @@ -124,7 +124,7 @@ def cmd_analysis(**kwargs): logger_instance = SingletonLogger(debug=level, name="Orion") logger_instance.info("🏹 Starting Orion in command-line mode") if len(kwargs["ack"]) > 1 : - kwargs["ackMap"] = load_ack(kwargs["ack"]) + kwargs["ackMap"] = load_ack(kwargs["ack"]) kwargs["configMap"] = load_config(kwargs["config"]) output, regression_flag = run(**kwargs) if output is None: diff --git a/pkg/config.py b/pkg/config.py index de8a17d..69c4791 100644 --- a/pkg/config.py +++ b/pkg/config.py @@ -55,6 +55,7 @@ def load_config(config: str, parameters: Dict= None) -> Dict[str, Any]: return rendered_config def load_ack(ack: str) -> Dict[str,Any]: + "Loads acknowledgment file content." logger_instance = SingletonLogger.getLogger("Orion") try: with open(ack, "r", encoding="utf-8") as template_file: @@ -67,8 +68,6 @@ def load_ack(ack: str) -> Dict[str,Any]: logger_instance.error("An error occurred: %s", e) sys.exit(1) - required_parameters = get_template_variables(template_content) - rendered_config = yaml.safe_load(template_content) return rendered_config diff --git a/requirements.txt b/requirements.txt index c36cce9..4e3031d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,3 +18,4 @@ python-multipart==0.0.9 scikit-learn==1.5.0 scipy==1.12.0 uvicorn==0.28.0 +pylint==3.3.2