Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge from master #572

Merged
merged 933 commits into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
933 commits
Select commit Hold shift + click to select a range
e4694d7
# Scheduling (Shortest Job First or SJF)
ikostan Dec 17, 2024
ffe8bb9
# Sort the odd
ikostan Dec 17, 2024
061266e
# String subpattern recognition I
ikostan Dec 17, 2024
b778a9a
# String subpattern recognition II
ikostan Dec 17, 2024
cc5ac75
# String subpattern recognition III
ikostan Dec 17, 2024
29d8688
# String transformer
ikostan Dec 17, 2024
77dc370
# Sum of Digits / Digital Root
ikostan Dec 17, 2024
5163e6e
# Sums of Parts
ikostan Dec 17, 2024
edb8fe5
Update test_odd_row.py
ikostan Dec 17, 2024
ec3629f
# Unique In Order
ikostan Dec 18, 2024
b553c77
Update test_sort_array.py
ikostan Dec 18, 2024
0695155
Update unique_in_order.py
ikostan Dec 18, 2024
dbe5410
Update test_unique_in_order.py
ikostan Dec 18, 2024
62d1e18
# Valid Braces
ikostan Dec 18, 2024
168a6b0
# Vasya - Clerk
ikostan Dec 18, 2024
cd22053
# Who likes it
ikostan Dec 18, 2024
00be386
# Your order, please
ikostan Dec 18, 2024
ccf04c4
Update test_order.py
ikostan Dec 18, 2024
54d428c
Update test_order.py
ikostan Dec 18, 2024
0e67a55
Update solution.py
ikostan Dec 18, 2024
f41ac82
Update solution.py
ikostan Dec 18, 2024
e7168bb
Update string_transformer.py
ikostan Dec 18, 2024
5192b4f
Bump codecov/codecov-action from 5.1.1 to 5.1.2 in /.github/workflows
dependabot[bot] Dec 18, 2024
ae4fbac
Update group_cities.py
ikostan Dec 18, 2024
535114f
Update thirt.py
ikostan Dec 18, 2024
3f205f0
Update epidemic_test_data.py
ikostan Dec 18, 2024
4f75ac3
Update solution.py
ikostan Dec 18, 2024
274a640
Update sequence.py
ikostan Dec 18, 2024
270a50e
Update sequence.py
ikostan Dec 18, 2024
9dafa55
Update unique_in_order.py
ikostan Dec 18, 2024
c74dcec
Update order.py
ikostan Dec 18, 2024
1d66000
Update sequence.py
ikostan Dec 18, 2024
70891e1
Update default_list.py
ikostan Dec 18, 2024
6dd86f2
Update order.py
ikostan Dec 18, 2024
8e090ea
Update valid_braces.py
ikostan Dec 19, 2024
4c77fc6
Recognition of string subpattern
ikostan Dec 19, 2024
89950bc
Update test_calculate_damage.py
ikostan Dec 19, 2024
360ee7e
Update solution.py
ikostan Dec 19, 2024
8eebd81
Update test_likes_function.py
ikostan Dec 19, 2024
52ba64d
Update test_namelist.py
ikostan Dec 19, 2024
5136bf5
Update test_list_to_html_table.py
ikostan Dec 19, 2024
ddfcd25
Update test_likes_function.py
ikostan Dec 19, 2024
9ce726e
Default list
ikostan Dec 19, 2024
4242c0e
Update test_default_list.py
ikostan Dec 19, 2024
047f607
Update test_default_list.py
ikostan Dec 19, 2024
0ef885f
Update test_order.py
ikostan Dec 19, 2024
85706b4
Edge cases
ikostan Dec 19, 2024
160e6b2
Update test_edge_case_list.py
ikostan Dec 19, 2024
ec4d39b
Update tickets.py
ikostan Dec 19, 2024
34a3d2b
Update test_stock_list.py
ikostan Dec 19, 2024
d5763de
Update test_stock_list.py
ikostan Dec 19, 2024
8f7dce0
Update test_edge_case_list.py
ikostan Dec 19, 2024
da16087
Merge pull request #562 from iKostanOrg/kyu6
ikostan Dec 19, 2024
a646ccf
Merge pull request #563 from iKostanOrg/dependabot/github_actions/dot…
ikostan Dec 19, 2024
3e760de
Merge pull request #564 from iKostanOrg/master
ikostan Dec 20, 2024
12eb620
Update __init__.py
ikostan Dec 20, 2024
ea443aa
# Always perfect
ikostan Dec 20, 2024
5d58bf6
# Basic Math (Add or Subtract)
ikostan Dec 20, 2024
e326058
# Beginner Series #3 Sum of Numbers
ikostan Dec 20, 2024
32bfe3e
## About this Kata
ikostan Dec 20, 2024
178f162
# 'Disemvowel' Trolls
ikostan Dec 20, 2024
cd198dc
Update test_check_root.py
ikostan Dec 20, 2024
43f9c23
Update test_check_root.py
ikostan Dec 20, 2024
05a5c1e
Update README.md
ikostan Dec 20, 2024
af43cf6
Update README.md
ikostan Dec 20, 2024
da0bed2
Update test_check_root.py
ikostan Dec 20, 2024
e14344b
Update test_check_root.py
ikostan Dec 20, 2024
fa76728
Update test_check_root.py
ikostan Dec 20, 2024
28ff036
# Easy Line
ikostan Dec 20, 2024
9037fd5
# Factorial
ikostan Dec 20, 2024
b9059f9
Update __init__.py
ikostan Dec 20, 2024
9f0be14
# Computer problem series #1
ikostan Dec 20, 2024
f880051
Find the longest gap
ikostan Dec 20, 2024
6657963
Update __init__.py
ikostan Dec 20, 2024
41d9c30
# Formatting decimal places #1
ikostan Dec 20, 2024
11dd1fd
# Fun with lists: length
ikostan Dec 20, 2024
b0e6da0
# Simple Fun #74: Growing Plant
ikostan Dec 20, 2024
dbcafc2
# Help Bob count letters and digits
ikostan Dec 20, 2024
62572c9
# Isograms
ikostan Dec 20, 2024
61405a2
Update README.md
ikostan Dec 20, 2024
2463479
# Jaden Casing Strings
ikostan Dec 20, 2024
406cee8
# Make Class
ikostan Dec 20, 2024
11a3eb0
# Maximum Multiple
ikostan Dec 20, 2024
bca0306
Password validator
ikostan Dec 20, 2024
9086ad3
# Powers of 3
ikostan Dec 20, 2024
0518e84
# Pull your words together, man
ikostan Dec 20, 2024
0c2936e
Update test_sentencify.py
ikostan Dec 20, 2024
81b244b
Update sentencify.py
ikostan Dec 20, 2024
3b64528
# The museum of incredible dull things
ikostan Dec 20, 2024
1ba22dc
# Share price
ikostan Dec 20, 2024
4dd10c6
# Significant Figures Challenge
ikostan Dec 20, 2024
589a152
# Simple Fun #152: Invite More Women
ikostan Dec 20, 2024
916fead
Create pydocstyle_kyu7.yml
ikostan Dec 20, 2024
3943876
# Sort Out The Men From Boys
ikostan Dec 20, 2024
eb9ec35
# Substituting Variables Into Strings: Padded Numbers
ikostan Dec 20, 2024
7618ca7
Sum of odd numbers
ikostan Dec 20, 2024
4237e27
# Sum of powers of 2
ikostan Dec 20, 2024
b63ab12
# Sum of Triangular Numbers
ikostan Dec 20, 2024
dc34fc1
# Sum of two lowest positive integers
ikostan Dec 20, 2024
538f339
# The First Non Repeated Character In A String
ikostan Dec 20, 2024
441bab4
# Valid Parentheses
ikostan Dec 20, 2024
a5d9cf5
V A P O R C O D E
ikostan Dec 20, 2024
25a4ce9
# You're a square
ikostan Dec 20, 2024
f44ecaf
Update count_letters_and_digits.py
ikostan Dec 20, 2024
8f8e2cf
Update gap.py
ikostan Dec 20, 2024
35586ba
Update gap.py
ikostan Dec 20, 2024
65f7de5
Update test_sum_triangular_numbers.py
ikostan Dec 20, 2024
a52cfd6
Update test_sum_triangular_numbers.py
ikostan Dec 20, 2024
fc8d590
Update node.py
ikostan Dec 20, 2024
3852e5f
Update you_are_square.py
ikostan Dec 20, 2024
95721fd
Update vaporcode.py
ikostan Dec 20, 2024
0c53145
Update two_decimal_places.py
ikostan Dec 20, 2024
e77752a
Update test_you_are_square.py
ikostan Dec 20, 2024
f7ba738
Update test_remove_the_minimum.py
ikostan Dec 20, 2024
86ef448
Update sentencify.py
ikostan Dec 20, 2024
515e597
Update disemvowel_trolls.py
ikostan Dec 20, 2024
56f0ad9
Update make_class.py
ikostan Dec 20, 2024
764a1c5
Update __init__.py
ikostan Dec 20, 2024
f65d890
Update __init__.py
ikostan Dec 20, 2024
2211d60
Update is_isogram.py
ikostan Dec 20, 2024
aaaaa3c
Update growing_plant.py
ikostan Dec 20, 2024
abc9b9b
Update save.py
ikostan Dec 20, 2024
65c5e21
Update jaden_casing_strings.py
ikostan Dec 20, 2024
c553a0e
Update jaden_casing_strings.py
ikostan Dec 20, 2024
c7cc076
Update remove_the_minimum.py
ikostan Dec 20, 2024
b535386
Update README.md
ikostan Dec 20, 2024
c152e44
Update animal.py
ikostan Dec 20, 2024
9e49c0b
Update remove_the_minimum.py
ikostan Dec 20, 2024
10892b4
Update remove_the_minimum.py
ikostan Dec 20, 2024
366cf73
Merge pull request #565 from iKostanOrg/kyu7
ikostan Dec 20, 2024
31e565b
Update test_count_letters_and_digits.py
ikostan Dec 20, 2024
9f998ec
Update test_check_root.py
ikostan Dec 20, 2024
fb9e195
Merge pull request #566 from iKostanOrg/master
ikostan Dec 20, 2024
a7df8d8
Docs for kyu_6
ikostan Dec 20, 2024
553b594
new docs
ikostan Dec 20, 2024
0e585c8
new module
ikostan Dec 20, 2024
0818267
Create kyu_6.a_rule_of_divisibility_by_13.readme.rst
ikostan Dec 20, 2024
5d11cbd
Update kyu_6.readme.rst
ikostan Dec 20, 2024
dfdbbdc
Update kyu_6.scheduling.readme.rst
ikostan Dec 20, 2024
3b90d16
Update kyu_6.rst
ikostan Dec 20, 2024
11975fb
Update kyu_7.rst
ikostan Dec 20, 2024
1741a48
Update README.md
ikostan Dec 20, 2024
81b4d6a
Update README.md
ikostan Dec 20, 2024
e1a6372
array_diff
ikostan Dec 20, 2024
651466b
array_to_html_table
ikostan Dec 20, 2024
d05fbbf
binary_to_text_ascii_conversion
ikostan Dec 20, 2024
b46a821
casino_chips
ikostan Dec 20, 2024
509e5cf
color_choice
ikostan Dec 20, 2024
2f8b148
count_letters_in_string
ikostan Dec 20, 2024
884832b
character_frequency
ikostan Dec 20, 2024
f6386f9
Update kyu_6.rst
ikostan Dec 20, 2024
8866b68
decipher_this
ikostan Dec 20, 2024
486fa35
default_list
ikostan Dec 21, 2024
1afe06e
disease_spread
ikostan Dec 21, 2024
d3c46a6
duplicate_encoder
ikostan Dec 21, 2024
138d1c1
easy_diagonal
ikostan Dec 21, 2024
4ebb456
encrypt_this
ikostan Dec 21, 2024
3c8d75f
find_the_odd_int
ikostan Dec 21, 2024
351bd2c
first_character_that_repeats
ikostan Dec 21, 2024
3f5a91c
format_string_of_names
ikostan Dec 21, 2024
a432e52
help_the_bookseller
ikostan Dec 21, 2024
4c3a347
longest_repetition
ikostan Dec 21, 2024
56f6e8d
Update kyu_6.help_the_bookseller.module.rst
ikostan Dec 21, 2024
1276ee3
multiples_of_3_or_5
ikostan Dec 21, 2024
0ac1c13
no_arithmetic_progressions
ikostan Dec 21, 2024
190788a
number_zoo_patrol
ikostan Dec 21, 2024
41ae100
numericals_of_string
ikostan Dec 21, 2024
9eeca57
permute_a_palindrome
ikostan Dec 21, 2024
8ae9dbc
pokemon_damage_calculator
ikostan Dec 21, 2024
4286635
potion_class_101
ikostan Dec 21, 2024
bcef888
pyramid_array
ikostan Dec 21, 2024
bca693e
rotate_the_letters_of_each_element
ikostan Dec 21, 2024
741aee1
row_of_the_odd_triangle
ikostan Dec 21, 2024
ae7c453
sort_the_odd
ikostan Dec 21, 2024
247434a
string_subpattern_recognition_1
ikostan Dec 21, 2024
a715e4e
string_subpattern_recognition_2
ikostan Dec 21, 2024
817f3b6
Update kyu_6.sort_the_odd.module.rst
ikostan Dec 21, 2024
c093d14
Update kyu_6.sort_the_odd.module.rst
ikostan Dec 21, 2024
0d10246
string_subpattern_recognition_3
ikostan Dec 21, 2024
7123991
string_transformer
ikostan Dec 21, 2024
c538f1a
sum_of_digits_digital_root
ikostan Dec 21, 2024
d1520ae
sums_of_parts
ikostan Dec 21, 2024
534a2ea
Update kyu_6.sum_of_digits_digital_root.module.rst
ikostan Dec 21, 2024
c49bd81
unique_in_order
ikostan Dec 21, 2024
ce2d161
valid_braces
ikostan Dec 21, 2024
550f29e
vasya_clerk
ikostan Dec 21, 2024
51644d6
who_likes_it
ikostan Dec 21, 2024
46bebf2
your_order_please
ikostan Dec 21, 2024
829ba43
your_order_please
ikostan Dec 21, 2024
2c87f63
multidimensional_neighbourhood
ikostan Dec 21, 2024
c5cf158
not_very_secure
ikostan Dec 21, 2024
72389ae
number_of_trailing_zeros_of_n
ikostan Dec 21, 2024
266a8e3
simple_pig_latin
ikostan Dec 21, 2024
3af528e
sports_league_table_ranking
ikostan Dec 21, 2024
d06d507
string_incrementer
ikostan Dec 22, 2024
a1113fe
sum_of_pairs
ikostan Dec 22, 2024
fc89c36
Update kyu_5.string_incrementer.module.rst
ikostan Dec 22, 2024
fcee072
Update kyu_5.sum_of_pairs.module.rst
ikostan Dec 22, 2024
9afef0b
the_hashtag_generator
ikostan Dec 22, 2024
7af45b7
tic_tac_toe_checker
ikostan Dec 22, 2024
11bb9fd
valid_parentheses
ikostan Dec 22, 2024
b7748eb
where_my_anagrams_at
ikostan Dec 22, 2024
7a4abfe
Update index.rst
ikostan Dec 22, 2024
d76b8cb
Merge pull request #567 from iKostanOrg/Documentation
ikostan Dec 22, 2024
53ec721
Merge pull request #568 from iKostanOrg/master
ikostan Dec 22, 2024
cd897db
Merge pull request #569 from iKostanOrg/kyu7
ikostan Dec 22, 2024
6cdfa96
Merge pull request #570 from iKostanOrg/master
ikostan Dec 22, 2024
e73f141
Update index.rst
ikostan Dec 22, 2024
d76f7e6
docs for kyu_7
ikostan Dec 22, 2024
14f6edb
Update kyu_7.readme.rst
ikostan Dec 22, 2024
73a9233
always_perfect
ikostan Dec 22, 2024
e1881f0
Update kyu_7.always_perfect.module.rst
ikostan Dec 22, 2024
8fc0aa4
Update kyu_7.coloured_triangles.readme.rst
ikostan Dec 22, 2024
e5539c2
basic_math_add_or_subtract
ikostan Dec 22, 2024
c82ed6e
beginner_series_sum_of_numbers
ikostan Dec 22, 2024
d0434e8
disemvowel_trolls
ikostan Dec 22, 2024
4150a6e
easy_line
ikostan Dec 22, 2024
cb888c3
factorial
ikostan Dec 22, 2024
f9afea5
fill_the_hard_disk_drive
ikostan Dec 22, 2024
fa4b861
find_the_longest_gap
ikostan Dec 22, 2024
698bf8e
formatting_decimal_places_1
ikostan Dec 22, 2024
787b34c
fun_with_lists_length
ikostan Dec 22, 2024
3363fc9
growing_plant
ikostan Dec 22, 2024
392ac9d
help_bob_count_letters_and_digits
ikostan Dec 22, 2024
1e2d86a
isograms
ikostan Dec 22, 2024
a666bb5
jaden_casing_strings
ikostan Dec 22, 2024
794cd43
make_class
ikostan Dec 22, 2024
558dc42
maximum_multiple
ikostan Dec 22, 2024
5f54eae
password_validator
ikostan Dec 22, 2024
72c5756
powers_of_3
ikostan Dec 22, 2024
7763ce8
pull_your_words_together_man
ikostan Dec 22, 2024
02c8097
remove_the_minimum
ikostan Dec 22, 2024
997f0f5
share_prices
ikostan Dec 22, 2024
29f6fb1
significant_figures
ikostan Dec 22, 2024
790aef4
simple_fun_152
ikostan Dec 22, 2024
52d9334
sort_out_the_men_from_boys
ikostan Dec 22, 2024
22cbe47
substituting_variables_into_strings_padded_numbers
ikostan Dec 22, 2024
4c6bf74
sum_of_odd_numbers
ikostan Dec 22, 2024
4ed2375
sum_of_powers_of_2
ikostan Dec 22, 2024
fb1a682
sum_of_odd_numbers
ikostan Dec 22, 2024
cf1ad17
sum_of_triangular_numbers
ikostan Dec 22, 2024
eefc8bc
sum_of_two_lowest_int
ikostan Dec 22, 2024
ba7d801
the_first_non_repeated_character_in_string
ikostan Dec 22, 2024
20580db
valid_parentheses
ikostan Dec 22, 2024
8e2ecac
vaporcode
ikostan Dec 22, 2024
1c4d4ae
you_are_square
ikostan Dec 22, 2024
90af04d
kyu_8
ikostan Dec 22, 2024
a50e947
Update kyu_8.readme.rst
ikostan Dec 22, 2024
d2aedc3
Merge pull request #571 from iKostanOrg/Documentation
ikostan Dec 22, 2024
94ac9d5
Update README.md
ikostan Dec 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 13 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
version: 2.1 # use CircleCI 2.1
---
version: 2.1 # use CircleCI 2.1
orbs:
python: circleci/python@2.1.1

