forked from ternaus/retinaface
-
Notifications
You must be signed in to change notification settings - Fork 0
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
7 changed files
with
159 additions
and
25 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,17 @@ | ||
version = 1 | ||
|
||
test_patterns = [ | ||
'tests/**' | ||
] | ||
|
||
exclude_patterns = [ | ||
|
||
] | ||
|
||
[[analyzers]] | ||
name = 'python' | ||
enabled = true | ||
runtime_version = '3.x.x' | ||
|
||
[analyzers.meta] | ||
max_line_length = 119 |
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 @@ | ||
# These are supported funding model platforms | ||
|
||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] | ||
patreon: ternaus | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
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,52 @@ | ||
# 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: Python package | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Cache pip | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip # This path is specific to Ubuntu | ||
# Look to see if there is a cache hit for the corresponding requirements file | ||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
${{ runner.os }}- | ||
# You can test your matrix by printing the current Python version | ||
- name: Display Python version | ||
run: python -c "import sys; print(sys.version)" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install Cython | ||
pip install -r requirements.txt | ||
pip install pycocotools | ||
pip install black flake8 mypy pytest hypothesis | ||
- name: Run black | ||
run: | ||
black --check . | ||
- name: Run flake8 | ||
run: flake8 | ||
- name: Run Mypy | ||
run: mypy retinaface | ||
# - name: tests | ||
# run: | | ||
# pip install .[tests] | ||
# pytest |
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,43 @@ | ||
exclude: _pb2\.py$ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 19.10b0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/asottile/yesqa | ||
rev: v1.1.0 | ||
hooks: | ||
- id: yesqa | ||
additional_dependencies: | ||
- flake8-bugbear==20.1.4 | ||
- flake8-builtins==1.5.2 | ||
- flake8-comprehensions==3.2.2 | ||
- flake8-tidy-imports==4.1.0 | ||
- flake8==3.7.9 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.3.0 | ||
hooks: | ||
- id: check-docstring-first | ||
- id: check-json | ||
- id: check-merge-conflict | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: flake8 | ||
- id: requirements-txt-fixer | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v1.13.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: ['--py36-plus'] | ||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.5.1 | ||
hooks: | ||
- id: python-check-mock-methods | ||
- id: python-use-type-annotations | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: 9feadeb | ||
hooks: | ||
- id: mypy | ||
args: [--ignore-missing-imports, --warn-no-return, --warn-redundant-casts, --disallow-incomplete-defs] |
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,25 @@ | ||
# Example configuration for Black. | ||
|
||
# NOTE: you have to use single-quoted strings in TOML for regular expressions. | ||
# It's the equivalent of r-strings in Python. Multiline strings are treated as | ||
# verbose regular expressions by Black. Use [ ] to denote a significant space | ||
# character. | ||
|
||
[tool.black] | ||
line-length = 119 | ||
target-version = ['py36', 'py37', 'py38'] | ||
include = '\.pyi?$' | ||
exclude = ''' | ||
/( | ||
\.eggs | ||
| \.git | ||
| \.hg | ||
| \.mypy_cache | ||
| \.tox | ||
| \.venv | ||
| _build | ||
| buck-out | ||
| build | ||
| dist | ||
)/ | ||
''' |
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,7 @@ | ||
[flake8] | ||
max-line-length = 119 | ||
exclude =.git,__pycache__,docs/source/conf.py,build,dist | ||
ignore = I101,I201,F401,F403,S001,D100,D101,D102,D103,D104,D105,D106,D107,D200,D205,D400,W504,E203,D202,D401 | ||
|
||
[mypy] | ||
ignore_missing_imports = True |