Skip to content

Commit d092547

Browse files
committed
chore: swap coveralls to codecov, python 3.14
1 parent e53c768 commit d092547

File tree

18 files changed

+91
-123
lines changed

18 files changed

+91
-123
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,34 @@ jobs:
1919
lint:
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v4
23-
- uses: extractions/setup-just@v2
24-
- uses: actions/setup-python@v5
22+
- uses: actions/checkout@v5
23+
- uses: extractions/setup-just@v3
24+
- uses: actions/setup-python@v6
2525
with:
26-
python-version: '3.13'
26+
python-version: '3.14'
2727
- run: just install lint
2828
test:
2929
runs-on: ubuntu-latest
3030
strategy:
3131
matrix:
32-
pythonversion: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
32+
pythonversion: ['3.10', '3.11', '3.12', '3.13', '3.14']
3333
steps:
34-
- uses: actions/checkout@v4
35-
- uses: extractions/setup-just@v2
36-
- uses: actions/setup-python@v5
34+
- uses: actions/checkout@v5
35+
- uses: extractions/setup-just@v3
36+
- uses: actions/setup-python@v6
3737
with:
3838
python-version: ${{ matrix.pythonversion }}
3939
- run: just install coverage
4040
coverage:
4141
if: github.ref == 'refs/heads/main'
4242
runs-on: ubuntu-latest
4343
steps:
44-
- uses: actions/checkout@v4
45-
- uses: extractions/setup-just@v2
46-
- uses: actions/setup-python@v5
44+
- uses: actions/checkout@v5
45+
- uses: extractions/setup-just@v3
46+
- uses: actions/setup-python@v6
4747
with:
48-
python-version: '3.13'
48+
python-version: '3.14'
4949
- run: just install coverage
50-
- uses: coverallsapp/github-action@v2
50+
- uses: codecov/codecov-action@v5
5151
with:
52-
github-token: ${{ secrets.GITHUB_TOKEN }}
53-
path-to-lcov: './coverage.lcov'
52+
token: ${{ secrets.CODECOV_TOKEN }}

CHANGELOG.md

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Classic algorithms including Fizz Buzz, Bubble Sort, the Fibonacci Sequence, a Sudoku solver, and more.
66

