-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compliance with strict mypy, better style in visualize module, pre-co…
…mmits, code quality workflow (#3) * STYLE: linting with ruff, fixing mypy issues * GIT: ruff workflow * STYLE: type annotations for Visualize module, and mypy fixes * GIT: modify code qual workflow * GIT: modify workflow pt2 * GIT: modify workflow pt3 * GIT: pre-commits * GIT: update qual workflow * GIT: local black was outdated * GIT: add type stubs for deps * GIT: type ignore import of lightning * GIT: lmao at rdkit having null bytes * GIT: add reqs and update workflow * GIT: typo in dep version * DOCS: add ruff badge to readme
- Loading branch information
1 parent
f66e682
commit c5f8f6d
Showing
24 changed files
with
897 additions
and
832 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Code Quality | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
qualitycheck: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install numpy==1.24.3 torch==2.3.0 rdkit==2023.09.3 pyyaml==6.0 | ||
pip install pytest pytest-cov lightning==2.2.5 pycairo==1.26.0 cairosvg==2.7.1 | ||
pip install mypy black isort ruff types-requests types-tqdm types-PyYAML | ||
- name : Run ruff | ||
run: ruff check | ||
- name: Run black | ||
run: black --check . | ||
- name: Run isort | ||
run: isort --check --profile black . | ||
- name: Run mypy | ||
run: mypy --strict . --exclude=tests | ||
|
||
- name: Run tests | ||
run: pytest -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
default_language_version: | ||
python: python3.11 | ||
|
||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.4.7 | ||
hooks: | ||
- id: ruff | ||
args: [ --fix ] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 24.4.2 | ||
hooks: | ||
- id: black | ||
types: [python] | ||
args: [--check] | ||
|
||
- repo: local | ||
hooks: | ||
- id: isort | ||
name: isort | ||
entry: isort | ||
language: system | ||
types: [python] | ||
args: [--check,--profile=black] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.