Skip to content

Commit 53fe726

Browse files
committed
Added pipelines.
Signed-off-by: Pavel Kirilin <[email protected]>
1 parent 1cad659 commit 53fe726

19 files changed

+2618
-0
lines changed

.flake8

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
[flake8]
2+
max-complexity = 6
3+
inline-quotes = double
4+
max-line-length = 88
5+
extend-ignore = E203
6+
docstring_style=sphinx
7+
max-cognitive-score=20
8+
max-arguments=8
9+
max-line-complexity=20
10+
11+
ignore =
12+
; Found multi-line function type annotation
13+
WPS320,
14+
; Found too deep nesting
15+
WPS220,
16+
; Found `%` string formatting
17+
WPS323,
18+
; Found `f` string
19+
WPS305,
20+
; Missing docstring in public module
21+
D100,
22+
; Missing docstring in magic method
23+
D105,
24+
; Missing docstring in __init__
25+
D107,
26+
; Found `__init__.py` module with logic
27+
WPS412,
28+
; Found class without a base class
29+
WPS306,
30+
; Missing docstring in public nested class
31+
D106,
32+
; First line should be in imperative mood
33+
D401,
34+
; Found wrong variable name
35+
WPS110,
36+
; Found `__init__.py` module with logic
37+
WPS326,
38+
; Found string constant over-use
39+
WPS226,
40+
; Found upper-case constant in a class
41+
WPS115,
42+
; Found nested function
43+
WPS602,
44+
; Found method without arguments
45+
WPS605,
46+
; Found overused expression
47+
WPS204,
48+
; Found too many module members
49+
WPS202,
50+
; Found too high module cognitive complexity
51+
WPS232,
52+
; line break before binary operator
53+
W503,
54+
; Found module with too many imports
55+
WPS201,
56+
; Inline strong start-string without end-string.
57+
RST210,
58+
; Found nested class
59+
WPS431,
60+
; Found wrong module name
61+
WPS100,
62+
; Found too many methods
63+
WPS214,
64+
; Found too long ``try`` body
65+
WPS229,
66+
; Found unpythonic getter or setter
67+
WPS615,
68+
; Found a line that starts with a dot
69+
WPS348,
70+
; Found complex default value (for dependency injection)
71+
WPS404,
72+
; not perform function calls in argument defaults (for dependency injection)
73+
B008,
74+
; Model should define verbose_name in its Meta inner class
75+
DJ10,
76+
; Model should define verbose_name_plural in its Meta inner class
77+
DJ11,
78+
; Found mutable module constant.
79+
WPS407,
80+
; Found walrus operator
81+
WPS332
82+
; Found a too complex `f` string
83+
WPS237
84+
; Consider possible security implications associated with pickle module
85+
; Pickle and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue
86+
S403, S301
87+
88+
per-file-ignores =
89+
; all tests
90+
test_*.py,tests.py,tests_*.py,*/tests/*,conftest.py:
91+
; Use of assert detected
92+
S101,
93+
; Found outer scope names shadowing
94+
WPS442,
95+
; Found too many local variables
96+
WPS210,
97+
; Found magic number
98+
WPS432,
99+
; Missing parameter(s) in Docstring
100+
DAR101,
101+
; Found too many arguments
102+
WPS211,
103+
104+
; all init files
105+
__init__.py:
106+
; ignore not used imports
107+
F401,
108+
; ignore import with wildcard
109+
F403,
110+
; Found wrong metadata variable
111+
WPS410,
112+
113+
exclude =
114+
./.cache,
115+
./.git,
116+
./.idea,
117+
./.mypy_cache,
118+
./.pytest_cache,
119+
./.venv,
120+
./venv,
121+
./env,
122+
./cached_venv,
123+
./docs,
124+
./deploy,
125+
./var,
126+
./.vscode,
127+
*migrations*,

.github/workflows/test.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Testing taskiq-pipelines
2+
3+
on: push
4+
5+
jobs:
6+
black:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Set up Python
11+
uses: actions/setup-python@v2
12+
with:
13+
python-version: "3.9"
14+
- name: Install deps
15+
uses: knowsuchagency/poetry-install@v1
16+
env:
17+
POETRY_VIRTUALENVS_CREATE: false
18+
- name: Run black check
19+
run: poetry run black --check .
20+
flake8:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Set up Python
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: "3.9"
28+
- name: Install deps
29+
uses: knowsuchagency/poetry-install@v1
30+
env:
31+
POETRY_VIRTUALENVS_CREATE: false
32+
- name: Run flake8 check
33+
run: poetry run flake8 --count .
34+
mypy:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v2
38+
- name: Set up Python
39+
uses: actions/setup-python@v2
40+
with:
41+
python-version: "3.9"
42+
- name: Install deps
43+
uses: knowsuchagency/poetry-install@v1
44+
env:
45+
POETRY_VIRTUALENVS_CREATE: false
46+
- name: Run mypy check
47+
run: poetry run mypy .
48+
pytest:
49+
strategy:
50+
matrix:
51+
py_version: ["3.7", "3.8", "3.9", "3.10"]
52+
runs-on: "ubuntu-latest"
53+
steps:
54+
- uses: actions/checkout@v2
55+
- name: Set up Python
56+
uses: actions/setup-python@v2
57+
with:
58+
python-version: "${{ matrix.py_version }}"
59+
- name: Update pip
60+
run: python -m pip install -U pip
61+
- name: Install poetry
62+
run: python -m pip install poetry
63+
- name: Install deps
64+
run: poetry install
65+
env:
66+
POETRY_VIRTUALENVS_CREATE: false
67+
- name: Run pytest check
68+
run: poetry run pytest -vv -n auto --cov="taskiq_pipelines" .

.gitignore

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
coverage.*
9+
10+
# Distribution / packaging
11+
.Python
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
wheels/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
cover/
54+
55+
# Translations
56+
*.mo
57+
*.pot
58+
59+
# Django stuff:
60+
*.log
61+
local_settings.py
62+
db.sqlite3
63+
db.sqlite3-journal
64+
65+
# Flask stuff:
66+
instance/
67+
.webassets-cache
68+
69+
# Scrapy stuff:
70+
.scrapy
71+
72+
# Sphinx documentation
73+
docs/_build/
74+
75+
# PyBuilder
76+
.pybuilder/
77+
target/
78+
79+
# Jupyter Notebook
80+
.ipynb_checkpoints
81+
82+
# IPython
83+
profile_default/
84+
ipython_config.py
85+
86+
# pyenv
87+
# For a library or package, you might want to ignore these files since the code is
88+
# intended to run in multiple environments; otherwise, check them in:
89+
# .python-version
90+
91+
# pipenv
92+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
94+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
95+
# install all needed dependencies.
96+
#Pipfile.lock
97+
98+
# poetry
99+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
100+
# This is especially recommended for binary packages to ensure reproducibility, and is more
101+
# commonly ignored for libraries.
102+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
103+
#poetry.lock
104+
105+
# pdm
106+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
107+
#pdm.lock
108+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
109+
# in version control.
110+
# https://pdm.fming.dev/#use-with-ide
111+
.pdm.toml
112+
113+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
114+
__pypackages__/
115+
116+
# Celery stuff
117+
celerybeat-schedule
118+
celerybeat.pid
119+
120+
# SageMath parsed files
121+
*.sage.py
122+
123+
# Environments
124+
.env
125+
.venv
126+
env/
127+
venv/
128+
ENV/
129+
env.bak/
130+
venv.bak/
131+
132+
# Spyder project settings
133+
.spyderproject
134+
.spyproject
135+
136+
# Rope project settings
137+
.ropeproject
138+
139+
# mkdocs documentation
140+
/site
141+
142+
# mypy
143+
.mypy_cache/
144+
.dmypy.json
145+
dmypy.json
146+
147+
# Pyre type checker
148+
.pyre/
149+
150+
# pytype static type analyzer
151+
.pytype/
152+
153+
# Cython debug symbols
154+
cython_debug/
155+
156+
# PyCharm
157+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
158+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
159+
# and can be added to the global gitignore or merged into this file. For a more nuclear
160+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
161+
.idea/
162+
.vscode/

0 commit comments

Comments
 (0)