Skip to content

Commit

Permalink
Merge pull request #581 from iKostanOrg/master
Browse files Browse the repository at this point in the history
Merge from master
  • Loading branch information
ikostan authored Dec 25, 2024
2 parents 6e1ffe5 + a10119f commit 38f09f8
Show file tree
Hide file tree
Showing 130 changed files with 1,516 additions and 872 deletions.
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
2 changes: 1 addition & 1 deletion .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 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_kyu8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: pydocstyle 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 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_8
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,11 @@ the environment for every build, see comment from Grimmy below).
<details>
<summary>ERROR: The term 'make' is not recognized as the name of a cmdlet</summary>

'make' is not recognized as an internal or external command.

The error "'make' is not recognized as an internal or external command, operable program or
batch file" occurs when we run the make command on Windows without having make installed.
To solve the error, install make using Chocolatey.

```
```bash
make clean
make : The term 'make' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
Expand All @@ -378,18 +376,18 @@ To install Chocolatey:
1. Open PowerShell as an administrator.
2. Run the following command:
```
```bash
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
```
3. Wait for the command to complete.
4. Type choco to make sure Chocolatey is installed:
```
```bash
PS C:\WINDOWS\system32> choco
Chocolatey v2.4.1
Please run 'choco -?' or 'choco <command> -?' for help menu.
```
5. Now that you have Chocolatey installed, run the following command to install make:
```
```bash
PS C:\WINDOWS\system32> choco install make -y
Chocolatey v2.4.1
Installing the following packages:
Expand Down
32 changes: 32 additions & 0 deletions docs/kyu_8/kyu_8.closest_elevator.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
kyu\_8.closest\_elevator package
================================

Submodules
----------

kyu\_8.closest\_elevator.closest\_elevator module
-------------------------------------------------

.. automodule:: kyu_8.closest_elevator.closest_elevator
:members:
:undoc-members:
:show-inheritance:
:private-members:

kyu\_8.closest\_elevator.test\_closest\_elevator module
-------------------------------------------------------

.. automodule:: kyu_8.closest_elevator.test_closest_elevator
:members:
:undoc-members:
:show-inheritance:
:private-members:

Module contents
---------------

.. automodule:: kyu_8.closest_elevator
:members:
:undoc-members:
:show-inheritance:
:private-members:
1 change: 1 addition & 0 deletions docs/kyu_8/kyu_8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Subpackages
kyu_8.alternating_case
kyu_8.century_from_year
kyu_8.check_the_exam
kyu_8.closest_elevator
kyu_8.convert_string_to_an_array
kyu_8.count_the_monkeys
kyu_8.counting_sheep
Expand Down
Loading

0 comments on commit 38f09f8

Please sign in to comment.