Skip to content

Commit 6c5db7e

Browse files
committed
Convert all Japanese text to English
Converted all Japanese docstrings and comments to English across 25 test files to ensure repository contains ONLY English text. Changes: - All test docstrings converted from Japanese to English - All comments converted from Japanese to English - Maintained exact technical meaning and accuracy - Code structure and formatting preserved Common translations: - ~を確認 → Verify that... - ~が機能することを確認 → Verify that... works - ~がエラーになることを確認 → Verify that... raises an error - ~の動作確認 → Verify behavior of... Files converted (25 total): - Integration tests: 5 files - Unit tests: 17 files - E2E tests: 3 files Verification: - No Japanese text remains in repository (excluding third-party code) - All 950 tests pass - Technical accuracy maintained
1 parent 0190809 commit 6c5db7e

25 files changed

+268
-268
lines changed

tests/e2e/test_readme_examples.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
def test_basic_example():
12-
"""READMEの基本例をテスト."""
12+
"""Test README basic example.."""
1313
idxes = np.array([1, 2])
1414

1515
# rects is a list of (xmin, ymin, xmax, ymax)
@@ -48,7 +48,7 @@ def test_basic_example():
4848

4949

5050
def test_object_example():
51-
"""READMEのオブジェクト例をテスト."""
51+
"""Test README object example.."""
5252
objs = [{"name": "foo"}, (1, 2, 3)] # must NOT be unique but pickable
5353
rects = np.array([[0.0, 0.0, 1.0, 0.5], [1.0, 1.5, 1.2, 3.0]])
5454

@@ -66,7 +66,7 @@ def test_object_example():
6666

6767

6868
def test_batch_vs_single_query_example():
69-
"""READMEのバッチクエリ vs 単一クエリの例をテスト."""
69+
"""Test README batch query vs single query example.."""
7070
idxes = np.array([1, 2])
7171
rects = np.array([[0.0, 0.0, 1.0, 0.5], [1.0, 1.5, 1.2, 3.0]])
7272
prtree = PRTree2D(idxes, rects)
@@ -83,7 +83,7 @@ def test_batch_vs_single_query_example():
8383

8484

8585
def test_insert_erase_example():
86-
"""READMEの挿入・削除例をテスト."""
86+
"""Test README insert/erase example.."""
8787
idxes = np.array([1, 2])
8888
rects = np.array([[0.0, 0.0, 1.0, 0.5], [1.0, 1.5, 1.2, 3.0]])
8989
prtree = PRTree2D(idxes, rects)
@@ -101,7 +101,7 @@ def test_insert_erase_example():
101101

102102

103103
def test_save_load_example(tmp_path):
104-
"""READMEの保存・読込例をテスト."""
104+
"""Test README save/load example.."""
105105
idxes = np.array([1, 2])
106106
rects = np.array([[0.0, 0.0, 1.0, 0.5], [1.0, 1.5, 1.2, 3.0]])
107107
prtree = PRTree2D(idxes, rects)

tests/e2e/test_user_workflows.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
1010
def test_spatial_indexing_workflow(PRTree, dim):
11-
"""ユーザーワークフロー: 空間インデックスの構築とクエリ."""
11+
"""User workflow: spatial indexing and queries."""
1212
# Simulate a spatial database of objects
1313
n_objects = 1000
1414
np.random.seed(42)
@@ -37,7 +37,7 @@ def has_intersect(x, y, dim):
3737

3838
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
3939
def test_dynamic_updates_workflow(PRTree, dim):
40-
"""ユーザーワークフロー: 動的な更新(挿入・削除)."""
40+
"""User workflow: dynamic updates (insert/erase)."""
4141
# Start with empty tree
4242
tree = PRTree()
4343

@@ -86,7 +86,7 @@ def test_dynamic_updates_workflow(PRTree, dim):
8686

8787
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
8888
def test_persistence_workflow(PRTree, dim, tmp_path):
89-
"""ユーザーワークフロー: データの永続化."""
89+
"""User workflow: data persistence."""
9090
# Build initial tree
9191
n = 500
9292
idx = np.arange(n)
@@ -118,7 +118,7 @@ def test_persistence_workflow(PRTree, dim, tmp_path):
118118

119119

120120
def test_collision_detection_workflow_2d():
121-
"""ユーザーワークフロー: 2D衝突検出(ゲーム・シミュレーション)."""
121+
"""User workflow: 2D collision detection (game simulation)."""
122122
# Simulate game entities
123123
entities = {
124124
"player": [10, 10, 12, 12],
@@ -151,7 +151,7 @@ def test_collision_detection_workflow_2d():
151151

152152

153153
def test_object_storage_workflow_2d():
154-
"""ユーザーワークフロー: オブジェクト付きの空間インデックス."""
154+
"""User workflow: spatial index with objects."""
155155
# Store rich objects with spatial index
156156
objects = [
157157
{"id": 1, "type": "building", "name": "City Hall", "box": [0, 0, 10, 10]},
@@ -179,7 +179,7 @@ def test_object_storage_workflow_2d():
179179

180180
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3)])
181181
def test_batch_processing_workflow(PRTree, dim):
182-
"""ユーザーワークフロー: バッチ処理(大量クエリ)."""
182+
"""User workflow: batch processing (bulk queries)."""
183183
# Build index
184184
n = 1000
185185
idx = np.arange(n)
@@ -205,7 +205,7 @@ def test_batch_processing_workflow(PRTree, dim):
205205

206206
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
207207
def test_intersection_detection_workflow(PRTree, dim):
208-
"""ユーザーワークフロー: 全ペアの交差検出."""
208+
"""User workflow: all-pairs intersection detection."""
209209
# Simulate checking for overlapping regions
210210
n = 100
211211
idx = np.arange(n)
@@ -226,7 +226,7 @@ def test_intersection_detection_workflow(PRTree, dim):
226226

