repo_id stringclasses 400
values | commit_sha stringclasses 400
values | commit_index int32 0 951 | in_repo_split stringclasses 1
value | cross_repo_split stringclasses 1
value | test_file stringlengths 7 121 | test_function stringlengths 1 108 | assertion_type stringclasses 32
values | difficulty stringclasses 8
values | context_lines int32 3 600 | prefix large_stringlengths 44 113k | target large_stringlengths 1 498 | anchor_sha stringclasses 400
values | anchor_index int32 0 951 | qna_source stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_driver.py | test_standalone_mode | self.assertGreater | numeric_literal | 30 | import os.path
import unittest
import uuid
from loguru import logger
from benchmarks.gray_sort_benchmark import gray_sort_benchmark
from examples.sort_mock_urls import sort_mock_urls
from smallpond.common import GB, MB
from smallpond.execution.driver import Driver
from tests.test_fabric import TestFabric
class TestD... | 0) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_driver.py | test_standalone_mode | self.assertTrue | complex_expr | 29 | import os.path
import unittest
import uuid
from loguru import logger
from benchmarks.gray_sort_benchmark import gray_sort_benchmark
from examples.sort_mock_urls import sort_mock_urls
from smallpond.common import GB, MB
from smallpond.execution.driver import Driver
from tests.test_fabric import TestFabric
class TestD... | exec_plan.successful) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_execution.py | test_manifest_only_data_sink | self.assertEqual | variable | 163 | import functools
import os.path
import socket
import tempfile
import time
import unittest
from datetime import datetime
from typing import Iterable, List, Tuple
import pandas
import pyarrow as arrow
from loguru import logger
from pandas.core.api import DataFrame as DataFrame
from smallpond.common import GB, MB, split... | num_lines) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_execution.py | test_task_crash_as_oom | self.assertFalse | complex_expr | 151 | import functools
import os.path
import socket
import tempfile
import time
import unittest
from datetime import datetime
from typing import Iterable, List, Tuple
import pandas
import pyarrow as arrow
from loguru import logger
from pandas.core.api import DataFrame as DataFrame
from smallpond.common import GB, MB, split... | exec_plan.successful) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_execution.py | test_temp_outputs_in_final_results | self.assertEqual | complex_expr | 162 | import functools
import os.path
import socket
import tempfile
import time
import unittest
from datetime import datetime
from typing import Iterable, List, Tuple
import pandas
import pyarrow as arrow
from loguru import logger
from pandas.core.api import DataFrame as DataFrame
from smallpond.common import GB, MB, split... | final_output.num_rows) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_execution.py | test_data_sink_avoid_filename_conflicts | self.assertEqual | func_call | 161 | import functools
import os.path
import socket
import tempfile
import time
import unittest
from datetime import datetime
from typing import Iterable, List, Tuple
import pandas
import pyarrow as arrow
from loguru import logger
from pandas.core.api import DataFrame as DataFrame
from smallpond.common import GB, MB, split... | len(os.listdir(link_path))) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_execution.py | test_data_sink_avoid_filename_conflicts | self.assertEqual | func_call | 162 | import functools
import os.path
import socket
import tempfile
import time
import unittest
from datetime import datetime
from typing import Iterable, List, Tuple
import pandas
import pyarrow as arrow
from loguru import logger
from pandas.core.api import DataFrame as DataFrame
from smallpond.common import GB, MB, split... | len(os.listdir(copy_path))) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_execution.py | test_variable_length_input_datasets | self.assertEqual | complex_expr | 179 | import functools
import os.path
import socket
import tempfile
import time
import unittest
from datetime import datetime
from typing import Iterable, List, Tuple
import pandas
import pyarrow as arrow
from loguru import logger
from pandas.core.api import DataFrame as DataFrame
from smallpond.common import GB, MB, split... | arrow_batch_output.num_rows) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_execution.py | test_variable_length_input_datasets | self.assertEqual | complex_expr | 180 | import functools
import os.path
import socket
import tempfile
import time
import unittest
from datetime import datetime
from typing import Iterable, List, Tuple
import pandas
import pyarrow as arrow
from loguru import logger
from pandas.core.api import DataFrame as DataFrame
from smallpond.common import GB, MB, split... | pandas_batch_output.num_rows) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_execution.py | test_projection_task | self.assertEqual | func_call | 189 | import functools
import os.path
import socket
import tempfile
import time
import unittest
from datetime import datetime
from typing import Iterable, List, Tuple
import pandas
import pyarrow as arrow
from loguru import logger
from pandas.core.api import DataFrame as DataFrame
from smallpond.common import GB, MB, split... | sorted(final_table.column_names)) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_execution.py | test_override_output_path | self.assertTrue | func_call | 168 | import functools
import os.path
import socket
import tempfile
import time
import unittest
from datetime import datetime
from typing import Iterable, List, Tuple
import pandas
import pyarrow as arrow
from loguru import logger
from pandas.core.api import DataFrame as DataFrame
from smallpond.common import GB, MB, split... | os.path.exists(os.path.join(output_path, "url_counts"))) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_execution.py | test_override_output_path | self.assertTrue | func_call | 169 | import functools
import os.path
import socket
import tempfile
import time
import unittest
from datetime import datetime
from typing import Iterable, List, Tuple
import pandas
import pyarrow as arrow
from loguru import logger
from pandas.core.api import DataFrame as DataFrame
from smallpond.common import GB, MB, split... | os.path.exists(os.path.join(output_path, "FinalResults"))) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_execution.py | test_variable_length_input_datasets | self.assertTrue | func_call | 170 | import functools
import os.path
import socket
import tempfile
import time
import unittest
from datetime import datetime
from typing import Iterable, List, Tuple
import pandas
import pyarrow as arrow
from loguru import logger
from pandas.core.api import DataFrame as DataFrame
from smallpond.common import GB, MB, split... | all(map(os.path.exists, exec_plan.final_output.resolved_paths))) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_execution.py | test_partial_process_func | self.assertEqual | func_call | 171 | import functools
import os.path
import socket
import tempfile
import time
import unittest
from datetime import datetime
from typing import Iterable, List, Tuple
import pandas
import pyarrow as arrow
from loguru import logger
from pandas.core.api import DataFrame as DataFrame
from smallpond.common import GB, MB, split... | exec_plan.get_output("random_urls_k5").to_arrow_table().num_rows) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_execution.py | test_partial_process_func | self.assertEqual | func_call | 175 | import functools
import os.path
import socket
import tempfile
import time
import unittest
from datetime import datetime
from typing import Iterable, List, Tuple
import pandas
import pyarrow as arrow
from loguru import logger
from pandas.core.api import DataFrame as DataFrame
from smallpond.common import GB, MB, split... | exec_plan.get_output("random_urls_k10").to_arrow_table().num_rows) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_execution.py | test_data_sink_avoid_filename_conflicts | self.assertEqual | func_call | 164 | import functools
import os.path
import socket
import tempfile
import time
import unittest
from datetime import datetime
from typing import Iterable, List, Tuple
import pandas
import pyarrow as arrow
from loguru import logger
from pandas.core.api import DataFrame as DataFrame
from smallpond.common import GB, MB, split... | set(filename for filename in os.listdir(copy_input_path) if filename.endswith(".parquet"))) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_fabric.py | tearDown | assert | numeric_literal | 85 | import os.path
import queue
import sys
import unittest
from concurrent.futures import ThreadPoolExecutor
from datetime import datetime
from multiprocessing import Manager, Process
from typing import List, Optional
import fsspec
import numpy as np
import psutil
import pyarrow as arrow
import pyarrow.compute as pc
impor... | 0 | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_fabric.py | _compare_arrow_tables | assert_* | variable | 254 | import os.path
import queue
import sys
import unittest
from concurrent.futures import ThreadPoolExecutor
from datetime import datetime
from multiprocessing import Manager, Process
from typing import List, Optional
import fsspec
import numpy as np
import psutil
import pyarrow as arrow
import pyarrow.compute as pc
impor... | y) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_fabric.py | _compare_arrow_tables | self.assertEqual | complex_expr | 244 | import os.path
import queue
import sys
import unittest
from concurrent.futures import ThreadPoolExecutor
from datetime import datetime
from multiprocessing import Manager, Process
from typing import List, Optional
import fsspec
import numpy as np
import psutil
import pyarrow as arrow
import pyarrow.compute as pc
impor... | actual.shape) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_fabric.py | _compare_arrow_tables | self.assertEqual | complex_expr | 245 | import os.path
import queue
import sys
import unittest
from concurrent.futures import ThreadPoolExecutor
from datetime import datetime
from multiprocessing import Manager, Process
from typing import List, Optional
import fsspec
import numpy as np
import psutil
import pyarrow as arrow
import pyarrow.compute as pc
impor... | actual.column_names) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_fabric.py | execute_plan | self.assertTrue | complex_expr | 230 | import os.path
import queue
import sys
import unittest
from concurrent.futures import ThreadPoolExecutor
from datetime import datetime
from multiprocessing import Manager, Process
from typing import List, Optional
import fsspec
import numpy as np
import psutil
import pyarrow as arrow
import pyarrow.compute as pc
impor... | latest_state.success) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_filesystem.py | test_pickle_trace | self.assertRaises | variable | 13 | import os.path
import tempfile
import threading
import unittest
from smallpond.io.filesystem import dump, load
from tests.test_fabric import TestFabric
class TestFilesystem(TestFabric, unittest.TestCase):
def test_pickle_trace(self):
with self.assertRaises( | TypeError) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_filesystem.py | test_pickle_runtime_ctx | self.assertEqual | complex_expr | 16 | import os.path
import tempfile
import threading
import unittest
from smallpond.io.filesystem import dump, load
from tests.test_fabric import TestFabric
class TestFilesystem(TestFabric, unittest.TestCase):
def test_pickle_runtime_ctx(self):
with tempfile.TemporaryDirectory(dir=self.output_root_abspath) as ... | runtime_ctx.job_id) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_logical.py | test_partition_dims_not_compatible | self.assertRaises | variable | 34 | import unittest
from loguru import logger
from smallpond.logical.dataset import ParquetDataSet
from smallpond.logical.node import (
Context,
DataSetPartitionNode,
DataSourceNode,
EvenlyDistributedPartitionNode,
HashPartitionNode,
LogicalPlan,
SqlEngineNode,
)
from smallpond.logical.planner... | AssertionError) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_partition.py | test_many_row_partitions | self.assertEqual | complex_expr | 48 | import os.path
import tempfile
import unittest
from typing import List
import pyarrow.compute as pc
from smallpond.common import DATA_PARTITION_COLUMN_NAME, GB
from smallpond.execution.task import RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.logical.node import (
Arr... | dataset.num_rows) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_partition.py | test_empty_dataset_partition | self.assertEqual | complex_expr | 60 | import os.path
import tempfile
import unittest
from typing import List
import pyarrow.compute as pc
from smallpond.common import DATA_PARTITION_COLUMN_NAME, GB
from smallpond.execution.task import RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.logical.node import (
Arr... | final_output.num_rows) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_partition.py | test_load_partitioned_datasets | self.assertEqual | func_call | 128 | import os.path
import tempfile
import unittest
from typing import List
import pyarrow.compute as pc
from smallpond.common import DATA_PARTITION_COLUMN_NAME, GB
from smallpond.execution.task import RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.logical.node import (
Arr... | len(final_output_partitions3)) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_partition.py | test_empty_hash_partition | self.assertEqual | complex_expr | 90 | import os.path
import tempfile
import unittest
from typing import List
import pyarrow.compute as pc
from smallpond.common import DATA_PARTITION_COLUMN_NAME, GB
from smallpond.execution.task import RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.logical.node import (
Arr... | exec_plan.final_output.num_rows) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_partition.py | test_empty_dataset_partition | self.assertTrue | func_call | 59 | import os.path
import tempfile
import unittest
from typing import List
import pyarrow.compute as pc
from smallpond.common import DATA_PARTITION_COLUMN_NAME, GB
from smallpond.execution.task import RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.logical.node import (
Arr... | isinstance(final_output, ParquetDataSet)) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_partition.py | test_hash_partition | self.assertEqual | func_call | 73 | import os.path
import tempfile
import unittest
from typing import List
import pyarrow.compute as pc
from smallpond.common import DATA_PARTITION_COLUMN_NAME, GB
from smallpond.execution.task import RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.logical.node import (
Arr... | pc.sum(exec_plan.final_output.to_arrow_table().column("row_count")).as_py()) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_partition.py | test_empty_hash_partition | self.assertEqual | func_call | 91 | import os.path
import tempfile
import unittest
from typing import List
import pyarrow.compute as pc
from smallpond.common import DATA_PARTITION_COLUMN_NAME, GB
from smallpond.execution.task import RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.logical.node import (
Arr... | len(exec_plan.final_output.load_partitioned_datasets(npartitions, "hash_partitions"))) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_partition.py | run_test_plan | self.assertEqual | func_call | 65 | import os.path
import tempfile
import unittest
from typing import List
import pyarrow.compute as pc
from smallpond.common import DATA_PARTITION_COLUMN_NAME, GB
from smallpond.execution.task import RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.logical.node import (
Arr... | len(exec_plan.final_output.load_partitioned_datasets(npartitions, data_partition_column))) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_partition.py | test_hash_partition | self.assertEqual | func_call | 77 | import os.path
import tempfile
import unittest
from typing import List
import pyarrow.compute as pc
from smallpond.common import DATA_PARTITION_COLUMN_NAME, GB
from smallpond.execution.task import RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.logical.node import (
Arr... | len(exec_plan.final_output.load_partitioned_datasets(npartitions, DATA_PARTITION_COLUMN_NAME))) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_partition.py | test_empty_hash_partition | self.assertEqual | func_call | 95 | import os.path
import tempfile
import unittest
from typing import List
import pyarrow.compute as pc
from smallpond.common import DATA_PARTITION_COLUMN_NAME, GB
from smallpond.execution.task import RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.logical.node import (
Arr... | len(exec_plan.final_output.load_partitioned_datasets(npartitions_nested, "nested_hash_partitions"))) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_partition.py | test_empty_hash_partition | self.assertEqual | func_call | 99 | import os.path
import tempfile
import unittest
from typing import List
import pyarrow.compute as pc
from smallpond.common import DATA_PARTITION_COLUMN_NAME, GB
from smallpond.execution.task import RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.logical.node import (
Arr... | len(exec_plan.get_output("hash_partitions").load_partitioned_datasets(npartitions, "hash_partitions"))) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_partition.py | run_test_plan | self.assertEqual | func_call | 69 | import os.path
import tempfile
import unittest
from typing import List
import pyarrow.compute as pc
from smallpond.common import DATA_PARTITION_COLUMN_NAME, GB
from smallpond.execution.task import RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.logical.node import (
Arr... | len(exec_plan.get_output("input_partitions").load_partitioned_datasets(npartitions, data_partition_column, hive_partitioning))) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_partition.py | test_empty_hash_partition | self.assertEqual | func_call | 103 | import os.path
import tempfile
import unittest
from typing import List
import pyarrow.compute as pc
from smallpond.common import DATA_PARTITION_COLUMN_NAME, GB
from smallpond.execution.task import RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.logical.node import (
Arr... | len( exec_plan.get_output("nested_hash_partitions").load_partitioned_datasets(npartitions_nested, "nested_hash_partitions") )) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_partition.py | test_hash_partition | self.assertEqual | func_call | 81 | import os.path
import tempfile
import unittest
from typing import List
import pyarrow.compute as pc
from smallpond.common import DATA_PARTITION_COLUMN_NAME, GB
from smallpond.execution.task import RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.logical.node import (
Arr... | len( exec_plan.get_output("hash_partitions").load_partitioned_datasets( npartitions, DATA_PARTITION_COLUMN_NAME, hive_partitioning, ) )) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_scheduler.py | test_failed_executors | self.assertGreater | numeric_literal | 76 | import os.path
import random
import time
import unittest
from typing import List, Tuple
from loguru import logger
from smallpond.execution.scheduler import ExecutorState
from smallpond.execution.task import PythonScriptTask, RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.l... | 0) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_scheduler.py | check_executor_state | self.assertTrue | bool_literal | 45 | import os.path
import random
import time
import unittest
from typing import List, Tuple
from loguru import logger
from smallpond.execution.scheduler import ExecutorState
from smallpond.execution.task import PythonScriptTask, RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.l... | False) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_scheduler.py | test_failed_executors | self.assertTrue | complex_expr | 75 | import os.path
import random
import time
import unittest
from typing import List, Tuple
from loguru import logger
from smallpond.execution.scheduler import ExecutorState
from smallpond.execution.task import PythonScriptTask, RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.l... | latest_sched_state.success) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_scheduler.py | test_failed_executors | self.assertLessEqual | string_literal | 77 | import os.path
import random
import time
import unittest
from typing import List, Tuple
from loguru import logger
from smallpond.execution.scheduler import ExecutorState
from smallpond.execution.task import PythonScriptTask, RuntimeContext
from smallpond.logical.dataset import DataSet, ParquetDataSet
from smallpond.l... | f"remote_executors: {latest_sched_state.remote_executors}") | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_session.py | test_shutdown_cleanup | assert | func_call | 21 | import os
from smallpond.dataframe import Session
def test_shutdown_cleanup(sp: Session):
assert os.path.exists(sp._runtime_ctx.queue_root), "queue directory should exist"
assert os.path.exists(sp._runtime_ctx.staging_root), "staging directory should exist"
assert os.path.exists(sp._runtime_ctx.temp_root)... | fin.read() | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_utility.py | test_concurrent_iter_with_error | self.assertRaises | variable | 25 | import random
import subprocess
import time
import unittest
from typing import Iterable
from smallpond.utility import ConcurrentIter, execute_command
from tests.test_fabric import TestFabric
class TestUtility(TestFabric, unittest.TestCase):
def test_concurrent_iter_with_error(self):
def broken_iterator(i... | Exception) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_utility.py | test_concurrent_iter_no_error | self.assertEqual | func_call | 21 | import random
import subprocess
import time
import unittest
from typing import Iterable
from smallpond.utility import ConcurrentIter, execute_command
from tests.test_fabric import TestFabric
class TestUtility(TestFabric, unittest.TestCase):
def test_concurrent_iter_no_error(self):
def slow_iterator(iter: ... | sum(range(n))) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_utility.py | test_execute_command | self.assertRaises | complex_expr | 14 | import random
import subprocess
import time
import unittest
from typing import Iterable
from smallpond.utility import ConcurrentIter, execute_command
from tests.test_fabric import TestFabric
class TestUtility(TestFabric, unittest.TestCase):
def test_execute_command(self):
with self.assertRaises( | subprocess.CalledProcessError) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
deepseek-ai/smallpond | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | train | train | tests/test_workqueue.py | test_multi_consumers | self.assertEqual | variable | 70 | import multiprocessing
import multiprocessing.dummy
import multiprocessing.queues
import queue
import tempfile
import time
import unittest
from loguru import logger
from smallpond.execution.workqueue import (
WorkItem,
WorkQueue,
WorkQueueInMemory,
WorkQueueOnFilesystem,
)
from tests.test_fabric impor... | numCollected) | 52ecc5e45535c7448f848bcb45b0da00d9484f81 | 1 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_audiobookshelf_client.py | test_upload_fields_include_series_sequence | assert | string_literal | 34 | from __future__ import annotations
import json
from abogen.integrations.audiobookshelf import (
AudiobookshelfClient,
AudiobookshelfConfig,
)
def test_upload_fields_include_series_sequence(tmp_path):
audio_path = tmp_path / "book.mp3"
audio_path.write_bytes(b"audio")
config = AudiobookshelfConfi... | "7" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_audiobookshelf_client.py | test_upload_fields_normalize_alternate_sequence_keys | assert | string_literal | 33 | from __future__ import annotations
import json
from abogen.integrations.audiobookshelf import (
AudiobookshelfClient,
AudiobookshelfConfig,
)
def test_upload_fields_normalize_alternate_sequence_keys(tmp_path):
audio_path = tmp_path / "book.mp3"
audio_path.write_bytes(b"audio")
config = Audiobook... | "3" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_opds_import_metadata_mapping.py | test_opds_metadata_overrides_maps_author_and_subtitle | assert | string_literal | 24 | from __future__ import annotations
from abogen.webui.routes.api import _opds_metadata_overrides
def test_opds_metadata_overrides_maps_author_and_subtitle() -> None:
overrides = _opds_metadata_overrides(
{
"authors": ["Alexandre Dumas"],
"subtitle": "Unabridged",
"series... | "2" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_prepare_form.py | test_resolve_voice_setting_handles_profile_reference | assert | string_literal | 58 | from pathlib import Path
from werkzeug.datastructures import MultiDict
from abogen.webui.routes.utils.form import apply_prepare_form
from abogen.webui.routes.utils.voice import resolve_voice_setting
from abogen.webui.service import PendingJob
def _make_pending_job() -> PendingJob:
return PendingJob(
id="... | "b" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_regression_fixes.py | test_manual_override_normalization | assert | string_literal | 22 | import pytest
from unittest.mock import patch
from abogen.kokoro_text_normalization import (
normalize_for_pipeline,
DEFAULT_APOSTROPHE_CONFIG,
)
from abogen.normalization_settings import build_apostrophe_config, _SETTINGS_DEFAULTS
def normalize(text, overrides=None):
settings = dict(_SETTINGS_DEFAULTS)
... | "a" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_service.py | test_audiobookshelf_metadata_uses_book_number | assert | string_literal | 42 | from __future__ import annotations
import io
import time
from abogen.webui.service import (
Job,
JobStatus,
build_service,
_JOB_LOGGER,
build_audiobookshelf_metadata,
)
def test_audiobookshelf_metadata_uses_book_number(tmp_path):
source = tmp_path / "book.txt"
source.write_text("content", ... | "7" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_text_extractor.py | test_epub_series_metadata_extracted_from_opf_meta | assert | string_literal | 53 | from unittest.mock import patch
import pytest
from pathlib import Path
from ebooklib import epub
from abogen.text_extractor import extract_from_path
from abogen.utils import calculate_text_length
def sample_epub_path():
return Path(__file__).parent / "fixtures" / "abogen_debug_tts_samples.epub"
def test_epub_s... | "2" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_audiobookshelf_client.py | test_upload_fields_preserve_decimal_sequence | assert | string_literal | 32 | from __future__ import annotations
import json
from abogen.integrations.audiobookshelf import (
AudiobookshelfClient,
AudiobookshelfConfig,
)
def test_upload_fields_preserve_decimal_sequence(tmp_path):
audio_path = tmp_path / "book.mp3"
audio_path.write_bytes(b"audio")
config = AudiobookshelfCon... | "0.5" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_regression_fixes.py | test_manual_override_normalization | assert | string_literal | 21 | import pytest
from unittest.mock import patch
from abogen.kokoro_text_normalization import (
normalize_for_pipeline,
DEFAULT_APOSTROPHE_CONFIG,
)
from abogen.normalization_settings import build_apostrophe_config, _SETTINGS_DEFAULTS
def normalize(text, overrides=None):
settings = dict(_SETTINGS_DEFAULTS)
... | "the" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_service.py | test_audiobookshelf_metadata_allows_decimal_sequence | assert | string_literal | 41 | from __future__ import annotations
import io
import time
from abogen.webui.service import (
Job,
JobStatus,
build_service,
_JOB_LOGGER,
build_audiobookshelf_metadata,
)
def test_audiobookshelf_metadata_allows_decimal_sequence(tmp_path):
source = tmp_path / "book.txt"
source.write_text("con... | "4.5" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_book_parser.py | test_file_type_property | self.assertEqual | string_literal | 83 | import unittest
import os
import sys
import shutil
import fitz # PyMuPDF
from ebooklib import epub
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from abogen.book_parser import get_book_parser, PdfParser, EpubParser, MarkdownParser
class TestBookParser(unittest.TestCase):
de... | "pdf") | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_calibre_opds.py | test_calibre_opds_extracts_tags_and_rating_from_summary | assert | string_literal | 35 | from abogen.integrations.calibre_opds import (
CalibreOPDSClient,
OPDSEntry,
OPDSFeed,
OPDSLink,
feed_to_dict,
)
def test_calibre_opds_extracts_tags_and_rating_from_summary() -> None:
client = CalibreOPDSClient("http://example.com/catalog")
xml_payload = """<?xml version=\"1.0\" encoding=\"... | "Saga" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_chunk_helpers.py | test_group_chunks_by_chapter_orders_and_groups | assert | string_literal | 19 | from __future__ import annotations
from types import SimpleNamespace
from abogen.chunking import chunk_text
from abogen.webui.conversion_runner import _chunk_voice_spec, _group_chunks_by_chapter
def test_group_chunks_by_chapter_orders_and_groups() -> None:
chunks = [
{"chapter_index": "0", "chunk_index":... | "next" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_regression_fixes.py | test_manual_override_normalization | assert | string_literal | 23 | import pytest
from unittest.mock import patch
from abogen.kokoro_text_normalization import (
normalize_for_pipeline,
DEFAULT_APOSTROPHE_CONFIG,
)
from abogen.normalization_settings import build_apostrophe_config, _SETTINGS_DEFAULTS
def normalize(text, overrides=None):
settings = dict(_SETTINGS_DEFAULTS)
... | "word" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_speaker_analysis.py | test_analyze_speakers_infers_gender_from_pronouns | assert | string_literal | 43 | from abogen.speaker_analysis import analyze_speakers
def _chapters():
return [
{
"id": "0001",
"index": 0,
"title": "Test",
"text": "",
"enabled": True,
}
]
def _chunk(text: str, idx: int) -> dict:
return {
"id": f"chunk-{... | "male" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_book_parser.py | test_file_type_property | self.assertEqual | string_literal | 86 | import unittest
import os
import sys
import shutil
import fitz # PyMuPDF
from ebooklib import epub
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from abogen.book_parser import get_book_parser, PdfParser, EpubParser, MarkdownParser
class TestBookParser(unittest.TestCase):
de... | "epub") | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_chapter_overrides.py | test_apply_chapter_overrides_with_custom_text | assert | string_literal | 121 | from __future__ import annotations
import sys
import types
def _install_dependency_stubs() -> None:
if "ebooklib" not in sys.modules:
ebooklib_stub = types.ModuleType("ebooklib")
epub_stub = types.ModuleType("ebooklib.epub")
setattr(ebooklib_stub, "epub", epub_stub)
sys.modules["eb... | "Intro" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_epub_html_nav_parsing.py | test_identify_nav_item | self.assertEqual | string_literal | 85 | import unittest
import os
import shutil
import sys
from ebooklib import epub
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from abogen.book_parser import get_book_parser
class TestEpubHtmlNavParsing(unittest.TestCase):
def setUp(self):
self.test_dir = "tests/test_dat... | "html") | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_epub_standard_nav.py | test_discovery_by_item_navigation_type | self.assertEqual | string_literal | 90 | import unittest
import os
import shutil
import sys
from ebooklib import epub
import ebooklib
from unittest.mock import MagicMock
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from abogen.book_parser import get_book_parser
class TestEpubStandardNav(unittest.TestCase):
def set... | "html") | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_prepare_form.py | test_resolve_voice_setting_handles_profile_reference | assert | string_literal | 57 | from pathlib import Path
from werkzeug.datastructures import MultiDict
from abogen.webui.routes.utils.form import apply_prepare_form
from abogen.webui.routes.utils.voice import resolve_voice_setting
from abogen.webui.service import PendingJob
def _make_pending_job() -> PendingJob:
return PendingJob(
id="... | "Blend" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_book_step_speaker_provider.py | test_book_step_supertonic_profile_becomes_speaker_reference | assert | string_literal | 82 | from pathlib import Path
from werkzeug.datastructures import MultiDict
from abogen.webui.routes.utils.form import apply_book_step_form
from abogen.webui.service import PendingJob
def _make_pending_job() -> PendingJob:
pending = PendingJob(
id="pending",
original_filename="example.epub",
s... | "kokoro" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_chunk_text_for_tts_prefers_raw.py | test_chunk_text_for_tts_prefers_text_over_normalized_text | assert | string_literal | 12 | from abogen.webui.conversion_runner import _chunk_text_for_tts
def test_chunk_text_for_tts_prefers_text_over_normalized_text():
entry = {
# Simulate a pre-normalized chunk that lost the asterisk.
"normalized_text": "Unfuk",
# Raw chunk should preserve censored token for manual overrides.
... | "Unfu*k" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_pdf_structure.py | test_pdf_structure_without_toc | self.assertEqual | string_literal | 38 | import unittest
import os
import shutil
import fitz # PyMuPDF
from abogen.book_parser import PdfParser
class TestPdfStructure(unittest.TestCase):
def setUp(self):
self.test_dir = "tests/test_data_pdf"
if os.path.exists(self.test_dir):
shutil.rmtree(self.test_dir)
os.makedirs(s... | "Pages") | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_service.py | test_service_processes_job | assert | string_literal | 70 | from __future__ import annotations
import io
import time
from abogen.webui.service import (
Job,
JobStatus,
build_service,
_JOB_LOGGER,
build_audiobookshelf_metadata,
)
def test_service_processes_job(tmp_path):
uploads = tmp_path / "uploads"
outputs = tmp_path / "outputs"
uploads.mkdir... | "single" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_speaker_analysis.py | test_analyze_speakers_infers_gender_from_pronouns | assert | string_literal | 44 | from abogen.speaker_analysis import analyze_speakers
def _chapters():
return [
{
"id": "0001",
"index": 0,
"title": "Test",
"text": "",
"enabled": True,
}
]
def _chunk(text: str, idx: int) -> dict:
return {
"id": f"chunk-{... | "female" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_calibre_opds.py | test_calibre_opds_feed_exposes_subtitle_metadata | assert | string_literal | 30 | from abogen.integrations.calibre_opds import (
CalibreOPDSClient,
OPDSEntry,
OPDSFeed,
OPDSLink,
feed_to_dict,
)
def test_calibre_opds_feed_exposes_subtitle_metadata() -> None:
client = CalibreOPDSClient("http://example.com/catalog")
xml_payload = """<?xml version=\"1.0\" encoding=\"UTF-8\"... | "A Novel" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_chapter_overrides.py | test_merge_metadata_prefers_overrides_and_drops_none_values | assert | string_literal | 117 | from __future__ import annotations
import sys
import types
def _install_dependency_stubs() -> None:
if "ebooklib" not in sys.modules:
ebooklib_stub = types.ModuleType("ebooklib")
epub_stub = types.ModuleType("ebooklib.epub")
setattr(ebooklib_stub, "epub", epub_stub)
sys.modules["eb... | "Another" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_chapter_overrides.py | test_merge_metadata_prefers_overrides_and_drops_none_values | assert | string_literal | 118 | from __future__ import annotations
import sys
import types
def _install_dependency_stubs() -> None:
if "ebooklib" not in sys.modules:
ebooklib_stub = types.ModuleType("ebooklib")
epub_stub = types.ModuleType("ebooklib.epub")
setattr(ebooklib_stub, "epub", epub_stub)
sys.modules["eb... | "Fiction" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_epub_html_nav_parsing.py | test_span_header_parsing | self.assertEqual | string_literal | 106 | import unittest
import os
import shutil
import sys
from ebooklib import epub
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from abogen.book_parser import get_book_parser
class TestEpubHtmlNavParsing(unittest.TestCase):
def setUp(self):
self.test_dir = "tests/test_dat... | "Part I") | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_opds_import_metadata_mapping.py | test_opds_metadata_overrides_maps_author_and_subtitle | assert | string_literal | 23 | from __future__ import annotations
from abogen.webui.routes.api import _opds_metadata_overrides
def test_opds_metadata_overrides_maps_author_and_subtitle() -> None:
overrides = _opds_metadata_overrides(
{
"authors": ["Alexandre Dumas"],
"subtitle": "Unabridged",
"series... | "Example" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_pdf_structure.py | test_pdf_structure_with_toc | self.assertEqual | string_literal | 47 | import unittest
import os
import shutil
import fitz # PyMuPDF
from abogen.book_parser import PdfParser
class TestPdfStructure(unittest.TestCase):
def setUp(self):
self.test_dir = "tests/test_data_pdf"
if os.path.exists(self.test_dir):
shutil.rmtree(self.test_dir)
os.makedirs(s... | "Chap 1") | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_pdf_structure.py | test_pdf_structure_with_toc | self.assertEqual | string_literal | 48 | import unittest
import os
import shutil
import fitz # PyMuPDF
from abogen.book_parser import PdfParser
class TestPdfStructure(unittest.TestCase):
def setUp(self):
self.test_dir = "tests/test_data_pdf"
if os.path.exists(self.test_dir):
shutil.rmtree(self.test_dir)
os.makedirs(s... | "page_1") | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_pdf_structure.py | test_pdf_structure_nested_toc | self.assertEqual | string_literal | 46 | import unittest
import os
import shutil
import fitz # PyMuPDF
from abogen.book_parser import PdfParser
class TestPdfStructure(unittest.TestCase):
def setUp(self):
self.test_dir = "tests/test_data_pdf"
if os.path.exists(self.test_dir):
shutil.rmtree(self.test_dir)
os.makedirs(s... | "page_2") | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_speaker_analysis.py | test_analyze_speakers_ignores_leading_stopwords | assert | string_literal | 33 | from abogen.speaker_analysis import analyze_speakers
def _chapters():
return [
{
"id": "0001",
"index": 0,
"title": "Test",
"text": "",
"enabled": True,
}
]
def _chunk(text: str, idx: int) -> dict:
return {
"id": f"chunk-{... | "Volescu" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_chapter_overrides.py | test_merge_metadata_prefers_overrides_and_drops_none_values | assert | string_literal | 116 | from __future__ import annotations
import sys
import types
def _install_dependency_stubs() -> None:
if "ebooklib" not in sys.modules:
ebooklib_stub = types.ModuleType("ebooklib")
epub_stub = types.ModuleType("ebooklib.epub")
setattr(ebooklib_stub, "epub", epub_stub)
sys.modules["eb... | "Original" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_chunk_helpers.py | test_chunk_voice_spec_uses_fallback_when_no_overrides | assert | string_literal | 13 | from __future__ import annotations
from types import SimpleNamespace
from abogen.chunking import chunk_text
from abogen.webui.conversion_runner import _chunk_voice_spec, _group_chunks_by_chapter
def test_chunk_voice_spec_uses_fallback_when_no_overrides() -> None:
job = SimpleNamespace(voice="base_voice", speaker... | "fallback" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_pdf_structure.py | test_pdf_structure_nested_toc | self.assertEqual | string_literal | 45 | import unittest
import os
import shutil
import fitz # PyMuPDF
from abogen.book_parser import PdfParser
class TestPdfStructure(unittest.TestCase):
def setUp(self):
self.test_dir = "tests/test_data_pdf"
if os.path.exists(self.test_dir):
shutil.rmtree(self.test_dir)
os.makedirs(s... | "Sec 1.1") | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_text_extractor.py | test_epub_metadata_composer_matches_artist | assert | string_literal | 23 | from unittest.mock import patch
import pytest
from pathlib import Path
from ebooklib import epub
from abogen.text_extractor import extract_from_path
from abogen.utils import calculate_text_length
def sample_epub_path():
return Path(__file__).parent / "fixtures" / "abogen_debug_tts_samples.epub"
def test_epub_m... | "Narrator" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_book_parser.py | test_file_type_property | self.assertEqual | string_literal | 89 | import unittest
import os
import sys
import shutil
import fitz # PyMuPDF
from ebooklib import epub
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from abogen.book_parser import get_book_parser, PdfParser, EpubParser, MarkdownParser
class TestBookParser(unittest.TestCase):
de... | "markdown") | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_book_step_speaker_provider.py | test_book_step_supertonic_profile_becomes_speaker_reference | assert | string_literal | 79 | from pathlib import Path
from werkzeug.datastructures import MultiDict
from abogen.webui.routes.utils.form import apply_book_step_form
from abogen.webui.service import PendingJob
def _make_pending_job() -> PendingJob:
pending = PendingJob(
id="pending",
original_filename="example.epub",
s... | "Female HQ" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_chapter_overrides.py | test_apply_chapter_overrides_uses_original_content_when_text_missing | assert | string_literal | 120 | from __future__ import annotations
import sys
import types
def _install_dependency_stubs() -> None:
if "ebooklib" not in sys.modules:
ebooklib_stub = types.ModuleType("ebooklib")
epub_stub = types.ModuleType("ebooklib.epub")
setattr(ebooklib_stub, "epub", epub_stub)
sys.modules["eb... | "Chapter 2" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_conversion_chapter_titles.py | test_format_spoken_chapter_title_handles_empty_title | assert | string_literal | 13 | import sys
import types
from abogen.webui.conversion_runner import (
_format_spoken_chapter_title,
_headings_equivalent,
_normalize_chapter_opening_caps,
_strip_duplicate_heading_line,
)
def test_format_spoken_chapter_title_handles_empty_title() -> None:
assert _format_spoken_chapter_title("", 4,... | "Chapter 4" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_conversion_chapter_titles.py | test_strip_duplicate_heading_line_removes_first_match | assert | string_literal | 17 | import sys
import types
from abogen.webui.conversion_runner import (
_format_spoken_chapter_title,
_headings_equivalent,
_normalize_chapter_opening_caps,
_strip_duplicate_heading_line,
)
def test_strip_duplicate_heading_line_removes_first_match() -> None:
text, removed = _strip_duplicate_heading_l... | "Body text" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_service.py | test_service_processes_job | assert | string_literal | 69 | from __future__ import annotations
import io
import time
from abogen.webui.service import (
Job,
JobStatus,
build_service,
_JOB_LOGGER,
build_audiobookshelf_metadata,
)
def test_service_processes_job(tmp_path):
uploads = tmp_path / "uploads"
outputs = tmp_path / "outputs"
uploads.mkdir... | "paragraph" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_epub_content_slicing.py | test_single_file_multiple_chapters | self.assertEqual | string_literal | 98 | import unittest
import os
import shutil
import sys
from ebooklib import epub
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from abogen.book_parser import get_book_parser
class TestEpubContentSlicing(unittest.TestCase):
def setUp(self):
self.test_dir = "tests/test_dat... | "Chapter 1") | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_epub_html_nav_parsing.py | test_basic_html_nav_parsing | self.assertEqual | string_literal | 95 | import unittest
import os
import shutil
import sys
from ebooklib import epub
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from abogen.book_parser import get_book_parser
class TestEpubHtmlNavParsing(unittest.TestCase):
def setUp(self):
self.test_dir = "tests/test_dat... | "Chapter 1") | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_epub_html_nav_parsing.py | test_basic_html_nav_parsing | self.assertEqual | string_literal | 96 | import unittest
import os
import shutil
import sys
from ebooklib import epub
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from abogen.book_parser import get_book_parser
class TestEpubHtmlNavParsing(unittest.TestCase):
def setUp(self):
self.test_dir = "tests/test_dat... | "Chapter 2") | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_epub_ncx_parsing.py | test_ncx_only_parsing | self.assertEqual | string_literal | 78 | import unittest
import os
import shutil
import sys
from ebooklib import epub
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from abogen.book_parser import get_book_parser, EpubParser
class TestEpubNcxParsing(unittest.TestCase):
def setUp(self):
self.test_dir = "tests/... | "Chapter 1") | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_epub_ncx_parsing.py | test_ncx_only_parsing | self.assertEqual | string_literal | 79 | import unittest
import os
import shutil
import sys
from ebooklib import epub
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from abogen.book_parser import get_book_parser, EpubParser
class TestEpubNcxParsing(unittest.TestCase):
def setUp(self):
self.test_dir = "tests/... | "Chapter 2") | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_epub_standard_nav.py | test_discovery_by_item_navigation_type | self.assertEqual | string_literal | 91 | import unittest
import os
import shutil
import sys
from ebooklib import epub
import ebooklib
from unittest.mock import MagicMock
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from abogen.book_parser import get_book_parser
class TestEpubStandardNav(unittest.TestCase):
def set... | "nav.xhtml") | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_opds_import_metadata_mapping.py | test_opds_metadata_overrides_maps_author_and_subtitle | assert | string_literal | 20 | from __future__ import annotations
from abogen.webui.routes.api import _opds_metadata_overrides
def test_opds_metadata_overrides_maps_author_and_subtitle() -> None:
overrides = _opds_metadata_overrides(
{
"authors": ["Alexandre Dumas"],
"subtitle": "Unabridged",
"series... | "Unabridged" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_chapter_overrides.py | test_apply_chapter_overrides_with_custom_text | assert | string_literal | 122 | from __future__ import annotations
import sys
import types
def _install_dependency_stubs() -> None:
if "ebooklib" not in sys.modules:
ebooklib_stub = types.ModuleType("ebooklib")
epub_stub = types.ModuleType("ebooklib.epub")
setattr(ebooklib_stub, "epub", epub_stub)
sys.modules["eb... | "Hello world" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
denizsafak/abogen | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | train | train | tests/test_settings_integrations_secrets.py | test_settings_update_preserves_abs_api_token_when_blank | assert | string_literal | 73 | from __future__ import annotations
from pathlib import Path
from abogen.utils import load_config, save_config
from abogen.webui.app import create_app
def test_settings_update_preserves_abs_api_token_when_blank(tmp_path):
# Seed config with stored integration secret.
save_config(
{
"langua... | "SECRET_PASS" | ded73843c9e431f53cc215d6ae4f80d7cf3fe618 | 0 | v2_extractor_at_anchor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.