-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: added workflows for code quality checks
- Loading branch information
1 parent
d6c5a5e
commit 307422b
Showing
7 changed files
with
142 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Python CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
|
||
jobs: | ||
run_tests: | ||
name: tests | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ['3.12'] | ||
toxenv: [quality] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Dependencies | ||
run: pip install -r requirements/dev.txt | ||
|
||
- name: Run Tox | ||
env: | ||
TOXENV: ${{ matrix.toxenv }} | ||
run: tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[MASTER] | ||
ignore = migrations, management | ||
load-plugins = pylint_django | ||
|
||
[MESSAGES CONTROL] | ||
disable= | ||
invalid-name, | ||
django-not-configured, | ||
consider-using-with, | ||
bad-option-value, | ||
too-many-positional-arguments, | ||
logging-format-interpolation, | ||
missing-module-docstring, | ||
abstract-method, | ||
|
||
[MISCELLANEOUS] | ||
notes = FIXME,XXX,TODO | ||
|
||
[SIMILARITIES] | ||
min-similarity-lines = 4 | ||
ignore-comments = yes | ||
ignore-docstrings = yes | ||
ignore-imports = no | ||
|
||
[VARIABLES] | ||
init-import = no | ||
dummy-variables-rgx = _|dummy|unused|.*_unused | ||
additional-builtins = | ||
|
||
[CLASSES] | ||
defining-attr-methods = __init__,__new__,setUp | ||
valid-classmethod-first-arg = cls | ||
valid-metaclass-classmethod-first-arg = mcs | ||
|
||
[DESIGN] | ||
max-args = 5 | ||
ignored-argument-names = _.* | ||
max-locals = 15 | ||
max-returns = 6 | ||
max-branches = 12 | ||
max-statements = 50 | ||
max-parents = 7 | ||
max-attributes = 7 | ||
min-public-methods = 2 | ||
max-public-methods = 20 | ||
|
||
[IMPORTS] | ||
deprecated-modules = regsub,TERMIOS,Bastion,rexec | ||
import-graph = | ||
ext-import-graph = | ||
int-import-graph = | ||
|
||
[EXCEPTIONS] | ||
overgeneral-exceptions = builtins.Exception |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
tox==4.24.1 | ||
pylint==3.3.3 | ||
pycodestyle==2.12.1 | ||
isort==5.13.2 | ||
pylint_django==2.6.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
[tox] | ||
envlist = py312-django{42} | ||
|
||
[isort] | ||
line_length = 120 | ||
known_django = django | ||
known_first_party = events,users | ||
include_trailing_comma = true | ||
multi_line_output = 3 | ||
|
||
[pycodestyle] | ||
exclude = .git,.tox,migrations | ||
max-line-length = 120 | ||
|
||
[testenv] | ||
setenv = | ||
TOXENV={envname} | ||
deps = | ||
django42: Django>=4.2,<5.0 | ||
-r{toxinidir}/requirements/base.txt | ||
commands = | ||
python manage.py check | ||
|
||
[testenv:isort] | ||
deps = | ||
-r{toxinidir}/requirements/dev.txt | ||
commands = | ||
isort --skip migrations events users manage.py | ||
|
||
[testenv:isort-check] | ||
deps = | ||
-r{toxinidir}/requirements/dev.txt | ||
commands = | ||
isort --skip migrations --check-only --diff events users manage.py | ||
[testenv:quality] | ||
setenv = | ||
DJANGO_SETTINGS_MODULE = arbisoft_sessions_portal.settings.base | ||
allowlist_externals = | ||
rm | ||
touch | ||
deps = | ||
-r{toxinidir}/requirements/base.txt | ||
-r{toxinidir}/requirements/dev.txt | ||
commands = | ||
pylint events users manage.py | ||
pycodestyle events users manage.py | ||
isort --skip migrations --check-only --diff events users manage.py |