77
[![Build](https://github.com/Justintime50/algorithms/workflows/build/badge.svg)](https://github.com/Justintime50/algorithms/actions)
8-
[![Coverage Status](https://coveralls.io/repos/github/Justintime50/algorithms/badge.svg?branch=main)](https://coveralls.io/github/Justintime50/algorithms?branch=main)
8+
[![Coverage Status](https://img.shields.io/codecov/c/github/justintime50/algorithms)](https://app.codecov.io/github/Justintime50/algorithms)
99
[![Licence](https://img.shields.io/github/license/justintime50/algorithms)](LICENSE)
1010

1111
<img src="https://raw.githubusercontent.com/justintime50/assets/main/src/algorithms/showcase.png" alt="Showcase">

algorithms/recursion/invert_binary_tree.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def invert_tree(node: TreeNode) -> TreeNode:
2727
def print_tree(node: TreeNode):
2828
"""Print the output of the tree."""
2929
# Print the top level node
30-
print(node.val, end='')
30+
print(node.val, end="")
3131

3232
# If other nodes exist, print them too
3333
if node.left:
@@ -46,19 +46,19 @@ def main() -> TreeNode:
4646
tree.right.left = TreeNode(6)
4747
tree.right.right = TreeNode(7)
4848

49-
print('Original tree:')
49+
print("Original tree:")
5050
print_tree(tree)
51-
print('')
51+
print("")
5252

5353
# Send the entire tree to be inverted
5454
inverted_tree = invert_tree(tree)
5555

56-
print('Inverted tree:')
56+
print("Inverted tree:")
5757
print_tree(inverted_tree)
58-
print('')
58+
print("")
5959

6060
return inverted_tree
6161

6262

63-
if __name__ == '__main__':
63+
if __name__ == "__main__":
6464
main()

algorithms/recursion/sudoku_solver.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,27 +45,27 @@ def solve_sudoku_puzzle():
4545
count_numbers_added = count_numbers_backtracked = 0
4646
grid = GRID # Reassign here so we can pass it around and edit the values
4747

48-
print('Original:')
48+
print("Original:")
4949
for row in grid:
5050
print(row)
51-
print('\n')
51+
print("\n")
5252

5353
grid_solved = _solve_puzzle(grid)
5454

5555
if grid_solved:
56-
print('Solved:')
56+
print("Solved:")
5757
for row in grid:
5858
print(row)
59-
print(f'Numbers put into the Sudoku puzzle: {count_numbers_added}')
60-
print(f'Numbers that had to be backtracked due to a dead-end: {count_numbers_backtracked}')
59+
print(f"Numbers put into the Sudoku puzzle: {count_numbers_added}")
60+
print(f"Numbers that had to be backtracked due to a dead-end: {count_numbers_backtracked}")
6161

6262
# TODO: Count how many solutions the solver came up with
6363
# Only show this prompt if there are indeed more solutions
6464
# show_more = input('Show other solutions? (yes/no)')
6565
# if show_more.lower() != 'yes':
6666
# raise Error('Skipped showing other solutions.')
6767
else:
68-
raise Exception('No solution!')
68+
raise Exception("No solution!")
6969

7070

7171
def _check_valid_number(y: int, x: int, n: int, grid: List[List[int]]):
@@ -127,5 +127,5 @@ def main():
127127
solve_sudoku_puzzle()
128128

129129

130-
if __name__ == '__main__':
130+
if __name__ == "__main__":
131131
main()

algorithms/search/breadth_first_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ def breadth_first_search(visited, graph, node):
3131
return traversal_order
3232

3333

34-
if __name__ == '__main__':
34+
if __name__ == "__main__":
3535
main()

algorithms/search/depth_first_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ def depth_first_search(visited, traversal_order, graph, node):
2222
return traversal_order
2323

2424

25-
if __name__ == '__main__':
25+
if __name__ == "__main__":
2626
main()

algorithms/sequences/fibonacci_sequence.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@
1212
"""
1313

1414

15-
ITERATIONS = int(os.getenv('ITERATIONS', 20))
15+
ITERATIONS = int(os.getenv("ITERATIONS", 20))
1616

1717

1818
def generate_fibonacci_sequence():
1919
_validate_iterations()
20-
print(f'The Fibonacci Sequence to {ITERATIONS} iterations:')
20+
print(f"The Fibonacci Sequence to {ITERATIONS} iterations:")
2121
fibonacci_sequence = _iterate_fibonacci_sequence()
22-
print(', '.join([str(number) for number in fibonacci_sequence]))
22+
print(", ".join([str(number) for number in fibonacci_sequence]))
2323

2424

2525
def _validate_iterations():
2626
"""Ensure the iterations value is within the acceptable range."""
2727
if ITERATIONS >= 94:
2828
raise ValueError(
29-
'You have requested too many iterations - computers can literally'
30-
' only print up to 93 iterations before the Fibonacci number exceeds'
31-
' the max value allowed in memory. Please select a lower number and try again.'
29+
"You have requested too many iterations - computers can literally"
30+
" only print up to 93 iterations before the Fibonacci number exceeds"
31+
" the max value allowed in memory. Please select a lower number and try again."
3232
)
3333
if ITERATIONS < 1:
34-
raise ValueError('ITERATIONS must be greater than or equal to 1.')
34+
raise ValueError("ITERATIONS must be greater than or equal to 1.")
3535

3636

3737
def _iterate_fibonacci_sequence() -> Iterator[int]:
@@ -52,5 +52,5 @@ def main():
5252
generate_fibonacci_sequence()
5353

5454

55-
if __name__ == '__main__':
55+
if __name__ == "__main__":
5656
main()

algorithms/sequences/fizzbuzz.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
"""
1818

1919

20-
ITERATIONS = int(os.getenv('ITERATIONS', 15))
20+
ITERATIONS = int(os.getenv("ITERATIONS", 15))
2121

2222

2323
def generate_fizzbuzz():
2424
"""Iterate through numbers and print FizzBuzz to console."""
2525
_validate_iterations()
26-
print(f'Fizz Buzz to {ITERATIONS} iterations:')
26+
print(f"Fizz Buzz to {ITERATIONS} iterations:")
2727

2828
for iteration in range(1, ITERATIONS + 1):
2929
output = _determine_output(iteration)
@@ -33,7 +33,7 @@ def generate_fizzbuzz():
3333
def _validate_iterations():
3434
"""Validate the iterations before proceeding."""
3535
if ITERATIONS < 1:
36-
raise ValueError('ITERATIONS must be greater than or equal to 1.')
36+
raise ValueError("ITERATIONS must be greater than or equal to 1.")
3737

3838

3939
def _determine_output(iteration) -> str:
@@ -42,11 +42,11 @@ def _determine_output(iteration) -> str:
4242
buzz = iteration % 5 == 0
4343

4444
if fizz and buzz:
45-
output = 'FizzBuzz'
45+
output = "FizzBuzz"
4646
elif fizz:
47-
output = 'Fizz'
47+
output = "Fizz"
4848
elif buzz:
49-
output = 'Buzz'
49+
output = "Buzz"
5050
else:
5151
output = str(iteration)
5252

@@ -57,5 +57,5 @@ def main():
5757
generate_fizzbuzz()
5858

5959

60-
if __name__ == '__main__':
60+
if __name__ == "__main__":
6161
main()

algorithms/sequences/lockers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ def main():
4242
print(solution)
4343

4444

45-
if __name__ == '__main__':
45+
if __name__ == "__main__":
4646
main()

0 commit comments

Comments
 (0)