jobs: # A basic unit of work in a run
jobs: # A basic unit of work in a run

build: # runs not using Workflows must have a `build` job as entry point
build: # runs not using Workflows must have a `build` job as entry point
# How to specify Python version in circleCI orb?
# https://discuss.circleci.com/t/how-to-specify-python-version-in-circleci-orb/47322/3
executor:
name: python/default
# use Python 3.10
tag: "3.12"

steps: # steps that comprise the `build` job
steps: # steps that comprise the `build` job
- checkout
- run:
command:
python --version
python --version
name: Check python version
- run:
command:
Expand Down Expand Up @@ -45,10 +46,12 @@ jobs: # A basic unit of work in a run
command:
python -m pytest
name: Run tests with pytest

- store_test_results: # Upload test results for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/
# Upload test results for display in Test Summary:
# https://circleci.com/docs/2.0/collect-test-data/
- store_test_results:
path: test-results/

- store_artifacts: # Upload test summary for display in Artifacts: https://circleci.com/docs/2.0/artifacts/
# Upload test summary for display in Artifacts:
# https://circleci.com/docs/2.0/artifacts/
- store_artifacts:
path: test-results/
destination: tr1
destination: tr1
42 changes: 21 additions & 21 deletions .codacy.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
---
engines:
duplication:
enabled: true
enabled: true
metric:
enabled: true
enabled: true
coverage:
enabled: true
enabled: true
prospector:
enabled: true
pylint:
enabled: true
python_version: 3.7
languages:
python:
extensions:
- '.py'
python:
extensions:
- '.py'
markup:
extensions:
- '.md'
extensions:
- '.md'
exclude_paths:
- 'docs/**'
- 'allure-report/**'
- 'img/**'
- '.circleci/**'
- '.circleci/**'
- '.github/**'
- '*__init__.py'
- 'rocro.yml'
- 'requirements.txt'
- 'pytest.ini'
- '.travis.yml'
- '.gitignore'
- '.gitattributes'
- 'docs/**'
- 'allure-report/**'
- 'img/**'
- '.circleci/**'
- '.circleci/**'
- '.github/**'
- '*__init__.py'
- 'rocro.yml'
- 'requirements.txt'
- 'pytest.ini'
- '.travis.yml'
- '.gitignore'
- '.gitattributes'
19 changes: 19 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
version: "2" # required to adjust maintainability checks

