Skip to content

Commit

Permalink
Fix github pre-commit action using incomplete python env (#8)
Browse files Browse the repository at this point in the history
- Make github action env completely match installation instructions in readme
- Configure duplicate code threshold to be less harsh
  • Loading branch information
joeloskarsson authored Feb 1, 2024
1 parent 474bad9 commit 1cddf09
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run pre-commit in blueprint
name: Run pre-commit job

on:
push:
Expand All @@ -9,7 +9,7 @@ on:
- main

jobs:
blueprint-pre-commit:
pre-commit-job:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -19,10 +19,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11.7
python-version: 3.9
- name: Install pre-commit hooks
run: |
pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 \
--index-url https://download.pytorch.org/whl/cpu
pip install -r requirements.txt
pip install pyg-lib==0.2.0 torch-scatter==2.1.1 torch-sparse==0.6.17 \
torch-cluster==1.6.1 torch-geometric==2.3.1 \
-f https://pytorch-geometric.com/whl/torch-2.0.1+cpu.html
- name: Run pre-commit hooks
run: |
pre-commit run --all-files
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,5 @@ disable = [
max-statements=100 # Allow for some more involved functions
[tool.pylint.IMPORTS]
allow-any-import-level="neural_lam"
[tool.pylint.SIMILARITIES]
min-similarity-lines=10

0 comments on commit 1cddf09

Please sign in to comment.