Skip to content

Commit

Permalink
Fix liniting errors and update lint workflow (#82)
Browse files Browse the repository at this point in the history
Signed-off-by: Vishnu Challa <[email protected]>
Co-authored-by: Vishnu Challa <[email protected]>
  • Loading branch information
vishnuchalla and Vishnu Challa authored Dec 18, 2024
1 parent bdf773e commit 9be6b3c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 15 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/builders.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: Builders
on:
workflow_call:
workflow_dispatch:
pull_request_target:
branches:
- master
- main
jobs:
build:
runs-on: ubuntu-latest
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pylint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ name: Pylint
on:
workflow_call:
workflow_dispatch:
pull_request_target:
branches:
- master
- main
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
Expand All @@ -23,7 +24,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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
file-install: false

- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}
Expand All @@ -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 .
Expand Down
2 changes: 1 addition & 1 deletion orion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions pkg/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9be6b3c

Please sign in to comment.