Skip to content

Commit 5628fa8

Browse files
authored
Merge pull request #10 from borys25ol/dev
Dev
2 parents b2af513 + 2860834 commit 5628fa8

35 files changed

+995
-511
lines changed

.github/workflows/style.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Run code style check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- dev
7+
8+
push:
9+
branches:
10+
- dev
11+
12+
workflow_dispatch:
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Initialize python 3.12
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.12'
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install -r requirements-ci.txt
30+
31+
- name: Style checking
32+
run: make lint

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.ve
22
env-shub
33
.idea
4+
.coverage
45
.DS_Store
56
._.DS_Store
67
.env
@@ -13,4 +14,4 @@ eggs
1314
logs
1415
project.egg-info
1516
.vscode
16-
venv*
17+
venv*

.pre-commit-config.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ default_stages:
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v3.4.0
6+
rev: v5.0.0
77
hooks:
88
- id: end-of-file-fixer
99
- id: trailing-whitespace
@@ -12,16 +12,16 @@ repos:
1212
- id: check-case-conflict
1313
- id: requirements-txt-fixer
1414

15-
- repo: https://gitlab.com/pycqa/flake8
16-
rev: 4.0.1
15+
- repo: https://github.com/pycqa/flake8
16+
rev: 7.1.1
1717
hooks:
1818
- id: flake8
1919
additional_dependencies:
2020
- wemake-python-styleguide
21-
- flake8-builtins==1.5.2
22-
- flake8-annotations-complexity==0.0.4
23-
- flake8-class-attributes-order==0.1.0
24-
- flake8-cognitive-complexity==0.0.2
21+
- flake8-builtins
22+
- flake8-annotations-complexity
23+
- flake8-class-attributes-order
24+
- flake8-cognitive-complexity
2525

2626
- repo: local
2727
hooks:
@@ -32,18 +32,18 @@ repos:
3232
entry: bash -c 'make types'
3333

3434
- repo: https://github.com/psf/black
35-
rev: 21.4b0
35+
rev: 24.10.0
3636
hooks:
3737
- id: black
3838
language_version: python
3939

4040
- repo: https://github.com/PyCQA/isort
41-
rev: 5.8.0
41+
rev: 5.13.2
4242
hooks:
4343
- id: isort
4444

4545
- repo: https://github.com/asottile/pyupgrade
46-
rev: v2.13.0
46+
rev: v3.19.0
4747
hooks:
4848
- id: pyupgrade
49-
args: [--py38-plus]
49+
args: [--py312-plus]

Makefile

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,36 @@ install_hooks:
77
pip install -r requirements-ci.txt; \
88
pre-commit install; \
99

10-
clean:
11-
test -d .ve && rm -rf .ve
10+
docker_build:
11+
docker-compose up -d --build
1212

13-
test:
14-
.ve/bin/python -m pytest .
13+
docker_up:
14+
docker-compose up -d
15+
16+
docker_down:
17+
docker-compose down
18+
19+
docker_stop:
20+
docker-compose stop
21+
22+
docker_restart:
23+
docker-compose stop
24+
docker-compose up -d
1525

16-
run_hooks_on_all_files:
26+
run_hooks:
1727
pre-commit run --all-files
1828

29+
test:
30+
python -m pytest -v ./tests
31+
32+
test-cov:
33+
python -m pytest --cov=./elasticsearch_reindex --cov-report term-missing ./tests
34+
1935
style:
20-
flake8 main && isort main --diff && black main --check
36+
flake8 elasticsearch_reindex && isort elasticsearch_reindex --diff && black elasticsearch_reindex --check
37+
38+
lint:
39+
flake8 elasticsearch_reindex && isort elasticsearch_reindex && black elasticsearch_reindex
2140

2241
types:
2342
mypy --namespace-packages -p "elasticsearch_reindex" --config-file setup.cfg

0 commit comments

Comments
 (0)