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 precommit #2790

Merged
merged 7 commits into from
Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 35 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml

- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.31.0
arunppsg marked this conversation as resolved.
Show resolved Hide resolved
hooks:
- id: yapf

- repo: https://gitlab.com/PyCQA/flake8
rev: 3.8.4
hooks:
- id: flake8
args: [--count]

- repo: local
SauravMaheshkar marked this conversation as resolved.
Show resolved Hide resolved
hooks:
- id: pytest-check
name: pytest-check
types: [python]
entry: pytest -v -m 'slow'
language: system
pass_filenames: false
always_run: true

- repo: https://github.com/pre-commit/mirrors-mypy
arunppsg marked this conversation as resolved.
Show resolved Hide resolved
rev: v0.790
hooks:
- id: mypy
args: [--ignore-missing-imports]
1 change: 1 addition & 0 deletions env.common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- rdkit
- mdtraj
- numpy==1.19.*
- pre-commit
- pip==20.2.*
- pip:
- biopython
Expand Down
1 change: 1 addition & 0 deletions env.cpu.mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ dependencies:
- -f https://pytorch-geometric.com/whl/torch-1.8.1.html
- -f https://pytorch-geometric.com/whl/torch-1.8.0+cpu.html
- dgl==0.6.*
- pre-commit
- torch==1.8.1
- torchvision==0.9.1
- torch-scatter==2.0.8
Expand Down
1 change: 1 addition & 0 deletions env.cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ dependencies:
- -f https://download.pytorch.org/whl/torch_stable.html
- -f https://pytorch-geometric.com/whl/torch-1.8.0+cpu.html
- dgl==0.6.*
- pre-commit
- torch==1.8.1+cpu
- torchvision==0.9.1+cpu
- torch-scatter==2.0.8
Expand Down
1 change: 1 addition & 0 deletions env.gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ dependencies:
- -f https://download.pytorch.org/whl/torch_stable.html
- -f https://pytorch-geometric.com/whl/torch-1.8.1+cu111.html
- dgl-cu110==0.6.*
- pre-commit
- torch==1.8.1+cu111
- torchvision==0.9.1+cu111
- torch-scatter==2.0.8
Expand Down
1 change: 1 addition & 0 deletions env.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ dependencies:
- flake8
- flaky
- mypy
- pre-commit
- pytest
- pytest-cov
- types-setuptools
Expand Down