checks:
import-error:
enabled: false
syntax-error:
enabled: false
no-name-in-module:
enabled: false
similar-code:
config:
threshold: 68
identical-code:
config:
threshold: 32
plugins:
duplication:
enabled: false
12 changes: 12 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,15 @@ omit =
__init__*
*.md
docs/*
venv/*
*.gif
*.html
/tests/*
test_*

[report]
; Regexes for lines to exclude from consideration

exclude_also =
; Don't complain if non-runnable code isn't run:
if __name__ == .__main__.:
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ updates:
interval: "daily"
# Labels on pull requests for version updates only
labels:
- "GitHub actions versions"
- "GitHub actions versions"
47 changes: 47 additions & 0 deletions .github/workflows/codeclimate_coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Code Climate Coverage Report

on: # yamllint disable-line rule:truthy
pull_request_target:
types:
- opened
- edited
- synchronize
- reopened
workflow_call:
secrets:
cc_test_reporter_id:
required: true

jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.X"]
steps:
- uses: actions/checkout@main
- name: Setup Python
uses: actions/setup-python@main
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install pytest
pip install -r requirements.txt
pip install pytest-cov
- name: Check PYTHONPATH
run: |
pwd
export PYTHONPATH=.:$PYTHONPATH
- name: Upload coverage to Code Climate
uses: paambaati/codeclimate-action@v9.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
# yamllint disable rule:line-length
coverageCommand: python -m pytest . -v --cov-report term-missing --cov-report=xml --cov=./
# yamllint enable rule:line-length
debug: true
50 changes: 50 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: Codecov Coverage Report

on: # yamllint disable-line rule:truthy
pull_request_target:
types:
- opened
- edited
- synchronize
- reopened
# Why is Codecov upload step in GitHub Actions not finding the token?
# https://stackoverflow.com/questions/78298827/why-is-codecov-upload-step-in-github-actions-not-finding-the-token
workflow_call:
secrets:
codecov_token:
required: true
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]
steps:
- uses: actions/checkout@main
- 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
# 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: Upload coverage to Codecov
uses: codecov/codecov-action@v5.1.2
with:
token: ${{ secrets.codecov_token }}
files: coverage.xml
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
98 changes: 98 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
# yamllint disable
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#

name: "CodeQL"

on: # yamllint disable-line rule:truthy
pull_request_target:
types:
- opened
- edited
- synchronize
- reopened
workflow_call:

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Check to make sure that the module is in your Python path
run: |
echo $PYTHONPATH
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
49 changes: 49 additions & 0 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: Flake8

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 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
flake8 . --count --max-complexity=10 --max-line-length=127 --benchmark --show-source --statistics
# yamllint enable rule:line-length
Loading
Loading