This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from dpriskorn/prepare_for_0.3.1
Prepare for 0.3.1
- Loading branch information
Showing
21 changed files
with
937 additions
and
79 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: lint_python | ||
on: [pull_request, push] | ||
jobs: | ||
lint_python: | ||
runs-on: ubuntu-latest | ||
env: | ||
ia_sandbox: ${{ secrets.ia_sandbox }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
cache: 'poetry' | ||
- run: pip install --upgrade pip wheel | ||
- run: poetry install --with=dev | ||
- run: poetry run bandit --recursive --skip B301,B105,B403,B311,B101,B324 src # B101 is assert statements | ||
- run: poetry run black --check . | ||
- run: poetry run codespell # --ignore-words-list="" --skip="*.css,*.js,*.lock" | ||
- run: poetry run flake8 --ignore=C408,C416,E203,F401,F541,R501,R502,R503,R504,W503 | ||
--max-complexity=21 --max-line-length=162 --show-source --statistics . | ||
- run: poetry run isort --check-only --profile black . | ||
- run: mkdir --parents --verbose .mypy_cache | ||
- run: poetry run mypy --ignore-missing-imports --install-types --non-interactive . | ||
- run: cp config/__init__example.py config/__init__.py | ||
- run: poetry run pytest --exitfirst . | ||
- run: shopt -s globstar && poetry run pyupgrade --keep-runtime-typing --py37-plus **/*.py | ||
- run: poetry run safety check |
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,63 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: black | ||
name: black | ||
language: system | ||
entry: black . | ||
pass_filenames: false | ||
#types: [python] | ||
|
||
- id: codespell | ||
name: codespell | ||
language: system | ||
entry: codespell | ||
types: [python] | ||
|
||
- id: bandit | ||
name: bandit | ||
language: system | ||
entry: bandit --recursive --skip B301,B105,B403,B311,B101,B324 src # B101 is assert statements | ||
# types: [python] | ||
pass_filenames: false | ||
|
||
|
||
- id: isort | ||
name: isort | ||
language: system | ||
entry: isort | ||
args: ["--profile", "black", "--filter-files"] | ||
types: [python] | ||
|
||
- id: pyupgrade | ||
name: pyupgrade | ||
language: system | ||
entry: pyupgrade | ||
args: ["--keep-runtime-typing", "--py37-plus"] | ||
types: [python] | ||
|
||
# https://flake8.pycqa.org/en/latest/user/using-hooks.html | ||
- id: flake8 | ||
name: flake8 | ||
language: system | ||
entry: flake8 | ||
args: ["--ignore=C408,C416,E203,F401,F541,R501,R502,R503,R504,W503", | ||
"--max-complexity=21", "--max-line-length=162", "--show-source", | ||
"--statistics"] | ||
types: [ python ] | ||
|
||
- id: safety | ||
name: safety | ||
language: system | ||
entry: safety | ||
args: ["check"] | ||
pass_filenames: false | ||
|
||
- id: pytest | ||
name: pytest | ||
language: system | ||
entry: pytest | ||
args: ["--durations=10", "--exitfirst"] | ||
# see https://stackoverflow.com/questions/64011304/running-pytest-as-a-pre-commit-hook-no-such-file-or-directory-issue | ||
pass_filenames: false | ||
|
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
File renamed without changes.
Oops, something went wrong.