diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0934d0d..6923878 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,53 +1,61 @@ # See https://pre-commit.com/ for usage and config repos: -- repo: local - hooks: - - id: isort - name: isort - stages: [commit] - language: system - entry: pipenv run isort - types: [python] - - - id: black - name: black - stages: [commit] - language: system - entry: pipenv run black - types: [python] - - - id: flake8 - name: flake8 - stages: [commit] - language: system - entry: pipenv run flake8 - types: [python] - exclude: setup.py - - - id: mypy - name: mypy - stages: [commit] - language: system - entry: pipenv run mypy - types: [python] - require_serial: true - - - id: pytest - name: pytest - stages: [commit] - language: system - # https://github.com/pytest-dev/pytest/issues/5502#issuecomment-1020761655 - # Prevent Pytest logging error like: ValueError: I/O operation on closed file. - entry: pipenv run pytest --cov --cov-report html --html=./build/.pytest_report/report.html --self-contained-html --log-cli-level=DEBUG -n auto - types: [python] - pass_filenames: false - - - id: pytest-cov - name: pytest - stages: [push] - language: system - # https://github.com/pytest-dev/pytest/issues/5502#issuecomment-1020761655 - # Prevent Pytest logging error like: ValueError: I/O operation on closed file. - entry: pipenv run pytest --cov --cov-fail-under=85 --capture=no --log-cli-level=INFO -n auto - types: [python] - pass_filenames: false + # https://github.com/pre-commit/pre-commit-hooks/releases/tag/v4.3.0 + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.3.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: mixed-line-ending + args: [ --fix, lf ] + - id: check-yaml + - id: debug-statements + - id: name-tests-test + args: [ --pytest-test-first ] + - id: detect-private-key + - repo: local + hooks: + - id: isort + name: isort + stages: [ commit ] + language: system + entry: pipenv run isort + types: [ python ] + - id: black + name: black + stages: [ commit ] + language: system + entry: pipenv run black + types: [ python ] + - id: flake8 + name: flake8 + stages: [ commit ] + language: system + entry: pipenv run flake8 + types: [ python ] + exclude: setup.py + - id: mypy + name: mypy + stages: [ commit ] + language: system + entry: pipenv run mypy + types: [ python ] + require_serial: true + - id: pytest + name: pytest + stages: [ commit ] + language: system + # https://github.com/pytest-dev/pytest/issues/5502#issuecomment-1020761655 + # Prevent Pytest logging error like: ValueError: I/O operation on closed file. + entry: pipenv run pytest --cov --cov-report html --html=./build/.pytest_report/report.html --self-contained-html --log-cli-level=DEBUG -n auto + types: [ python ] + pass_filenames: false + - id: pytest-cov + name: pytest + stages: [ push ] + language: system + # https://github.com/pytest-dev/pytest/issues/5502#issuecomment-1020761655 + # Prevent Pytest logging error like: ValueError: I/O operation on closed file. + entry: pipenv run pytest --cov --cov-fail-under=85 --capture=no --log-cli-level=INFO -n auto + types: [ python ] + pass_filenames: false diff --git a/setup.cfg b/setup.cfg index b4a9c08..10fccb9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,15 @@ +[metadata] +name = python_boilerplate +version = 3.0.0 +description = A boilerplate project for Python. +long_description = file: README.md +long_description_content_type = text/markdown +url = https://github.com/johnnymillergh/python_boilerplate +author = Johnny Miller +author_email = johnnysviva@outlook.com +license = Apache License 2.0 +license_file = LICENSE + [flake8] ignore = E203, E266, E501, W503 ; PEP 8 - Maximum Line Length, https://peps.python.org/pep-0008/#maximum-line-length