Skip to content

Commit 6f5a04b

Browse files
authored
Merge pull request #123 from MC-kit/devel
Devel
2 parents 2fc1a7a + ab8ffa1 commit 6f5a04b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2411
-1154
lines changed

.flake8

+16-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
[flake8]
2-
# select=ANN,B,B9,BLK,C,D,DAR,E,F,TC,I,S,W
3-
select=ANN,B,B9,BLK,C,D,DAR,E,F,TC,S,W
4-
max-complexity=10
2+
select=ANN,B,B9,BLK,C,D,DAR,E,F,I,TC,S,W
3+
max-complexity=12
54
max-line-length=88
65
ignore=
6+
# ANN001 Missing type annotation for function argument
7+
ANN001
78
# ANN101 Missing type annotation for self in method
89
ANN101
910
# ANN102 Missing type annotation for cls in classmethod
1011
ANN102
12+
#ANN204 Missing return type annotation for special method
13+
ANN204
14+
# zip() without `strict` parameter, pythons <3.10 don't have this keyword
15+
B905
1116
# C812 Missing trailing comma: black compatibility
1217
C812
18+
# D105 Missing docstring in magic method (__hash__, __eq__)
19+
D105
1320
# Missing docstring in __init__
1421
D107
1522
# E203: Whitespace before ‘:'
@@ -18,6 +25,11 @@ ignore=
1825
E501
1926
# W503: Line break before binary operator: for compatibility with black settings
2027
W503
28+
# import is controlled by isort
29+
I100
30+
I101
31+
I201
32+
I202
2133
exclude=
2234
.git
2335
__pycache__
@@ -37,7 +49,7 @@ per-file-ignores =
3749
tools/clear-prev-dist-info.py:S404,S603,S607
3850
tools/install_flake8_deps.py:S404,S603,S607,B950
3951
config.py:ANN001,ANN201
40-
src/tests/*:S101,ANN,DAR100,D100,D103,DAR101,DAR103
52+
tests/*:S101,ANN,DAR100,D100,D103,DAR101,DAR103
4153
ignore-decorators=click,pytest
4254
docstring-convention = google
4355
rst-roles = class,const,func,meth,mod,ref

.github/constraints.txt

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
pip==22.2.2
2-
nox==2022.8.7
3-
poetry==1.2.0
4-
virtualenv==20.16.4
1+
pip==22.3.1
2+
nox==2022.11.21
3+
poetry==1.3.1
4+
virtualenv==20.16.5 # restricted by poetry on Windows, current 20.17.1
5+
wheel-0.38.4

.github/dependabot.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ updates:
55
- package-ecosystem: pip
66
directory: "/"
77
schedule:
8-
interval: monthly
8+
interval: weekly
99
day: monday
1010
time: "11:00"
1111
open-pull-requests-limit: 10
@@ -15,7 +15,7 @@ updates:
1515
# Workflow files stored in the default location of `.github/workflows`
1616
directory: "/"
1717
schedule:
18-
interval: monthly
18+
interval: weekly
1919
day: tuesday
2020
time: "11:00"
2121
open-pull-requests-limit: 10
@@ -24,7 +24,7 @@ updates:
2424
- package-ecosystem: "gitsubmodule"
2525
directory: "/"
2626
schedule:
27-
interval: monthly
27+
interval: weekly
2828
day: wednesday
2929
time: "11:00"
3030
open-pull-requests-limit: 10

.github/release-drafter.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ version-resolver:
5959
- 'patch'
6060
default: patch
6161
template: |
62-
## What's Changed
62+
## Whats Changed
6363
6464
$CHANGES
6565

.github/workflows/labeler.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ on:
1111
- .github/workflows/labeler.yml
1212
pull_request:
1313
branches:
14+
- main
1415
- master
16+
- devel
1517
paths:
1618
- .github/labels.yaml
1719
- .github/workflows/labeler.yml
@@ -24,10 +26,10 @@ jobs:
2426
runs-on: ubuntu-latest
2527
steps:
2628
- name: Check out the repository
27-
uses: actions/checkout@v3.0.2
29+
uses: actions/checkout@v3.2.0
2830

2931
- name: Sync GitHub Issue Labels
30-
uses: crazy-max/ghaction-github-labeler@v4.0.0
32+
uses: crazy-max/ghaction-github-labeler@v4
3133
with:
3234
github-token: ${{ secrets.MCKIT_GITHUB_TOKEN }}
3335
skip-delete: true

.github/workflows/release-drafter.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ jobs:
77
draft_release:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: release-drafter/release-drafter@v5.20.1
10+
- uses: release-drafter/release-drafter@v5.21.1
1111
env:
1212
GITHUB_TOKEN: ${{ secrets.MCKIT_GITHUB_TOKEN }}

.github/workflows/release.yml

+24-9
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,42 @@
11
name: Release
22

3+
env:
4+
PYTHON_VERSION: '3.11'
5+
36
on:
7+
workflow_dispatch:
8+
49
push:
510
branches:
611
- main
712
- master
813

14+
defaults:
15+
run:
16+
shell: bash
17+
18+
concurrency:
19+
group: ci-release-${{ github.ref }}-1
20+
cancel-in-progress: true
21+
22+
923
jobs:
1024
release:
1125
name: Release
1226
runs-on: ubuntu-latest
27+
1328
steps:
1429
- name: Check out the repository
15-
uses: actions/checkout@v3
30+
uses: actions/checkout@v3.2.0
1631
with:
17-
fetch-depth: 2
32+
fetch-depth: 2 # need previous revision to define tag
1833

1934
- name: Set up Python
20-
uses: actions/setup-python@v4
35+
uses: actions/setup-python@v4.3.1
2136
with:
22-
python-version: "3.10"
37+
python-version: ${{ env.PYTHON_VERSION }}
2338

24-
- name: Upgrade pip
39+
- name: Fix pip version
2540
run: |
2641
pip install --constraint=.github/constraints.txt pip
2742
pip --version
@@ -39,7 +54,7 @@ jobs:
3954
- name: Detect and tag new version
4055
id: check-version
4156
if: steps.check-parent-commit.outputs.sha
42-
uses: salsify/[email protected].1
57+
uses: salsify/[email protected].3
4358
with:
4459
version-command: poetry version --short
4560

@@ -56,21 +71,21 @@ jobs:
5671
5772
- name: Publish package on PyPI
5873
if: steps.check-version.outputs.tag
59-
uses: pypa/gh-action-pypi-publish@v1.5.0
74+
uses: pypa/gh-action-pypi-publish@v1.6.4
6075
with:
6176
user: __token__
6277
password: ${{ secrets.PYPI_TOKEN }}
6378

6479
- name: Publish package on TestPyPI
6580
if: "! steps.check-version.outputs.tag"
66-
uses: pypa/gh-action-pypi-publish@v1.5.0
81+
uses: pypa/gh-action-pypi-publish@v1.6.4
6782
with:
6883
user: __token__
6984
password: ${{ secrets.TEST_PYPI_TOKEN }}
7085
repository_url: https://test.pypi.org/legacy/
7186

7287
- name: Publish the release notes
73-
uses: release-drafter/release-drafter@v5.20.1
88+
uses: release-drafter/release-drafter@v5.21.1
7489
with:
7590
publish: ${{ steps.check-version.outputs.tag != '' }}
7691
tag: ${{ steps.check-version.outputs.tag }}

.github/workflows/stale.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/stale@v5
13+
- uses: actions/stale@v6
1414
with:
1515
repo-token: ${{ secrets.MCKIT_GITHUB_TOKEN }}
1616
stale-issue-message: 'Stale issue message'

.github/workflows/tests.yml

+37-30
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ jobs:
3636
!contains(github.event.head_commit.message, '[skip_ci]')
3737
steps:
3838
- name: Check out the repository
39-
uses: actions/checkout@v3.0.2
39+
uses: actions/checkout@v3.2.0
4040

41-
- name: Set up Python 3.10
42-
uses: actions/setup-python@v4.2.0
41+
- name: Set up Python 3.11
42+
uses: actions/setup-python@v4.3.1
4343
with:
44-
python-version: '3.10'
44+
python-version: '3.11'
4545

4646
- name: Upgrade pip
4747
run: |
@@ -50,12 +50,12 @@ jobs:
5050
5151
- name: Install Poetry
5252
run: |
53-
pipx install --pip-args=--constraint=.github/constraints.txt poetry
53+
pip install --constraint=.github/constraints.txt poetry
5454
poetry --version
5555
5656
- name: Install Nox
5757
run: |
58-
pipx install --pip-args=--constraint=.github/constraints.txt nox
58+
pip install --constraint=.github/constraints.txt nox
5959
nox --version
6060
6161
# - name: Run safety session
@@ -65,7 +65,6 @@ jobs:
6565
- name: Run pre commit checks
6666
run: |
6767
nox --force-color --session=pre-commit
68-
# this includes pycln, isort, black, flake8 checks
6968
7069
- name: Run mypy static type checks
7170
run: |
@@ -76,12 +75,12 @@ jobs:
7675
needs: lint
7776
steps:
7877
- name: Check out the repository
79-
uses: actions/checkout@v3.0.2
78+
uses: actions/checkout@v3.2.0
8079

81-
- name: Set up Python 3.10
82-
uses: actions/setup-python@v4.2.0
80+
- name: Set up Python 3.11
81+
uses: actions/setup-python@v4.3.1
8382
with:
84-
python-version: '3.10'
83+
python-version: '3.11'
8584

8685
- name: Upgrade pip
8786
run: |
@@ -90,12 +89,12 @@ jobs:
9089
9190
- name: Install Poetry
9291
run: |
93-
pipx install --pip-args=--constraint=.github/constraints.txt poetry
92+
pip install --constraint=.github/constraints.txt poetry
9493
poetry --version
9594
9695
- name: Install Nox
9796
run: |
98-
pipx install --pip-args=--constraint=.github/constraints.txt nox
97+
pip install --constraint=.github/constraints.txt nox
9998
nox --version
10099
101100
- name: Build documentation
@@ -112,24 +111,32 @@ jobs:
112111
fail-fast: false
113112
matrix:
114113
os: [ubuntu-latest, macos-latest, windows-latest]
115-
python-version: ['3.8', '3.9', '3.10']
114+
python-version: ['3.8', '3.9', '3.10', '3.11']
116115
steps:
117116
- name: Checkout repository
118-
uses: actions/[email protected]
119-
- uses: actions/[email protected]
117+
uses: actions/[email protected]
118+
with:
119+
fetch-depth: 1
120+
- uses: actions/[email protected]
120121
with:
121122
python-version: ${{ matrix.python-version }}
122123
architecture: x64
123-
# - name: Checkout submodules
124-
# run: git submodule update --init --recursive --depth=1
124+
- name: Use frozen pip version
125+
run: |
126+
pip install --constraint=.github/constraints.txt pip virtualenv
127+
pip --version
125128
- name: Install nox
126-
run: pip install --constraint=.github/constraints.txt nox
129+
run: |
130+
pip install --constraint=.github/constraints.txt nox
131+
nox --version
127132
- name: Install poetry
128-
run: pip install --constraint=.github/constraints.txt poetry
133+
run: |
134+
pip install --constraint=.github/constraints.txt poetry
135+
poetry --version
129136
- name: Run nox tests
130137
run: nox --force-color --session tests --python ${{ matrix.python-version }}
131138
- name: Upload coverage data
132-
uses: actions/[email protected].0
139+
uses: actions/[email protected].1
133140
with:
134141
name: coverage-data
135142
path: ".coverage.*"
@@ -139,30 +146,30 @@ jobs:
139146
needs: tests
140147
steps:
141148
- name: Check out the repository
142-
uses: actions/checkout@v3.0.2
149+
uses: actions/checkout@v3.2.0
143150

144-
- name: Set up Python 3.10
145-
uses: actions/setup-python@v4.2.0
151+
- name: Set up Python 3.11
152+
uses: actions/setup-python@v4.3.1
146153
with:
147-
python-version: '3.10'
154+
python-version: '3.11'
148155

149-
- name: Upgrade pip
156+
- name: Use frozen pip version
150157
run: |
151158
pip install --constraint=.github/constraints.txt pip
152159
pip --version
153160
154161
- name: Install Poetry
155162
run: |
156-
pipx install --pip-args=--constraint=.github/constraints.txt poetry
163+
pip install --constraint=.github/constraints.txt poetry
157164
poetry --version
158165
159166
- name: Install Nox
160167
run: |
161-
pipx install --pip-args=--constraint=.github/constraints.txt nox
168+
pip install --constraint=.github/constraints.txt nox
162169
nox --version
163170
164171
- name: Download coverage data
165-
uses: actions/[email protected].0
172+
uses: actions/[email protected].1
166173
with:
167174
name: coverage-data
168175

@@ -175,4 +182,4 @@ jobs:
175182
nox --force-color --session=coverage -- xml
176183
177184
- name: Upload coverage report
178-
uses: codecov/[email protected].0
185+
uses: codecov/[email protected].1

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
repos:
1515
# Standard hooks
1616
- repo: https://github.com/pre-commit/pre-commit-hooks
17-
rev: "v4.3.0"
17+
rev: "v4.4.0"
1818
hooks:
1919
- id: check-added-large-files
2020
- id: check-case-conflict
@@ -60,7 +60,7 @@ repos:
6060
- id: pycln
6161
name: pycln
6262
exclude: tools|\.idea|\.cache
63-
entry: poetry run pycln
63+
entry: poetry run pycln --config pyproject.toml
6464
language: system
6565
types: [python]
6666
# Nicely sort imports
@@ -150,7 +150,7 @@ repos:
150150

151151
# Check for common shell mistakes
152152
- repo: https://github.com/shellcheck-py/shellcheck-py
153-
rev: "v0.8.0.4"
153+
rev: "v0.9.0.2"
154154
hooks:
155155
- id: shellcheck
156156
stages: [manual]

0 commit comments

Comments
 (0)