227227
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
228228
def test_rebuild_optimization_workflow(PRTree, dim):
229-
"""ユーザーワークフロー: 多数の更新後の最適化."""
229+
"""User workflow: optimization after many updates."""
230230
# Initial index
231231
n = 500
232232
idx = np.arange(n)

tests/integration/test_erase_query_workflow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
99
def test_erase_and_query_incrementally(PRTree, dim):
10-
"""インクリメンタルに削除しながらクエリする統合テスト."""
10+
"""Integration test: incremental erase with queries."""
1111
np.random.seed(42)
1212
n = 100
1313
idx = np.arange(n)
@@ -29,7 +29,7 @@ def test_erase_and_query_incrementally(PRTree, dim):
2929

3030
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
3131
def test_insert_erase_insert_workflow(PRTree, dim):
32-
"""挿入→削除→挿入のワークフローテスト."""
32+
"""Test insert → erase → insert workflow."""
3333
tree = PRTree()
3434

3535
# Insert
@@ -57,7 +57,7 @@ def test_insert_erase_insert_workflow(PRTree, dim):
5757

5858
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
5959
def test_bulk_erase_and_verify(PRTree, dim):
60-
"""大量削除後の検証テスト."""
60+
"""Test verification after bulk erase."""
6161
np.random.seed(42)
6262
n = 200
6363
idx = np.arange(n)

tests/integration/test_insert_query_workflow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
99
def test_incremental_insert_and_query(PRTree, dim):
10-
"""インクリメンタルに挿入しながらクエリする統合テスト."""
10+
"""Integration test: incremental insert with queries."""
1111
tree = PRTree()
1212

1313
n = 100
@@ -34,7 +34,7 @@ def test_incremental_insert_and_query(PRTree, dim):
3434

3535
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
3636
def test_insert_with_objects_and_query(PRTree, dim):
37-
"""オブジェクト付き挿入とクエリの統合テスト."""
37+
"""Integration test: insert with objects and query."""
3838
tree = PRTree()
3939

4040
n = 50
@@ -64,7 +64,7 @@ def test_insert_with_objects_and_query(PRTree, dim):
6464

6565
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
6666
def test_mixed_bulk_and_incremental_insert(PRTree, dim):
67-
"""一括挿入とインクリメンタル挿入の混合テスト."""
67+
"""Test mixed bulk and incremental insert."""
6868
np.random.seed(42)
6969
n_bulk = 50
7070
n_incremental = 50

tests/integration/test_mixed_operations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
1010
def test_complex_workflow(PRTree, dim, tmp_path):
11-
"""複雑なワークフロー: 構築→挿入→削除→rebuild→保存→読込→クエリ."""
11+
"""Complex workflow: build→insert→erase→rebuild→save→load→query."""
1212
np.random.seed(42)
1313
n = 100
1414
idx = np.arange(n)
@@ -62,7 +62,7 @@ def test_complex_workflow(PRTree, dim, tmp_path):
6262

6363
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
6464
def test_stress_operations(PRTree, dim):
65-
"""ストレステスト: 大量の挿入・削除・クエリ操作."""
65+
"""Stress test: massive insert, erase, and query operations."""
6666
tree = PRTree()
6767

6868
# Insert 1000 elements
@@ -99,7 +99,7 @@ def test_stress_operations(PRTree, dim):
9999

100100
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
101101
def test_query_intersections_after_modifications(PRTree, dim):
102-
"""変更後のquery_intersectionsテスト."""
102+
"""Test query_intersections after modifications."""
103103
np.random.seed(42)
104104
n = 50
105105
idx = np.arange(n)

tests/integration/test_persistence_query_workflow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
1010
def test_save_load_query_workflow(PRTree, dim, tmp_path):
11-
"""保存→読込→クエリのワークフローテスト."""
11+
"""Test save → load → query workflow."""
1212
np.random.seed(42)
1313
n = 100
1414
idx = np.arange(n)
@@ -39,7 +39,7 @@ def test_save_load_query_workflow(PRTree, dim, tmp_path):
3939

4040
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
4141
def test_modify_save_load_workflow(PRTree, dim, tmp_path):
42-
"""構築→変更→保存→読込のワークフローテスト."""
42+
"""Test build → modify → save → load workflow."""
4343
np.random.seed(42)
4444
n = 50
4545
idx = np.arange(n)
@@ -72,7 +72,7 @@ def test_modify_save_load_workflow(PRTree, dim, tmp_path):
7272

7373
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
7474
def test_multiple_save_load_cycles(PRTree, dim, tmp_path):
75-
"""複数の保存→読込サイクルのテスト."""
75+
"""Test multiple save → load cycles."""
7676
np.random.seed(42)
7777
n = 50
7878
idx = np.arange(n)

tests/integration/test_rebuild_query_workflow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
99
def test_rebuild_after_many_operations(PRTree, dim):
10-
"""多数の操作後のrebuildとクエリのテスト."""
10+
"""Test rebuild and query after many operations."""
1111
np.random.seed(42)
1212
n = 100
1313
idx = np.arange(n)
@@ -42,7 +42,7 @@ def test_rebuild_after_many_operations(PRTree, dim):
4242

4343
@pytest.mark.parametrize("PRTree, dim", [(PRTree2D, 2), (PRTree3D, 3), (PRTree4D, 4)])
4444
def test_rebuild_consistency_across_operations(PRTree, dim):
45-
"""rebuild前後の一貫性テスト."""
45+
"""Test consistency before and after rebuild."""
4646
np.random.seed(42)
4747
n = 100
4848
idx = np.arange(n)

0 commit comments

Comments
 (0)