-
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.
- Loading branch information
Showing
39 changed files
with
8,308 additions
and
0 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,12 @@ | ||
[flake8] | ||
count = true | ||
docstring-convention = "google" | ||
exclude = ".git,__pycache__,docs,build,dist,.venv,.github" | ||
filename = "*py" | ||
ignore = "E4,E501" | ||
max-complexity = 10 | ||
max-line-length = 80 | ||
require-plugins = "flake8-docstrings" | ||
show-source = true | ||
statistics = true | ||
tee = true |
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,75 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Run tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.9", "3.10"] | ||
os: [ubuntu-18.04, macOS-latest, windows-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run poetry image | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.1.13 | ||
- name: Install dependencies | ||
run: | | ||
poetry install | ||
- name: Run tests | ||
run: | | ||
poetry run pytest --cov=pystatis tests | ||
code-quality: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.10.2] | ||
poetry-version: [1.1.13] | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run poetry image | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
- name: Install dependencies | ||
run: poetry install | ||
- name: Run black | ||
run: poetry run black . --check | ||
- name: Run isort | ||
run: poetry run isort . --check-only | ||
- name: Run flake8 | ||
run: poetry run flake8 src --output-file=flake8_report.txt | ||
- name: Run pylint | ||
run: poetry run pylint src --recursive=y | ||
- name: Run bandit | ||
run: poetry run bandit -r src | ||
- name: Run safety | ||
run: poetry run safety check | ||
- name: Run mypy | ||
run: poetry run mypy src |
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 |
---|---|---|
|
@@ -127,3 +127,7 @@ dmypy.json | |
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
|
||
# VSC | ||
.vscode |
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,31 @@ | ||
exclude: "(doc|dist)" | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 # Use the ref you want to point at | ||
hooks: | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: trailing-whitespace | ||
args: [--markdown-linebreak-ext=md] | ||
- id: check-added-large-files | ||
- id: check-merge-conflict | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
args: ["--profile", "black", "--filter-files", "--line-length", "80"] | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: 0.14.2 | ||
hooks: | ||
- id: check-jsonschema | ||
name: "Check GitHub Workflows" | ||
files: ^\.github/workflows/ | ||
types: [yaml] | ||
args: ["--schemafile", "https://json.schemastore.org/github-workflow"] |
Oops, something went wrong.