Skip to content

Commit

Permalink
Merge pull request #601 from iKostanOrg/master
Browse files Browse the repository at this point in the history
Merge from master
  • Loading branch information
ikostan authored Dec 31, 2024
2 parents 8f7dce0 + a795878 commit 5106b3a
Show file tree
Hide file tree
Showing 8,421 changed files with 30,977 additions and 12,729 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 7 additions & 3 deletions .codacy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
reviews:
high_level_summary: true
engines:
duplication:
enabled: true
Expand All @@ -19,16 +21,18 @@ languages:
extensions:
- '.md'
exclude_paths:
- '.venv/**'
- 'allure-report/**'
- 'allure-results/**'
- 'deprecated/**'
- 'docs/**'
- 'allure-report/**'
- 'img/**'
- '.circleci/**'
- '.circleci/**'
- '.github/**'
- '*__init__.py'
- 'rocro.yml'
- '**__init__.py'
- 'requirements.txt'
- 'pytest.ini'
- '.travis.yml'
- '.gitignore'
- '.gitattributes'
16 changes: 16 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,19 @@ checks:
plugins:
duplication:
enabled: false
exclude_patterns:
- ".circleci/"
- ".github/"
- ".venv/"
- "docs/"
- "deprecated/"
- "img/"
- "**/node_modules/"
- "script/"
- "**/spec/"
- "**/vendor/"
- "**/*_test.go"
- "**/*.d.ts"
- "allure-report/"
- "allure-results/"
- "*.txt"
6 changes: 6 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# include = */src/*
# omit anything in a virtualenv directory anywhere
omit =
deprecated/*
/home/travis/virtualenv/*
*.yml
/home/travis/img/*
Expand All @@ -13,6 +14,11 @@ omit =
*.html
/tests/*
test_*
allure-report/*
allure-results/*
.circleci/*
.github/*
img/*

[report]
; Regexes for lines to exclude from consideration
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/codacy-coverage-reporter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Codacy Coverage Reporter

# Source:
# https://github.com/codacy/codacy-coverage-reporter-action
on: # yamllint disable-line rule:truthy
push:
branches:
- 'master'
workflow_call:

jobs:
codacy-coverage-reporter:
runs-on: ubuntu-latest
name: codacy-coverage-reporter
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@main
with:
python-version: ${{ matrix.python-version }}
- name: Install prerequisites
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
- name: Install pytest, pytest-cov
run: |
pip install pytest
pip install pytest-cov
- name: Generate coverage report
# You must now upload using a token.
# https://app.codecov.io/gh/iKostanOrg/codewars/tests/new
# yamllint disable rule:line-length
run: |
python -c "import os; print(os.getcwd())"
python -m pytest . -v --cov-report term-missing --cov-report=xml --cov=./
# yamllint enable rule:line-length
- name: Run codacy-coverage-reporter
run: |
export CODACY_ORGANIZATION_PROVIDER=gh \
export CODACY_USERNAME=iKostanOrg \
export CODACY_PROJECT_NAME=codewars
bash <(curl -Ls https://coverage.codacy.com/get.sh) report \
--api-token ${{ secrets.CODACY_API_TOKEN }} \
--language Python \
--coverage-reports /home/runner/work/codewars/codewars/coverage.xml
12 changes: 6 additions & 6 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ jobs:
pip install pytest
pip install pytest-cov
- name: Generate coverage report
# You must now upload using a token.
# https://app.codecov.io/gh/iKostanOrg/codewars/tests/new
# yamllint disable rule:line-length
run: |
python -c "import os; print(os.getcwd())"
python -m pytest . -v --cov-report term-missing --cov-report=xml --cov=./
python -m pytest . -v --cov-report term-missing --cov-report=xml --cov=./ --junitxml=junit.xml -o junit_family=legacy --debug
# yamllint enable rule:line-length
- name: Upload coverage to Codecov
uses: codecov/[email protected]
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.codecov_token }}
files: coverage.xml
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
47 changes: 47 additions & 0 deletions .github/workflows/flake8_kyu7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Flake8 for kyu7

on: # yamllint disable-line rule:truthy
push:
branches:
- 'kyu7'

permissions:
contents: read
pull-requests: read

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.x"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
# This is the version of the action for setting up Python,
# not the Python version.
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# You can test your matrix by printing the current
# Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
pip install flake8
- name: Check to make sure that the module is in your Python path
run: |
echo $PYTHONPATH
- name: Lint with flake8
# yamllint disable rule:line-length
# stop the build if there are Python syntax errors or undefined names
# exit-zero treats all errors as warnings.
# The GitHub editor is 127 chars wide
run: |
flake8 --count --select=E9,F63,F7,F82 --doctests --show-source --statistics ./kyu_7
flake8 --count --max-complexity=10 --max-line-length=127 --benchmark --show-source --statistics ./kyu_7
# yamllint enable rule:line-length
47 changes: 47 additions & 0 deletions .github/workflows/flake8_kyu8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Flake8 for kyu8

on: # yamllint disable-line rule:truthy
push:
branches:
- 'kyu8'

permissions:
contents: read
pull-requests: read

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.x"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
# This is the version of the action for setting up Python,
# not the Python version.
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# You can test your matrix by printing the current
# Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
pip install flake8
- name: Check to make sure that the module is in your Python path
run: |
echo $PYTHONPATH
- name: Lint with flake8
# yamllint disable rule:line-length
# stop the build if there are Python syntax errors or undefined names
# exit-zero treats all errors as warnings.
# The GitHub editor is 127 chars wide
run: |
flake8 --count --select=E9,F63,F7,F82 --doctests --show-source --statistics ./kyu_8
flake8 --count --max-complexity=10 --max-line-length=127 --benchmark --show-source --statistics ./kyu_8
# yamllint enable rule:line-length
4 changes: 4 additions & 0 deletions .github/workflows/lint_test_build_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
yamllint:
name: YAML Lint
uses: iKostanOrg/codewars/.github/workflows/yamllint.yml@master
pydocstyle:
name: PyDocStyle Lint
uses: iKostanOrg/codewars/.github/workflows/pydocstyle.yml@master
pytest:
name: Unitest with pytest
needs:
Expand All @@ -30,6 +33,7 @@ jobs:
- markdown
- mypy
- yamllint
- pydocstyle
uses: iKostanOrg/codewars/.github/workflows/pytest.yml@master
codecov:
name: Codecov GitHub Action
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/markdown_lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: 'Markdown Lint'
name: Markdown Lint

on: # yamllint disable-line rule:truthy
push:
Expand All @@ -18,7 +18,7 @@ jobs:
- name: Checkout v4
uses: actions/checkout@v4
- name: markdownlint-cli2-action v16
uses: DavidAnson/markdownlint-cli2-action@v18
uses: DavidAnson/markdownlint-cli2-action@v19
with:
config: '.markdownlint-cli2.yaml'
fix: true
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/pydocstyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
name: pydocstyle

on: # yamllint disable-line rule:truthy
push:
branches:
- 'utils'
- 'none'
workflow_call:

permissions:
contents: read
pull-requests: read

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.x"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
# This is the version of the action for setting up Python,
# not the Python version.
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
pip install pydocstyle
pip install types-requests
- name: Check to make sure that the module is in your Python path
run: |
echo $PYTHONPATH
- name: Check pydocstyle version
run: |
pydocstyle --version
# Pydocstyle testing (Guide)
# https://www.pydocstyle.org/en/stable/usage.html#cli-usage
- name: Doc style checking with pydocstyle for kyu_2
run: |
pydocstyle --verbose --explain --count kyu_2
- name: Doc style checking with pydocstyle for kyu_3
run: |
pydocstyle --verbose --explain --count kyu_3
- name: Doc style checking with pydocstyle for kyu_4
run: |
pydocstyle --verbose --explain --count kyu_4
- name: Doc style checking with pydocstyle for kyu_5
run: |
pydocstyle --verbose --explain --count kyu_5
- name: Doc style checking with pydocstyle for kyu_6
run: |
pydocstyle --verbose --explain --count kyu_6
- name: Doc style checking with pydocstyle for kyu_7
run: |
pydocstyle --verbose --explain --count kyu_7
- name: Doc style checking with pydocstyle for kyu_8
run: |
pydocstyle --verbose --explain --count kyu_8
46 changes: 46 additions & 0 deletions .github/workflows/pydocstyle_kyu7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: pydocstyle for kyu7

on: # yamllint disable-line rule:truthy
push:
branches:
- 'kyu7'

permissions:
contents: read
pull-requests: read

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.x"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
# This is the version of the action for setting up Python,
# not the Python version.
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
pip install pydocstyle
pip install types-requests
- name: Check to make sure that the module is in your Python path
run: |
echo $PYTHONPATH
- name: Check pydocstyle version
run: |
pydocstyle --version
- name: Doc style checking with pydocstyle
# Pydocstyle testing (Guide)
# https://www.pydocstyle.org/en/stable/usage.html#cli-usage
run: |
pydocstyle --verbose --explain --count kyu_7
Loading

0 comments on commit 5106b3a

Please sign in to comment.