Skip to content

Commit 534a0f4

Browse files
authored
Merge pull request #86 from kozistr/build/cicd
[Build] Upgrade Python version to 3.11 for CI/CD pipeline
2 parents d316d1c + 0c571f8 commit 534a0f4

File tree

16 files changed

+542
-583
lines changed

16 files changed

+542
-583
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: ['3.8', '3.9']
14+
python-version: ['3.11']
1515

1616
steps:
1717
- uses: actions/checkout@v3
1818
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v3
19+
uses: actions/setup-python@v4
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222
- name: Cache pip
@@ -36,7 +36,7 @@ jobs:
3636
export PYTHONDONTWRITEBYTECODE=1
3737
make test
3838
- name: Check codecov
39-
uses: codecov/codecov-action@v2
39+
uses: codecov/codecov-action@v3
4040
with:
4141
token: ${{ secrets.CODECOV_TOKEN }}
4242
directory: ./

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ jobs:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- uses: actions/checkout@v3
31-
- name: Setup Python 3.9
32-
uses: actions/setup-python@v3
31+
- name: Setup Python 3.11
32+
uses: actions/setup-python@v4
3333
with:
34-
python-version: 3.9
34+
python-version: 3.11
3535
- name: Cache pip
3636
uses: actions/cache@v3
3737
with:

.pylintrc

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ confidence=
5050
disable=
5151
missing-docstring,
5252
too-few-public-methods,
53-
bad-continuation,
5453
logging-fstring-interpolation,
5554
arguments-differ,
5655
useless-super-delegation,
@@ -102,13 +101,13 @@ max-nested-blocks=6
102101
[BASIC]
103102

104103
# Naming hint for argument names
105-
argument-name-hint=(([a-z][a-z0-9_]{0,30})|(_[a-z0-9_]*))$
104+
# argument-name-hint=(([a-z][a-z0-9_]{0,30})|(_[a-z0-9_]*))$
106105

107106
# Regular expression matching correct argument names
108107
argument-rgx=(([a-z][a-z0-9_]{0,30})|(_[a-z0-9_]*))$
109108

110109
# Naming hint for attribute names
111-
attr-name-hint=(([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$
110+
# attr-name-hint=(([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$
112111

113112
# Regular expression matching correct attribute names
114113
attr-rgx=(([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$
@@ -117,19 +116,19 @@ attr-rgx=(([a-z][a-z0-9_]{1,30})|(_[a-z0-9_]*))$
117116
bad-names=foo,bar,baz,toto,tutu,tata,asdf
118117

119118
# Naming hint for class attribute names
120-
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{1,30}|(__.*__))$
119+
# class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{1,30}|(__.*__))$
121120

122121
# Regular expression matching correct class attribute names
123122
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{1,30}|(__.*__))$
124123

125124
# Naming hint for class names
126-
class-name-hint=[A-Z_][a-zA-Z0-9]+$
125+
# class-name-hint=[A-Z_][a-zA-Z0-9]+$
127126

128127
# Regular expression matching correct class names
129128
class-rgx=[A-Z_][a-zA-Z0-9]+$
130129

131130
# Naming hint for constant names
132-
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
131+
# const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
133132

134133
# Regular expression matching correct constant names
135134
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
@@ -139,7 +138,7 @@ const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
139138
docstring-min-length=-1
140139

141140
# Naming hint for function names
142-
function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
141+
# function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
143142

144143
# Regular expression matching correct function names
145144
function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
@@ -151,19 +150,19 @@ good-names=i,j,k,ex,Run,_
151150
include-naming-hint=no
152151

153152
# Naming hint for inline iteration names
154-
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
153+
# inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
155154

156155
# Regular expression matching correct inline iteration names
157156
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
158157

159158
# Naming hint for method names
160-
method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
159+
# method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
161160

162161
# Regular expression matching correct method names
163162
method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
164163

165164
# Naming hint for module names
166-
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
165+
# module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
167166

168167
# Regular expression matching correct module names
169168
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
@@ -181,7 +180,7 @@ no-docstring-rgx=^_
181180
property-classes=abc.abstractproperty
182181

183182
# Naming hint for variable names
184-
variable-name-hint=(([a-z][a-z0-9_]{0,30})|(_[a-z0-9_]*))$
183+
# variable-name-hint=(([a-z][a-z0-9_]{0,30})|(_[a-z0-9_]*))$
185184

186185
# Regular expression matching correct variable names
187186
variable-rgx=(([a-z][a-z0-9_]{0,30})|(_[a-z0-9_]*))$
@@ -212,9 +211,7 @@ max-module-lines=800
212211
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
213212
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
214213
# `empty-line` allows space-only lines.
215-
no-space-check=
216-
trailing-comma,
217-
dict-separator,
214+
# no-space-check=trailing-comma, dict-separator
218215

219216
# Allow the body of a class to be on the same line as the declaration if body
220217
# contains single statement.

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ init:
55
python -m poetry install
66

77
format:
8-
isort --profile black -l 119 pytorch_optimizer tests lint.py hubconf.py
9-
black -S -l 119 pytorch_optimizer tests lint.py hubconf.py
8+
isort --profile black -l 119 pytorch_optimizer tests hubconf.py
9+
black -S -l 119 pytorch_optimizer tests hubconf.py
1010

1111
test:
12-
python -m pytest -sv -vv --cov=pytorch_optimizer --cov-report=xml ./tests
12+
python -m pytest -p no:pastebin -p no:nose -p no:doctest -sv -vv --cov=pytorch_optimizer --cov-report=xml ./tests
1313

1414
check:
15-
isort --check-only --profile black -l 119 pytorch_optimizer tests lint.py hubconf.py
16-
black -S -l 119 --check pytorch_optimizer tests lint.py hubconf.py
17-
python lint.py
15+
isort --check-only --profile black -l 119 pytorch_optimizer tests hubconf.py
16+
black -S -l 119 --check pytorch_optimizer tests hubconf.py
17+
pylint --fail-under=10.0 pytorch_optimizer
1818

1919
requirements:
2020
python -m poetry export -f requirements.txt --output requirements.txt --without-hashes

lint.py

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

0 commit comments

Comments
 (0)