Skip to content

Commit 7634ccb

Browse files
committed
Merge branch 'develop'
2 parents 64e3be4 + 43bc413 commit 7634ccb

23 files changed

+344
-102
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
[English](README.md) | [Korean](README_ko-KR.md)
88

9-
This repository is an implementation of algorithms, data structures, and problem solving. These are written in C++, Python, and Java, and each language uses the following test framework: [Google Test](https://google.github.io/googletest/)(C++), [pytest](https://docs.pytest.org/)(Python), [JUnit](https://junit.org/)(Java). Run tests to perform methods/functions on the algorithmic logic. GitHub Actions workflows that build and test code run manually.
9+
This repository is an implementation of algorithms, data structures, and problem-solving. These are written in C++, Python, and Java, and each language uses the following test framework: [Google Test](https://google.github.io/googletest/)(C++), [pytest](https://docs.pytest.org/)(Python), [JUnit](https://junit.org/)(Java). Run tests to perform methods/functions on the algorithmic logic. GitHub Actions workflows that build and test code run manually.
1010

1111
## Project Environments
1212

1313
Each project is configured in specific environments, as described below:
1414

1515
- C++ project: C++20 / [CMake](https://cmake.org/) build / [GNU Scientific Library (GSL)](https://www.gnu.org/software/gsl/), [Google Test](https://google.github.io/googletest/), [Google Benchmark](https://github.com/google/benchmark), [fmt](https://github.com/fmtlib/fmt) packages / [vcpkg](https://github.com/microsoft/vcpkg) package manager
16-
- Python project: Python 3.11 / [Poetry](https://python-poetry.org/) / [NumPy](https://numpy.org/), [SciPy](https://www.scipy.org/), [pytest](https://docs.pytest.org/), [pytest-benchmark](https://pytest-benchmark.readthedocs.io/en/latest/) packages
16+
- Python project: Python 3.11 / [Poetry](https://python-poetry.org/) / [NumPy](https://numpy.org/), [SciPy](https://www.scipy.org/), [NetworkX](https://networkx.org/), [pytest](https://docs.pytest.org/), [pytest-benchmark](https://pytest-benchmark.readthedocs.io/en/latest/) packages
1717
- Java project: Java 17 / [Gradle](https://gradle.org/) build / [JUnit](https://junit.org/), [Java Microbenchmark Harness (JMH)](https://github.com/openjdk/jmh) libraries
1818

1919
## Table of Contents

README_ko-KR.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
각 프로젝트는 다음과 같은 환경에서 구성되었습니다:
1414

1515
- C++ project: C++20 / [CMake](https://cmake.org/) build / [GNU Scientific Library (GSL)](https://www.gnu.org/software/gsl/), [Google Test](https://google.github.io/googletest/), [Google Benchmark](https://github.com/google/benchmark), [fmt](https://github.com/fmtlib/fmt) packages / [vcpkg](https://github.com/microsoft/vcpkg) package manager
16-
- Python project: Python 3.11 / [Poetry](https://python-poetry.org/) / [NumPy](https://numpy.org/), [SciPy](https://www.scipy.org/), [pytest](https://docs.pytest.org/), [pytest-benchmark](https://pytest-benchmark.readthedocs.io/en/latest/) packages
16+
- Python project: Python 3.11 / [Poetry](https://python-poetry.org/) / [NumPy](https://numpy.org/), [SciPy](https://www.scipy.org/), [NetworkX](https://networkx.org/), [pytest](https://docs.pytest.org/), [pytest-benchmark](https://pytest-benchmark.readthedocs.io/en/latest/) packages
1717
- Java project: Java 17 / [Gradle](https://gradle.org/) build / [JUnit](https://junit.org/), [Java Microbenchmark Harness (JMH)](https://github.com/openjdk/jmh) libraries

python-algorithm/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,5 +589,4 @@ FodyWeavers.xsd
589589
### Others
590590

591591
.idea/
592-
poetry.lock
593592
README_link.md

python-algorithm/algorithm/greedy/test/__init__.py

Whitespace-only changes.

python-algorithm/algorithm/greedy/test_cashier_change.py renamed to python-algorithm/algorithm/greedy/test/test_cashier_change.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44

55

66
@pytest.mark.benchmark(group="cashier_change")
7-
@pytest.mark.parametrize("denominations, price, expected", [
8-
([25, 10, 5, 1], 30, 2),
9-
([25, 10, 5, 1], 24, 6),
10-
], ids=["successful1", "successful2"])
7+
@pytest.mark.parametrize(
8+
argnames="denominations, price, expected",
9+
argvalues=[
10+
([25, 10, 5, 1], 30, 2),
11+
([25, 10, 5, 1], 24, 6)
12+
],
13+
ids=["case1", "case2"])
1114
def test_cashier_change(benchmark, denominations, price, expected):
1215
result = benchmark(cashier_change, denominations, price)
1316
assert expected == result

python-algorithm/algorithm/greedy/test_interval_schedule.py renamed to python-algorithm/algorithm/greedy/test/test_interval_schedule.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616

1717

1818
@pytest.mark.benchmark(group="interval_scheduling_lecture")
19-
@pytest.mark.parametrize("lectures, expected", [
20-
([lecture1, lecture2, lecture3], [lecture2, lecture3]),
21-
], ids=["successful"])
19+
@pytest.mark.parametrize(
20+
argnames="lectures, expected",
21+
argvalues=[([lecture1, lecture2, lecture3], [lecture2, lecture3])],
22+
ids=["case1"])
2223
def test_interval_scheduling_lecture(benchmark, lectures, expected):
2324
result = benchmark(interval_scheduling_lecture, lectures)
2425
assert expected == result

python-algorithm/algorithm/math/test/__init__.py

Whitespace-only changes.

python-algorithm/algorithm/math/test_addition_integer.py renamed to python-algorithm/algorithm/math/test/test_addition_integer.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55

66
@pytest.mark.benchmark(group="addition_of_binary_number")
7-
@pytest.mark.parametrize("a, b, expected", [
8-
('1110', '1011', '11001'),
9-
], ids=["successful"])
7+
@pytest.mark.parametrize(
8+
argnames="a, b, expected",
9+
argvalues=[('1110', '1011', '11001')],
10+
ids=["case1"])
1011
def test_addition_of_binary_number(benchmark, a, b, expected):
1112
result = benchmark(addition_binary_number, a, b)
1213
assert expected == result

python-algorithm/algorithm/math/test_base_expansion.py renamed to python-algorithm/algorithm/math/test/test_base_expansion.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44

55

66
@pytest.mark.benchmark(group="base_expansion")
7-
@pytest.mark.parametrize("number, base, expected", [
8-
(12345, 8, '30071'),
9-
(177130, 16, '2B3EA'),
10-
(241, 2, '11110001'),
11-
], ids=["base8", "base16", "base2"])
7+
@pytest.mark.parametrize(
8+
argnames="number, base, expected",
9+
argvalues=[
10+
(12345, 8, '30071'),
11+
(177130, 16, '2B3EA'),
12+
(241, 2, '11110001')
13+
],
14+
ids=["base8", "base16", "base2"])
1215
def test_base_expansion(benchmark, number, base, expected):
1316
result = benchmark(base_expansion, number, base)
1417
assert expected == result

python-algorithm/algorithm/math/test_greatest_common_divisor.py renamed to python-algorithm/algorithm/math/test/test_greatest_common_divisor.py

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,41 @@
44

55

66
@pytest.mark.benchmark(group="gcd_euclidean")
7-
@pytest.mark.parametrize("pair, expected", [
8-
((24, 36), 12),
9-
((17, 22), 1),
10-
((120, 500), 20),
11-
])
7+
@pytest.mark.parametrize(
8+
argnames="pair, expected",
9+
argvalues=[
10+
((24, 36), 12),
11+
((17, 22), 1),
12+
((120, 500), 20)
13+
])
1214
def test_gcd_euclidean(benchmark, pair, expected):
1315
assert is_positive_integer(*pair) is True
1416
result = benchmark(gcd_euclidean, *pair)
1517
assert expected == result
1618

1719

1820
@pytest.mark.benchmark(group="gcd_euclidean_divmod")
19-
@pytest.mark.parametrize("pair, expected", [
20-
((24, 36), 12),
21-
((17, 22), 1),
22-
((120, 500), 20),
23-
])
21+
@pytest.mark.parametrize(
22+
argnames="pair, expected",
23+
argvalues=[
24+
((24, 36), 12),
25+
((17, 22), 1),
26+
((120, 500), 20)
27+
])
2428
def test_gcd_euclidean_divmod(benchmark, pair, expected):
2529
assert is_positive_integer(*pair) is True
2630
result = benchmark(gcd_euclidean_divmod, *pair)
2731
assert expected == result
2832

2933

3034
@pytest.mark.benchmark(group="gcd_extended_euclidean")
31-
@pytest.mark.parametrize("pair, expected", [
32-
((24, 36), (12, -1, 1)),
33-
((17, 22), (1, -9, 7)),
34-
((120, 500), (20, -4, 1)),
35-
])
35+
@pytest.mark.parametrize(
36+
argnames="pair, expected",
37+
argvalues=[
38+
((24, 36), (12, -1, 1)),
39+
((17, 22), (1, -9, 7)),
40+
((120, 500), (20, -4, 1))
41+
])
3642
def test_gcd_extended_euclidean(benchmark, pair, expected):
3743
assert is_positive_integer(*pair) is True
3844
result = benchmark(gcd_extended_euclidean, *pair)

0 commit comments

Comments
 (0)