generated from fastai/nbdev_template
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Pre-commit * modify CI * modify make file * temporarily disable codespell * update make file * update contribution guide * pushc changes
- Loading branch information
Showing
7 changed files
with
68 additions
and
36 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,42 @@ | ||
repos: | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: | ||
- --profile=black | ||
- --skip-glob=wandb/**/* | ||
- --thirdparty=wandb | ||
- repo: https://github.com/myint/autoflake | ||
rev: v1.4 | ||
hooks: | ||
- id: autoflake | ||
args: | ||
- -r | ||
- --exclude=wandb,__init__.py | ||
- --in-place | ||
- --remove-unused-variables | ||
- --remove-all-unused-imports | ||
- repo: https://github.com/python/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
args: | ||
- --line-length=119 | ||
- --target-version=py38 | ||
- --exclude=wandb | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
args: | ||
- --ignore=E203,E501,W503,E128 | ||
- --max-line-length=119 | ||
|
||
# - repo: https://github.com/codespell-project/codespell | ||
# rev: v2.1.0 | ||
# hooks: | ||
# - id: codespell | ||
# args: | ||
# - --ignore-words-list=nd,reacher,thist,ths,magent,ba | ||
# - --skip=docs/css/termynal.css,docs/js/termynal.js |
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 |
---|---|---|
@@ -1,15 +1,9 @@ | ||
.PHONY: quality style test | ||
.PHONY: test precommit | ||
|
||
check_dirs := examples tests trl | ||
|
||
test: | ||
python -m pytest -n auto --dist=loadfile -s -v ./tests/ | ||
|
||
quality: | ||
black --check --line-length 119 --target-version py38 $(check_dirs) | ||
isort --check-only $(check_dirs) | ||
flake8 $(check_dirs) | ||
|
||
style: | ||
black --line-length 119 --target-version py38 $(check_dirs) | ||
isort $(check_dirs) | ||
precommit: | ||
pre-commit run --all-files |
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
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