Skip to content

Commit fc05f89

Browse files
committed
CI/CD config
1 parent 313f851 commit fc05f89

7 files changed

Lines changed: 104 additions & 5 deletions

File tree

.darglint

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[darglint]
2+
docstring_style=sphinx
3+
ignore=DAR003,DAR402
4+
strictness=full

.flake8

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[flake8]
2+
max-line-length = 120
3+
max-complexity = 7
4+
select = B,C,E,F,W,T4,B9
5+
ignore = E501, E731, W503, F401, F403

.github/workflows/lint.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Code Quality
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
push:
8+
branches: [master]
9+
10+
jobs:
11+
pre-commit:
12+
name: Linting
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/[email protected]
17+
- uses: pre-commit/[email protected]

.github/workflows/todos.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Create issues from todos
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
8+
jobs:
9+
todos:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- uses: wvffle/todo-actions@master
15+
with:
16+
collect_commit_msg: 'ci: collect new todos'
17+
reference_commit_msg: 'ci: add references to new todos'
18+
reference_commit_body: 'New issues: %s'
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
21+
TODO_ACTIONS_MONGO_URL: ${{ secrets.TODO_ACTIONS_MONGO_URL }}

.pre-commit-config.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
repos:
2+
- repo: https://github.com/pycqa/isort
3+
rev: 5.12.0
4+
hooks:
5+
- id: isort
6+
- repo: https://github.com/psf/black
7+
rev: 23.3.0
8+
hooks:
9+
- id: black
10+
language_version: python3
11+
- repo: https://github.com/PyCQA/flake8
12+
rev: 6.0.0
13+
hooks:
14+
- id: flake8
15+
additional_dependencies:
16+
- flake8-bugbear
17+
- flake8-comprehensions
18+
- flake8-pytest
19+
- repo: https://github.com/pre-commit/mirrors-mypy
20+
rev: v1.3.0
21+
hooks:
22+
- id: mypy
23+
exclude: ^docs/conf.py
24+
- repo: https://github.com/terrencepreilly/darglint
25+
rev: v1.8.1
26+
hooks:
27+
- id: darglint
28+
- repo: https://github.com/commitizen-tools/commitizen
29+
rev: v3.3.0
30+
hooks:
31+
- id: commitizen
32+
stages: [commit-msg]

pyproject.toml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "inpost"
3-
version = "0.1.3"
3+
version = "0.1.4"
44
description = "Asynchronous InPost package allowing you to manage existing incoming parcels without mobile app"
55
authors = ["loboda4450 <[email protected]>", "MrKazik99 <[email protected]>"]
66
maintainers = ["loboda4450 <[email protected]>"]
@@ -32,3 +32,27 @@ Pillow = "^9.4.0"
3232
[build-system]
3333
requires = ["poetry-core"]
3434
build-backend = "poetry.core.masonry.api"
35+
36+
[tool.black]
37+
line-length = 120
38+
include = '\.pyi?$'
39+
exclude = '''
40+
/(
41+
\.git
42+
| \.hg
43+
| \.mypy_cache
44+
| \.tox
45+
| \.venv
46+
| _build
47+
| buck-out
48+
| build
49+
| dist
50+
| tmp
51+
)/
52+
'''
53+
54+
[tool.isort]
55+
line_length = 120
56+
multi_line_output = 3
57+
include_trailing_comma = true
58+
known_third_party = ["aiohttp", "music_service_async_interface", "mutagen"]

requirements.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)