Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix liniting errors and update lint workflow #82

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading