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

Add linter #25

Merged
merged 7 commits into from
Oct 17, 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
42 changes: 42 additions & 0 deletions .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Pylint

on:
push:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Install dependencies
run: |
sudo apt update
python -m pip install --upgrade --no-cache-dir pip setuptools
python -m pip install --exists-action=w --no-cache-dir -r requirements1.txt
python -m pip install --exists-action=w --no-cache-dir -r requirements2.txt
python -m pip install --exists-action=w --no-cache-dir -r docs/requirements.txt
python -m pip install --upgrade --upgrade-strategy eager --no-cache-dir .
- name: Set PYTHONPATH
run: |
echo "PYTHONPATH=$PYTHONPATH:$(pwd)/src" >> $GITHUB_ENV

- name: Run Pylint Models
run: pylint models_builder
- name: Run Pylint defense
run: pylint defense
- name: Run Pylint attacks
run: pylint attacks
- name: Run Pylint aux
run: pylint aux
- name: Run Pylint explainers
run: pylint explainers

1 change: 1 addition & 0 deletions requirements2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ patsy
packaging
opt-einsum
pandas==2.2.0
pylint

torch_geometric==2.3.1
Loading