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

(#150) add pre commit to pyelastica #151

Merged
merged 8 commits into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from 5 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
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
default_language_version:
python: python3.8
bhosale2 marked this conversation as resolved.
Show resolved Hide resolved

default_stages: [commit, push]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: trailing-whitespace
- id: check-json
- id: check-yaml
- id: end-of-file-fixer
exclude: LICENSE

- repo: local
hooks:
- id: formatting
name: formatting
entry: make formatting
types: [python]
language: system
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ poetry-remove:
install:
poetry lock -n && poetry export --without-hashes > requirements.txt
poetry install -n
make pre-commit-install

.PHONY: pre-commit-install
pre-commit-install:
poetry run pre-commit install

#* Formatters
.PHONY: black
Expand Down Expand Up @@ -79,4 +84,4 @@ cleanup: pycache-remove dsstore-remove ipynbcheckpoints-remove pytestcache-remov

all: format-codestyle cleanup test

ci: check-codestyle
ci: check-codestyle
105 changes: 102 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ moviepy = {version = "^1.0.3", optional = true, extras = ["examples"]}
black = "21.12b0"
pytest = "^7.1.1"
coverage = "^6.3.3"
pre-commit = "^2.19.0"
pytest-html = "^3.1.1"
pytest-cov = "^3.0.0"
flake8 = "3.8.3"
Expand Down