id
int64
0
328k
repository_name
stringlengths
7
58
file_path
stringlengths
9
302
class_name
stringlengths
5
256
human_written_code
stringlengths
16
2.16M
class_skeleton
stringlengths
18
1.49M
total_program_units
int64
1
1.76k
total_doc_str
int64
0
771
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
297
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
168
CountClassBase
float64
0
40
CountClassCoupled
float64
0
583
CountClassCoupledModified
float64
0
575
CountClassDerived
float64
0
5.35k
CountDeclInstanceMethod
float64
0
529
CountDeclInstanceVariable
float64
0
296
CountDeclMethod
float64
0
599
CountDeclMethodAll
float64
0
1.12k
CountLine
float64
1
40.4k
CountLineBlank
float64
0
8.16k
CountLineCode
float64
1
25.7k
CountLineCodeDecl
float64
1
8.15k
CountLineCodeExe
float64
0
24.2k
CountLineComment
float64
0
16.5k
CountStmt
float64
1
9.71k
CountStmtDecl
float64
1
8.15k
CountStmtExe
float64
0
9.69k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
2.9k
326,900
circuit-synth/circuit-synth
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/ai_integration/agents/debugging_agent.py
debugging_agent.CircuitDebuggingAgent
from pathlib import Path from typing import Any, Dict, List, Optional, Tuple import json from datetime import datetime class CircuitDebuggingAgent: """ Advanced debugging agent with comprehensive knowledge base integration and KiCad-to-Python conversion capability """ def __init__(self): "...
class CircuitDebuggingAgent: ''' Advanced debugging agent with comprehensive knowledge base integration and KiCad-to-Python conversion capability ''' def __init__(self): '''Initialize the debugging agent with knowledge bases''' pass def _load_knowledge(self, filename: str) -> ...
13
13
45
7
31
7
7
0.24
0
9
0
0
12
7
12
12
552
90
375
99
346
90
212
81
197
17
0
6
81
326,901
circuit-synth/circuit-synth
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/data/tools/update_examples_with_stock.py
update_examples_with_stock.ExampleUpdater
import re from circuit_synth.manufacturing.jlcpcb.jlc_web_scraper import JlcWebScraper from typing import Dict, List, Optional, Tuple from pathlib import Path class ExampleUpdater: """Updates circuit examples with current component availability.""" def __init__(self): self.jlc_scraper = JlcWebScraper(...
class ExampleUpdater: '''Updates circuit examples with current component availability.''' def __init__(self): pass def find_best_stm32_match(self, family: str='STM32G0', min_stock: int=100) -> Optional[Dict]: ''' Find the best STM32 match based on our selection criteria. A...
10
9
37
6
23
9
5
0.39
0
9
1
0
9
2
9
9
346
65
210
66
196
82
151
60
141
12
0
4
46
326,902
circuit-synth/circuit-synth
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/tools/maintenance/update_examples_with_stock.py
update_examples_with_stock.ExampleUpdater
from typing import Dict, List, Optional, Tuple from circuit_synth.manufacturing.jlcpcb.jlc_web_scraper import JlcWebScraper from pathlib import Path import re class ExampleUpdater: """Updates circuit examples with current component availability.""" def __init__(self): self.jlc_scraper = JlcWebScraper(...
class ExampleUpdater: '''Updates circuit examples with current component availability.''' def __init__(self): pass def find_best_stm32_match(self, family: str='STM32G0', min_stock: int=100) -> Optional[Dict]: ''' Find the best STM32 match based on our selection criteria. A...
10
9
37
6
23
9
5
0.39
0
9
1
0
9
2
9
9
345
65
209
70
191
82
151
60
141
12
0
4
46
326,903
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/data/envdataset/data.py
src.annflux.data.envdataset.data.DataSource
import shutil from os import PathLike import os.path import requests from io import BytesIO import zipfile class DataSource: url = None name = None hash = None def __init__(self): self.out_folder = os.path.expanduser(f'~/annflux/datasources/{self.name}') print(self.out_folder) ...
class DataSource: def __init__(self): pass def download(self): pass @property def folder(self): pass def copy_to(self, folder: str | PathLike): pass
6
0
5
0
5
0
2
0.04
0
3
0
1
4
1
4
4
28
5
23
11
17
1
22
10
17
2
0
1
6
326,904
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/data/envdataset/data.py
src.annflux.data.envdataset.data.EnvDataset
import os.path class EnvDataset(DataSource): url = None name = None out_folder = os.getenv('USER_DATASET_PATH') true_labels_path = os.path.join(out_folder, 'true_labels.json') def __init__(self): pass
class EnvDataset(DataSource): def __init__(self): pass
2
0
2
0
2
1
1
0.14
1
0
0
0
1
0
1
5
8
1
7
6
5
1
7
6
5
1
1
0
1
326,905
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/repository/dataset.py
src.annflux.repository.dataset.Dataset
import hashlib from annflux.repository.repository import RepositoryObject, Repository from typing import List, Dict import pandas import os import shutil class Dataset(RepositoryObject): label = 'dataset' def __init__(self, h5path_or_entry, taxon_mapping_path=None): if isinstance(h5path_or_entry, str)...
class Dataset(RepositoryObject): def __init__(self, h5path_or_entry, taxon_mapping_path=None): pass @property def uid(self): pass def get_uid(self): pass def store_contents(self, directory, mode): pass def as_dataframe(self) -> pandas.DataFrame: ''' ...
18
2
7
0
6
1
2
0.08
1
8
1
0
11
5
11
15
95
14
75
32
57
6
48
25
36
4
2
2
18
326,906
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/repository/model.py
src.annflux.repository.model.ClipModel
import os from .repository import Repository, RepositoryEntry from ..tools.io import file_hash import shutil class ClipModel(Model): def __init__(self, path_or_entry: RepositoryEntry | str, class_to_label_path=None): super().__init__(path_or_entry, class_to_label_path) if isinstance(path_or_entry,...
class ClipModel(Model): def __init__(self, path_or_entry: RepositoryEntry | str, class_to_label_path=None): pass @property def size(self) -> int: pass def get_uid(self): pass def store_contents(self, directory, mode): pass def export_model_package(self, out_f...
7
0
4
0
4
0
1
0
1
4
1
0
5
2
5
11
27
5
22
9
15
0
18
8
12
2
2
1
6
326,907
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/repository/model.py
src.annflux.repository.model.KerasModel
from ..tools.io import file_hash import os import json from .repository import Repository, RepositoryEntry import shutil class KerasModel(Model): def __init__(self, model_folder_path_or_entry: (str, RepositoryEntry), path_or_entry, classid_to_class_path=None, model_configuration_path=None): """ A ...
class KerasModel(Model): def __init__(self, model_folder_path_or_entry: (str, RepositoryEntry), path_or_entry, classid_to_class_path=None, model_configuration_path=None): ''' A multiclass classification model which can be stored in a Repository :param model_folder_path_or_entry: model fold...
7
1
17
1
15
1
3
0.09
1
4
1
0
5
8
5
11
92
11
75
23
62
7
46
16
40
11
2
3
17
326,908
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/repository/model.py
src.annflux.repository.model.Model
from abc import abstractmethod import os from .repository import Repository, RepositoryEntry from .dataset import Dataset class Model(object): label = 'model' def __init__(self, path_or_entry, class_to_label_path=None): """ :type path_or_entry: RepositoryEntry :param path_or_entry: ...
class Model(object): def __init__(self, path_or_entry, class_to_label_path=None): ''' :type path_or_entry: RepositoryEntry :param path_or_entry: :param class_to_label_path: ''' pass @property def size(self) -> int: pass @property def model(se...
12
1
4
0
3
1
1
0.23
1
4
2
2
6
4
6
6
38
7
26
17
14
6
20
12
13
2
1
1
7
326,909
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/repository/repository.py
src.annflux.repository.repository.CollectionWrapper
class CollectionWrapper(list): """ Adds first and last methods to standard lists """ def last(self, position=1): return self[-position] if len(self) > 0 else None def first(self): return self[0] if len(self) > 0 else None
class CollectionWrapper(list): ''' Adds first and last methods to standard lists ''' def last(self, position=1): pass def first(self): pass
3
1
2
0
2
0
2
0.6
1
0
0
0
2
0
2
35
10
2
5
3
2
3
5
3
2
2
2
0
4
326,910
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/repository/repository.py
src.annflux.repository.repository.Repository
import pandas from annflux.tools.io import create_directory import os import datetime from typing import Any class Repository(object): headers = ['uid', 'type', 'ancestors', 'date', 'tag', 'message'] def __init__(self, path, date_filter=0): """ Create a new Repository :param path: open...
class Repository(object): def __init__(self, path, date_filter=0): ''' Create a new Repository :param path: open or create Repository at path :param date_filter: experimental, obsolete ''' pass @staticmethod def entry_to_path(entry: RepositoryEntry): ...
18
3
19
1
15
3
4
0.2
1
12
3
0
8
3
10
10
205
20
156
49
130
31
87
34
76
13
1
4
35
326,911
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/repository/repository.py
src.annflux.repository.repository.RepositoryEntry
import os class RepositoryEntry(object): def __init__(self, row, repository): self.row = row self.repository_ = repository @property def path(self): return os.path.join(self.repository_.path, Repository.entry_to_path(self.row)) @property def uid(self): return self...
class RepositoryEntry(object): def __init__(self, row, repository): pass @property def path(self): pass @property def uid(self): pass @property def label(self): pass @property def tag(self): pass @property def date(self): pass...
19
0
2
0
2
0
1
0
1
1
1
0
10
2
10
10
39
9
30
21
11
0
22
13
11
1
1
0
10
326,912
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/repository/repository.py
src.annflux.repository.repository.RepositoryObject
import os from json import JSONDecodeError import json class RepositoryObject(object): def __init__(self, name_value_cache_path): self.name_value_cache_path = name_value_cache_path def update_name_value_cache(self, name, value): """ Writes name, value pairs to a basic_stats file ...
class RepositoryObject(object): def __init__(self, name_value_cache_path): pass def update_name_value_cache(self, name, value): ''' Writes name, value pairs to a basic_stats file :param name: :param value: :return: ''' pass def get_cached_v...
5
1
9
1
7
2
2
0.22
1
1
0
2
4
1
4
4
39
6
27
10
22
6
23
9
18
4
1
2
9
326,913
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/repository/resultset.py
src.annflux.repository.resultset.Resultset
import shutil from annflux.repository.dataset import Dataset import hashlib from annflux.repository.model import Model import os import pandas from annflux.repository.repository import Repository, RepositoryObject from annflux.tools.io import create_directory, split_template class Resultset(RepositoryObject): labe...
class Resultset(RepositoryObject): def __init__(self, path_or_entry): ''' If path_or_entry is a path then path should point to a results directory :param path_or_entry: ''' pass def get_uid(self): ''' Gets an UID for the Resultset based on its contents ...
16
5
13
1
9
2
2
0.23
1
6
3
0
11
10
11
15
159
24
110
47
92
25
77
40
65
4
2
1
20
326,914
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/shared.py
src.annflux.shared.AnnfluxSource
from annflux.repository.repository import Repository from os import PathLike import os from annflux.repository.dataset import Dataset from typing import Union from pathlib import Path class AnnfluxSource(object): start_labels = [] exclusivity = [] id_column = 'image_id' data_path_ = None images_pat...
class AnnfluxSource(object): def __init__(self, folder: Union[PathLike, str]=None): pass @property def data_path(self): pass @property def images_path(self): pass @property def working_folder(self): pass @property def labels_path(self): pass ...
18
0
4
0
4
0
1
0
1
5
2
0
9
0
9
9
59
9
50
25
32
0
30
17
20
2
1
1
13
326,915
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/tools/core.py
src.annflux.tools.core.AnnFluxState
from pathlib import Path import numpy as np from numpy._typing import NDArray import time class AnnFluxState(object): """ Stores the core state of the AnnFlux state """ def __init__(self, working_folder): super().__init__() self.time_new_status_time = None self.working_folder_ ...
class AnnFluxState(object): ''' Stores the core state of the AnnFlux state ''' def __init__(self, working_folder): pass @property def data_folder(self) -> str: pass @property def working_folder(self) -> str: pass @property def timings_path(self) -> str: ...
14
1
4
0
4
0
2
0.05
1
3
0
0
6
2
7
7
70
7
60
40
46
3
46
33
38
5
1
1
11
326,916
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/training/annflux/clip.py
src.annflux.training.annflux.clip.ClipFeatureExtractor
from torch.utils.data import DataLoader from annflux.training.annflux.clip_shared import test, Image_dataset from sklearn.model_selection import train_test_split from openvino.runtime import properties from annflux.tools.mixed import get_basic_logger from PIL import Image from sklearn.metrics import accuracy_score from...
class ClipFeatureExtractor(BaseFeatureExtractor, PeftTrainableMixin, OpenVinoMixin): def __init__(self): pass def convert_model(self): pass def load_model(self): pass def compute_features(self, dataset: Dataset, multi=False, batch_size=32) -> np.array: pass def ...
9
1
35
4
29
3
3
0.09
3
13
3
0
6
5
6
30
269
39
217
67
199
20
123
59
113
6
5
5
20
326,917
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/training/annflux/clip_server.py
src.annflux.training.annflux.clip_server.ClipServer
import json from clip_shared import test, Image_dataset import numpy as np import os from torch.utils.data import DataLoader import pandas import torch from transformers import CLIPModel, CLIPProcessor class ClipServer(object): def __init__(self, folder): self.folder = folder self.labels_path = os...
class ClipServer(object): def __init__(self, folder): pass def load_model(self): pass def predict(self, file_path): pass def test_batch_builder(samples): pass
5
0
16
2
14
0
1
0
1
2
1
0
3
6
3
3
56
9
47
20
42
0
26
20
21
1
1
0
4
326,918
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/training/annflux/clip_shared.py
src.annflux.training.annflux.clip_shared.Image_dataset
from PIL import Image import os import torch class Image_dataset(object): def __init__(self, root_dir, data_frame, processor): self.root_dir = root_dir self.data_frame = data_frame self.processor = processor self.data_list = [] for _, row in self.data_frame.iterrows(): ...
class Image_dataset(object): def __init__(self, root_dir, data_frame, processor): pass def __len__(self): pass def __getitem__(self, idx): pass
4
0
10
2
7
1
2
0.13
1
1
0
0
3
4
3
3
33
8
23
15
19
3
23
14
19
3
1
1
6
326,919
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/training/annflux/feature_extractor.py
src.annflux.training.annflux.feature_extractor.BaseFeatureExtractor
from annflux.repository.dataset import Dataset import numpy as np import abc class BaseFeatureExtractor(abc.ABC): def load_model(self): pass def compute_features(self, dataset: Dataset, multi=False, batch_size=32) -> np.array: pass
class BaseFeatureExtractor(abc.ABC): def load_model(self): pass def compute_features(self, dataset: Dataset, multi=False, batch_size=32) -> np.array: pass
3
0
3
0
3
0
1
0
1
1
1
1
2
0
2
22
8
1
7
5
2
0
5
3
2
1
4
0
2
326,920
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/training/annflux/feature_extractor.py
src.annflux.training.annflux.feature_extractor.OpenVinoMixin
import abc class OpenVinoMixin(abc.ABC): def convert_model(self): pass
class OpenVinoMixin(abc.ABC): def convert_model(self): pass
2
0
2
0
2
0
1
0
1
0
0
1
1
0
1
21
3
0
3
2
1
0
3
2
1
1
4
0
1
326,921
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/training/annflux/feature_extractor.py
src.annflux.training.annflux.feature_extractor.PeftTrainableMixin
from os import PathLike import pandas import abc class PeftTrainableMixin(abc.ABC): def train_peft(self, data: pandas.DataFrame, out_folder: PathLike | str, train_parameters: TrainParameters): pass
class PeftTrainableMixin(abc.ABC): def train_peft(self, data: pandas.DataFrame, out_folder: PathLike | str, train_parameters: TrainParameters): pass
2
0
7
0
7
0
1
0
1
3
1
1
1
0
1
21
8
0
8
7
1
0
3
2
1
1
4
0
1
326,922
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/training/annflux/feature_extractor.py
src.annflux.training.annflux.feature_extractor.TrainParameters
from dataclasses import dataclass @dataclass class TrainParameters: num_epochs: int
@dataclass class TrainParameters: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
2
1
1
0
2
1
1
0
0
0
0
326,923
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/training/tensorflow/tf_backend.py
src.annflux.training.tensorflow.tf_backend.BalanceSequence
from typing import Dict, List import math import numpy as np from keras.src.trainers.data_adapters.py_dataset_adapter import PyDataset from collections import defaultdict, Counter class BalanceSequence(PyDataset): def __init__(self, x_set, y_set, batch_size, balance: bool=False): self.x, self.y = (np.arra...
class BalanceSequence(PyDataset): def __init__(self, x_set, y_set, batch_size, balance: bool=False): pass def __len__(self): pass def __getitem__(self, idx): pass
4
0
8
0
8
0
2
0.04
1
8
0
0
3
6
3
3
28
3
25
14
21
1
22
14
18
3
1
1
6
326,924
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/ui/basic/run_server.py
src.annflux.ui.basic.run_server.NoStatus
import logging class NoStatus(logging.Filter): def filter(self, record): return 'POST /status' not in record.getMessage()
class NoStatus(logging.Filter): def filter(self, record): pass
2
0
2
0
2
0
1
0
1
0
0
0
1
0
1
3
3
0
3
2
1
0
3
2
1
1
2
0
1
326,925
open-edge-platform/annflux
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/open-edge-platform_annflux/src/annflux/ui/basic/run_server.py
src.annflux.ui.basic.run_server.StatusUpdate
from tensorflow.python.keras.callbacks import Callback from annflux.tools.core import AnnFluxState class StatusUpdate(Callback): def __init__(self, state: AnnFluxState): super().__init__() self.state = state def on_epoch_end(self, epoch, logs=None): self.state.linear_status_epoch = ep...
class StatusUpdate(Callback): def __init__(self, state: AnnFluxState): pass def on_epoch_end(self, epoch, logs=None): pass
3
0
3
0
3
0
1
0
1
2
1
0
2
1
2
2
7
1
6
4
3
0
6
4
3
1
1
0
2
326,926
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/benchmarks/_load_and_query/_load_and_query.py
lakebench.benchmarks._load_and_query._load_and_query._LoadAndQuery
import posixpath from ...engines.polars import Polars from ...engines.duckdb import DuckDB import inspect from ...engines.spark import Spark from ...engines.daft import Daft from ...engines.sail import Sail from ...engines.base import BaseEngine from ...utils.query_utils import transpile_and_qualify_query, get_table_na...
class _LoadAndQuery(BaseBenchmark): ''' Base class for benchmarks that only have a simple Load and Query phase (TPC-H, TPC-DS, ClickBench). PLEASE DO NOT INSTANTIATE THIS CLASS DIRECTLY. Use the subclasses instead. ''' def __init__(self, engine: BaseEngine, scenario_name: str, scale_factor: ...
8
7
41
3
27
11
5
0.35
1
12
5
6
7
8
7
31
327
30
220
66
201
78
125
49
117
13
5
4
37
326,927
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/benchmarks/base.py
lakebench.benchmarks.base.BaseBenchmark
from typing import Dict, Type, Optional from ..engines.base import BaseEngine from importlib.metadata import version, PackageNotFoundError import uuid from ..utils.timer import timer from abc import ABC, abstractmethod from datetime import datetime class BaseBenchmark(ABC): """ Abstract base class for defining...
class BaseBenchmark(ABC): ''' Abstract base class for defining benchmarks. This class provides a structure for implementing benchmarks with a specific engine and scenario, and includes functionality for timing and saving results. Attributes ---------- BENCHMARK_IMPL_REGISTRY : Dict[Type, Type] ...
7
3
23
2
14
7
2
0.75
1
6
1
2
3
8
4
24
158
13
84
20
77
63
29
17
24
5
4
3
9
326,928
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/benchmarks/clickbench/ClickBench.py
lakebench.benchmarks.clickbench.ClickBench.ClickBench
from .._load_and_query import _LoadAndQuery from ...engines.base import BaseEngine from .engine_impl.spark import SparkClickBench from ...engines.spark import Spark from ...engines.sail import Sail from .engine_impl.duckdb import DuckDBClickBench from typing import Optional, List from ...engines.duckdb import DuckDB c...
class ClickBench(_LoadAndQuery): ''' Class for running the ClickBench benchmark. This class provides functionality for running the ClickBench benchmark, including loading data, executing queries, and performing power tests. Supported engines are listed in the `self.BENCHMARK_IMPL_REGISTRY` constan...
2
1
20
0
20
0
1
1.03
1
4
1
0
1
0
1
32
83
4
39
17
28
40
9
8
7
1
6
0
1
326,929
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/benchmarks/clickbench/clickbench.py
lakebench.benchmarks.clickbench.clickbench.ClickBench
from typing import Optional, List from .._load_and_query import _LoadAndQuery from .engine_impl.duckdb import DuckDBClickBench from ...engines.sail import Sail from ...engines.base import BaseEngine from .engine_impl.spark import SparkClickBench from ...engines.spark import Spark from ...engines.duckdb import DuckDB c...
class ClickBench(_LoadAndQuery): ''' Class for running the ClickBench benchmark. This class provides functionality for running the ClickBench benchmark, including loading data, executing queries, and performing power tests. Supported engines are listed in the `self.BENCHMARK_IMPL_REGISTRY` constan...
2
1
20
0
20
0
1
1.03
1
4
1
0
1
0
1
32
83
4
39
17
28
40
9
8
7
1
6
0
1
326,930
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/benchmarks/clickbench/engine_impl/duckdb.py
lakebench.benchmarks.clickbench.engine_impl.duckdb.DuckDBClickBench
from ....engines.duckdb import DuckDB from typing import Optional import posixpath class DuckDBClickBench: def __init__(self, engine: DuckDB): self.engine = engine def load_parquet_to_delta(self, table_name: str, source_data_path: str, table_is_precreated: bool=False, context_decorator: str=None): ...
class DuckDBClickBench: def __init__(self, engine: DuckDB): pass def load_parquet_to_delta(self, table_name: str, source_data_path: str, table_is_precreated: bool=False, context_decorator: str=None): ''' Loads the ClickBench parquet data into Delta format using Spark. Paramete...
4
1
8
1
5
2
1
0.47
0
3
1
0
3
1
3
3
27
5
15
6
11
7
8
6
4
1
0
0
3
326,931
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/benchmarks/clickbench/engine_impl/sail.py
lakebench.benchmarks.clickbench.engine_impl.sail.SailClickBench
import posixpath from typing import Optional from ....engines.sail import Sail class SailClickBench: def __init__(self, engine: Sail): self.engine = engine def load_parquet_to_delta(self, table_name: str, source_data_path: str, table_is_precreated: bool=False, context_decorator: str=None): ""...
class SailClickBench: def __init__(self, engine: Sail): pass def load_parquet_to_delta(self, table_name: str, source_data_path: str, table_is_precreated: bool=False, context_decorator: str=None): ''' Loads the ClickBench parquet data into Delta format using Spark. Parameters ...
4
1
9
1
5
3
1
0.67
0
3
1
0
3
1
3
3
31
6
15
8
10
10
15
8
10
1
0
0
3
326,932
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/benchmarks/clickbench/engine_impl/spark.py
lakebench.benchmarks.clickbench.engine_impl.spark.SparkClickBench
from typing import Optional from ....engines.spark import Spark class SparkClickBench: def __init__(self, engine: Spark): self.engine = engine def load_parquet_to_delta(self, table_name: str, source_data_path: str, table_is_precreated: bool=False, context_decorator: str=None): """ Loa...
class SparkClickBench: def __init__(self, engine: Spark): pass def load_parquet_to_delta(self, table_name: str, source_data_path: str, table_is_precreated: bool=False, context_decorator: str=None): ''' Loads the ClickBench parquet data into Delta format using Spark. Parameters...
4
1
9
1
5
3
1
0.67
0
3
1
0
3
1
3
3
31
6
15
8
10
10
15
8
10
1
0
0
3
326,933
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/benchmarks/elt_bench/elt_bench.py
lakebench.benchmarks.elt_bench.elt_bench.ELTBench
from ...engines.polars import Polars from ...engines.base import BaseEngine from .engine_impl.sail import SailELTBench from ..base import BaseBenchmark from ...engines.spark import Spark from .engine_impl.duckdb import DuckDBELTBench from ...engines.sail import Sail import posixpath from typing import Optional from .en...
class ELTBench(BaseBenchmark): ''' Class for running the ELTBench benchmark. The ELTBench benchmark is designed to evaluate end-to-end performance of engines in supporting typical Lakehouse architecture patterns. This includes bulk loading data, creation of star schema tables, incrementally merging data in...
4
3
37
4
27
6
6
0.43
1
9
2
0
3
7
3
27
161
18
100
29
86
43
57
18
53
11
5
3
17
326,934
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/benchmarks/elt_bench/engine_impl/daft.py
lakebench.benchmarks.elt_bench.engine_impl.daft.DaftELTBench
from ....engines.daft import Daft from ....engines.delta_rs import DeltaRs import posixpath class DaftELTBench: def __init__(self, engine: Daft): self.engine = engine import numpy as np self.np = np self.delta_rs = DeltaRs() self.write_deltalake = self.delta_rs.write_deltal...
class DaftELTBench: def __init__(self, engine: Daft): pass def create_total_sales_fact(self): pass def merge_percent_into_total_sales_fact(self, percent: float): pass def query_total_sales_fact(self): pass
5
0
37
2
35
0
1
0.01
0
4
2
0
4
5
4
4
151
11
139
17
133
1
19
17
13
1
0
0
4
326,935
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/benchmarks/elt_bench/engine_impl/duckdb.py
lakebench.benchmarks.elt_bench.engine_impl.duckdb.DuckDBELTBench
import posixpath from ....engines.duckdb import DuckDB from ....engines.delta_rs import DeltaRs class DuckDBELTBench: def __init__(self, engine: DuckDB): self.engine = engine import numpy as np self.np = np self.delta_rs = DeltaRs() self.write_deltalake = self.delta_rs.writ...
class DuckDBELTBench: def __init__(self, engine: DuckDB): pass def create_total_sales_fact(self): pass def merge_percent_into_total_sales_fact(self, percent: float): pass def query_total_sales_fact(self): pass
5
0
31
3
28
0
2
0
0
4
2
0
4
5
4
4
127
14
113
19
107
0
25
19
19
2
0
1
6
326,936
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/benchmarks/elt_bench/engine_impl/polars.py
lakebench.benchmarks.elt_bench.engine_impl.polars.PolarsELTBench
import posixpath from ....engines.polars import Polars from ....engines.delta_rs import DeltaRs class PolarsELTBench: def __init__(self, engine: Polars): import numpy as np self.np = np self.delta_rs = DeltaRs() self.write_deltalake = self.delta_rs.write_deltalake self.Delt...
class PolarsELTBench: def __init__(self, engine: Polars): pass def create_total_sales_fact(self): pass def merge_percent_into_total_sales_fact(self, percent: float): pass def query_total_sales_fact(self): pass
5
0
34
1
33
0
1
0.01
0
4
2
0
4
6
4
4
140
7
132
17
126
1
19
17
13
1
0
0
4
326,937
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/benchmarks/elt_bench/engine_impl/sail.py
lakebench.benchmarks.elt_bench.engine_impl.sail.SailELTBench
from ....engines.sail import Sail import posixpath class SailELTBench: def __init__(self, engine: Sail): import numpy as np self.np = np self.engine = engine def create_total_sales_fact(self): for table in ['store_sales', 'date_dim', 'store', 'item', 'customer']: s...
class SailELTBench: def __init__(self, engine: Sail): pass def create_total_sales_fact(self): pass def merge_percent_into_total_sales_fact(self, percent: float): pass def query_total_sales_fact(self): pass
5
0
28
2
26
0
1
0
0
3
1
0
4
2
4
4
114
9
105
16
99
0
20
16
14
2
0
1
5
326,938
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/benchmarks/elt_bench/engine_impl/spark.py
lakebench.benchmarks.elt_bench.engine_impl.spark.SparkELTBench
from ....engines.spark import Spark class SparkELTBench: def __init__(self, engine: Spark): import numpy as np self.np = np self.engine = engine def create_total_sales_fact(self): self.engine.spark.sql('\n CREATE OR REPLACE TABLE total_sales_fact USING DELTA AS\n ...
class SparkELTBench: def __init__(self, engine: Spark): pass def create_total_sales_fact(self): pass def merge_percent_into_total_sales_fact(self, percent: float): pass def query_total_sales_fact(self): pass
5
0
26
1
25
0
1
0.01
0
3
1
0
4
2
4
4
107
7
99
13
93
1
16
13
10
1
0
0
4
326,939
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/benchmarks/tpcds/TPCDS.py
lakebench.benchmarks.tpcds.TPCDS.TPCDS
from ...engines.polars import Polars from .._load_and_query import _LoadAndQuery from ...engines.duckdb import DuckDB from ...engines.daft import Daft from ...engines.sail import Sail from ...engines.spark import Spark class TPCDS(_LoadAndQuery): """ Class for running the TPC-DS benchmark. This class prov...
class TPCDS(_LoadAndQuery): ''' Class for running the TPC-DS benchmark. This class provides functionality for running the TPC-DS benchmark, including loading data, executing queries, and performing power tests. Supported engines are listed in the `self.BENCHMARK_IMPL_REGISTRY` constant. Parame...
1
1
0
0
0
0
0
1.29
1
0
0
0
0
0
0
31
74
3
31
7
30
40
7
7
6
0
6
0
0
326,940
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/benchmarks/tpcds/tpcds.py
lakebench.benchmarks.tpcds.tpcds.TPCDS
from ...engines.polars import Polars from .._load_and_query import _LoadAndQuery from ...engines.sail import Sail from ...engines.duckdb import DuckDB from ...engines.spark import Spark from ...engines.daft import Daft class TPCDS(_LoadAndQuery): """ Class for running the TPC-DS benchmark. This class prov...
class TPCDS(_LoadAndQuery): ''' Class for running the TPC-DS benchmark. This class provides functionality for running the TPC-DS benchmark, including loading data, executing queries, and performing power tests. Supported engines are listed in the `self.BENCHMARK_IMPL_REGISTRY` constant. Parame...
1
1
0
0
0
0
0
1.29
1
0
0
0
0
0
0
31
74
3
31
7
30
40
7
7
6
0
6
0
0
326,941
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/benchmarks/tpch/TPCH.py
lakebench.benchmarks.tpch.TPCH.TPCH
from ...engines.sail import Sail from .._load_and_query import _LoadAndQuery from ...engines.daft import Daft from ...engines.duckdb import DuckDB from ...engines.polars import Polars from ...engines.spark import Spark class TPCH(_LoadAndQuery): """ Class for running the TPC-H benchmark. This class provid...
class TPCH(_LoadAndQuery): ''' Class for running the TPC-H benchmark. This class provides functionality for running the TPC-H benchmark, including loading data, executing queries, and performing power tests. Supported engines are listed in the `self.BENCHMARK_IMPL_REGISTRY` constant. Parameter...
1
1
0
0
0
0
0
1.8
1
0
0
0
0
0
0
31
59
3
20
7
19
36
7
7
6
0
6
0
0
326,942
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/benchmarks/tpch/tpch.py
lakebench.benchmarks.tpch.tpch.TPCH
from ...engines.polars import Polars from ...engines.sail import Sail from .._load_and_query import _LoadAndQuery from ...engines.duckdb import DuckDB from ...engines.spark import Spark from ...engines.daft import Daft class TPCH(_LoadAndQuery): """ Class for running the TPC-H benchmark. This class provid...
class TPCH(_LoadAndQuery): ''' Class for running the TPC-H benchmark. This class provides functionality for running the TPC-H benchmark, including loading data, executing queries, and performing power tests. Supported engines are listed in the `self.BENCHMARK_IMPL_REGISTRY` constant. Parameter...
1
1
0
0
0
0
0
1.8
1
0
0
0
0
0
0
31
59
3
20
7
19
36
7
7
6
0
6
0
0
326,943
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/datagen/_tpc.py
lakebench.datagen._tpc._TPCDataGenerator
import os import posixpath import importlib.util class _TPCDataGenerator: """ Base class for TPC data generation. PLEASE DO NOT INSTANTIATE THIS CLASS DIRECTLY. Use the TPCHDataGenerator and TPCDSDataGenerator subclasses instead. """ GEN_UTIL = '' def __init__(self, scale_factor: int, target_m...
class _TPCDataGenerator: ''' Base class for TPC data generation. PLEASE DO NOT INSTANTIATE THIS CLASS DIRECTLY. Use the TPCHDataGenerator and TPCDSDataGenerator subclasses instead. ''' def __init__(self, scale_factor: int, target_mount_folder_path: str=None, target_row_group_size_mb: int=128):...
3
3
36
5
19
12
2
0.7
0
4
0
2
2
3
2
2
79
11
40
19
35
28
31
19
26
2
0
1
4
326,944
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/datagen/clickbench.py
lakebench.datagen.clickbench.ClickBenchDataGenerator
import posixpath from typing import Optional class ClickBenchDataGenerator: def __init__(self, target_mount_folder_path: str=None, partitioned_files: bool=True): """ Initialize the ClickBench data generator. Technically, this just downloads the ClickBench data from the ClickHouse datasets reposito...
class ClickBenchDataGenerator: def __init__(self, target_mount_folder_path: str=None, partitioned_files: bool=True): ''' Initialize the ClickBench data generator. Technically, this just downloads the ClickBench data from the ClickHouse datasets repository. :param partitioned_files: If True...
4
2
16
2
8
5
2
0.64
0
6
0
0
3
2
3
3
52
11
25
17
19
16
24
14
18
4
0
2
7
326,945
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/datagen/tpcds.py
lakebench.datagen.tpcds.TPCDSDataGenerator
from ._tpc import _TPCDataGenerator class TPCDSDataGenerator(_TPCDataGenerator): """ This class is a wrapper for the DuckDB TPC-DS data generation utility. It generates TPC-DS data in Parquet format based on the specified scale factor and target row group size in MB. Attributes ---------- scal...
class TPCDSDataGenerator(_TPCDataGenerator): ''' This class is a wrapper for the DuckDB TPC-DS data generation utility. It generates TPC-DS data in Parquet format based on the specified scale factor and target row group size in MB. Attributes ---------- scale_factor : int The scale fact...
1
1
0
0
0
0
0
8
1
0
0
0
0
0
0
2
20
2
2
2
1
16
2
2
1
0
1
0
0
326,946
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/datagen/tpch.py
lakebench.datagen.tpch.TPCHDataGenerator
from ._tpc import _TPCDataGenerator class TPCHDataGenerator(_TPCDataGenerator): """ This class is a wrapper for the DuckDB TPC-H data generation utility. It generates TPC-H data in Parquet format based on the specified scale factor and target row group size in MB. Attributes ---------- scale_f...
class TPCHDataGenerator(_TPCDataGenerator): ''' This class is a wrapper for the DuckDB TPC-H data generation utility. It generates TPC-H data in Parquet format based on the specified scale factor and target row group size in MB. Attributes ---------- scale_factor : int The scale factor ...
1
1
0
0
0
0
0
8
1
0
0
0
0
0
0
2
20
2
2
2
1
16
2
2
1
0
1
0
0
326,947
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/engines/base.py
lakebench.engines.base.BaseEngine
from decimal import Decimal from importlib.metadata import version from typing import Optional from abc import ABC import shutil class BaseEngine(ABC): """ Abstract base class for implementing different engine types. Attributes ---------- SQLGLOT_DIALECT : str, optional Specifies the SQL d...
class BaseEngine(ABC): ''' Abstract base class for implementing different engine types. Attributes ---------- SQLGLOT_DIALECT : str, optional Specifies the SQL dialect to be used by the engine when SQL transpiling is required. Default is None. REQUIRED_READ_ENDPOINT : str, optio...
9
6
20
2
14
5
3
0.49
1
10
1
6
8
12
8
28
198
24
119
52
103
58
87
50
71
5
4
3
20
326,948
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/engines/daft.py
lakebench.engines.daft.Daft
import posixpath from typing import Optional from importlib.metadata import version import os from .base import BaseEngine from .delta_rs import DeltaRs class Daft(BaseEngine): """ Daft Engine for ELT Benchmarks. """ SQLGLOT_DIALECT = 'mysql' REQUIRED_READ_ENDPOINT = 'abfss' REQUIRED_WRITE_ENDP...
class Daft(BaseEngine): ''' Daft Engine for ELT Benchmarks. ''' def __init__(self, delta_abfss_schema_path: str, cost_per_vcore_hour: Optional[float]=None): ''' Initialize the Daft Engine Configs ''' pass def load_parquet_to_delta(self, parquet_folder_path: str, ta...
7
4
11
1
9
2
2
0.2
1
7
1
0
6
7
6
34
83
10
61
30
48
12
40
26
31
6
5
2
11
326,949
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/engines/delta_rs.py
lakebench.engines.delta_rs.DeltaRs
from .base import BaseEngine class DeltaRs(BaseEngine): """ Delta-Rs Engine for ELT Benchmarks. """ def __init__(self): """ Initialize the Delta-rs Engine Configs """ from deltalake.writer import write_deltalake from deltalake import DeltaTable self.writ...
class DeltaRs(BaseEngine): ''' Delta-Rs Engine for ELT Benchmarks. ''' def __init__(self): ''' Initialize the Delta-rs Engine Configs ''' pass
2
2
8
0
5
3
1
1
1
0
0
0
1
2
1
29
13
1
6
6
2
6
6
6
2
1
5
0
1
326,950
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/engines/duckdb.py
lakebench.engines.duckdb.DuckDB
import posixpath from importlib.metadata import version import os from .delta_rs import DeltaRs from .base import BaseEngine from typing import Optional class DuckDB(BaseEngine): """ DuckDB Engine for ELT Benchmarks. """ SQLGLOT_DIALECT = 'duckdb' REQUIRED_READ_ENDPOINT = None REQUIRED_WRITE_EN...
class DuckDB(BaseEngine): ''' DuckDB Engine for ELT Benchmarks. ''' def __init__(self, delta_abfss_schema_path: str, cost_per_vcore_hour: Optional[float]=None): ''' Initialize the DuckDB Engine Configs ''' pass def _create_empty_table(self, table_name: str, ddl: st...
8
4
11
1
8
2
2
0.23
1
7
1
0
7
7
7
35
91
11
65
30
52
15
42
26
33
4
5
2
11
326,951
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/engines/fabric_spark.py
lakebench.engines.fabric_spark.FabricSpark
import re from urllib.parse import urlparse, parse_qs from .spark import Spark from typing import Optional from decimal import Decimal class FabricSpark(Spark): """ Spark Engine for ELT Benchmarks. """ def __init__(self, lakehouse_name: str, lakehouse_schema_name: str, spark_measure_telemetry: bool=Fa...
class FabricSpark(Spark): ''' Spark Engine for ELT Benchmarks. ''' def __init__(self, lakehouse_name: str, lakehouse_schema_name: str, spark_measure_telemetry: bool=False, cost_per_vcore_hour: Optional[float]=None, compute_stats_all_cols: bool=False): ''' Initialize the SparkEngine wit...
2
2
60
6
50
5
2
0.16
1
5
0
0
1
7
1
42
65
7
51
17
42
8
17
10
15
2
6
1
2
326,952
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/engines/polars.py
lakebench.engines.polars.Polars
from .base import BaseEngine import posixpath from importlib.metadata import version from typing import Optional import os from .delta_rs import DeltaRs class Polars(BaseEngine): """ Polars Engine for ELT Benchmarks. """ SQLGLOT_DIALECT = 'duckdb' REQUIRED_READ_ENDPOINT = None REQUIRED_WRITE_EN...
class Polars(BaseEngine): ''' Polars Engine for ELT Benchmarks. ''' def __init__(self, delta_abfss_schema_path: str, cost_per_vcore_hour: Optional[float]=None): ''' Initialize the Polars Engine Configs ''' pass def load_parquet_to_delta(self, parquet_folder_path: s...
7
4
11
0
9
2
2
0.2
1
7
1
0
6
9
6
34
81
8
61
31
49
12
37
27
29
4
5
2
9
326,953
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/engines/sail.py
lakebench.engines.sail.Sail
from typing import Optional from .delta_rs import DeltaRs from importlib.metadata import version import posixpath from .base import BaseEngine import os class Sail(BaseEngine): """ Sail Engine for ELT Benchmarks. File system support: https://docs.lakesail.com/sail/main/guide/storage/ """ _SAIL_SER...
class Sail(BaseEngine): ''' Sail Engine for ELT Benchmarks. File system support: https://docs.lakesail.com/sail/main/guide/storage/ ''' def __init__(self, delta_abfss_schema_path: str, cost_per_vcore_hour: Optional[float]=None): ''' Initialize the Sail Engine Configs ''' ...
8
5
15
1
11
3
2
0.27
1
9
1
0
7
8
7
35
122
13
86
44
64
23
51
31
41
7
5
2
13
326,954
mwc360/LakeBench
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mwc360_LakeBench/src/lakebench/engines/spark.py
lakebench.engines.spark.Spark
from .base import BaseEngine import os from typing import Optional import posixpath class Spark(BaseEngine): """ Spark Engine for ELT Benchmarks. """ SQLGLOT_DIALECT = 'spark' REQUIRED_READ_ENDPOINT = None REQUIRED_WRITE_ENDPOINT = None SUPPORTS_ONELAKE = True SUPPORTS_SCHEMA_PREP = Tru...
class Spark(BaseEngine): ''' Spark Engine for ELT Benchmarks. ''' def __init__(self, catalog_name: Optional[str], schema_name: str, schema_abfss_path: Optional[str]=None, spark_measure_telemetry: bool=False, cost_per_vcore_hour: Optional[float]=None, compute_stats_all_cols: bool=False): ''' ...
14
8
14
1
11
3
3
0.25
1
8
0
1
13
13
13
41
210
28
146
76
119
37
102
68
83
11
5
2
33
326,955
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/extensions/attribution/3pp/windsurf.py
3pp.windsurf.Windsurf
import shutil from pathlib import Path import os import requests import platform import logging import json class Windsurf: def __init__(self, log_level=logging.INFO): """Initialize the Windsurf class for Codeium integration.""" logging.basicConfig(level=log_level) self.logger = logging.ge...
class Windsurf: def __init__(self, log_level=logging.INFO): '''Initialize the Windsurf class for Codeium integration.''' pass def log(self, message, is_error=False): '''Log messages with appropriate level.''' pass def _get_user_data_path(self): '''Get the path to ...
11
10
15
2
10
3
3
0.26
0
2
0
0
10
3
10
10
155
28
104
31
93
27
97
27
86
11
0
4
33
326,956
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/_proxy.py
_proxy.ProxyProperty
from lazy_object_proxy import Proxy from collections.abc import Callable from typing import Generic, ParamSpec, TypeVar from lazy_object_proxy.simple import make_proxy_method class ProxyProperty(Proxy, Generic[P, T]): """Lazy proxy that can behave like a method or a property depending on how its used. The class it...
class ProxyProperty(Proxy, Generic[P, T]): '''Lazy proxy that can behave like a method or a property depending on how its used. The class it's proxying should not implement __call__''' def __call__(self, *args: P.args, **kwargs: P.kwargs) -> T: pass
2
1
2
0
2
0
1
0.2
2
0
0
0
1
0
1
3
9
3
5
3
3
1
5
3
3
1
1
0
1
326,957
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/flagging/groupers/all_grouper.py
all_grouper.AllGrouper
from graph_sitter.codebase.flagging.groupers.enums import GroupBy from graph_sitter.codebase.flagging.group import Group from graph_sitter.codebase.flagging.groupers.base_grouper import BaseGrouper from graph_sitter.codebase.flagging.code_flag import CodeFlag from graph_sitter.git.repo_operator.repo_operator import Rep...
class AllGrouper(BaseGrouper): '''Group all flags into one group.''' @staticmethod def create_all_groups(flags: list[CodeFlag], repo_operator: RepoOperator | None=None) -> list[Group]: pass @staticmethod def create_single_group(flags: list[CodeFlag], segment: str, repo_operator: RepoOperato...
5
1
4
0
4
0
2
0.09
1
7
4
0
0
0
2
5
15
3
11
7
6
1
9
5
6
2
1
1
4
326,958
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/shared/exceptions/api.py
api.APINotApplicableForLanguageError
class APINotApplicableForLanguageError(Exception): pass
class APINotApplicableForLanguageError(Exception): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
2
0
2
1
1
0
2
1
1
0
3
0
0
326,959
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/examples/examples/modal_repo_rag/api.py
api.QARequest
from pydantic import BaseModel class QARequest(BaseModel): """Request model for code Q&A.""" repo_name: str query: str
class QARequest(BaseModel): '''Request model for code Q&A.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
82
5
1
3
1
2
1
3
1
2
0
5
0
0
326,960
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/examples/examples/modal_repo_rag/api.py
api.QAResponse
from pydantic import BaseModel class QAResponse(BaseModel): """Response model for code Q&A.""" answer: str = '' context: list[dict[str, str]] = [] status: str = 'success' error: str = ''
class QAResponse(BaseModel): '''Response model for code Q&A.''' pass
1
1
0
0
0
0
0
0.4
1
0
0
0
0
0
0
82
7
1
5
5
4
2
5
5
4
0
5
0
0
326,961
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/examples/examples/modal_repo_analytics/api.py
api.RepoMetrics
from pydantic import BaseModel class RepoMetrics(BaseModel): """Response model for repository metrics.""" num_files: int = 0 num_functions: int = 0 num_classes: int = 0 status: str = 'success' error: str = ''
class RepoMetrics(BaseModel): '''Response model for repository metrics.''' pass
1
1
0
0
0
0
0
0.17
1
0
0
0
0
0
0
82
8
1
6
6
5
1
6
6
5
0
5
0
0
326,962
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/runner/models/apis.py
apis.CreateBranchRequest
from graph_sitter.runner.models.codemod import BranchConfig, Codemod, CodemodRunResult, CreatedBranch, GroupingConfig from pydantic import BaseModel class CreateBranchRequest(BaseModel): codemod: Codemod commit_msg: str grouping_config: GroupingConfig branch_config: BranchConfig
class CreateBranchRequest(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
5
0
5
1
4
0
5
1
4
0
5
0
0
326,963
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/runner/models/apis.py
apis.CreateBranchResponse
from graph_sitter.runner.models.codemod import BranchConfig, Codemod, CodemodRunResult, CreatedBranch, GroupingConfig from pydantic import BaseModel class CreateBranchResponse(BaseModel): results: list[CodemodRunResult] | None = None branches: list[CreatedBranch] | None = None num_flags: int | None = None ...
class CreateBranchResponse(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
5
0
5
5
4
0
5
5
4
0
5
0
0
326,964
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/runner/models/apis.py
apis.GetDiffRequest
from graph_sitter.runner.models.codemod import BranchConfig, Codemod, CodemodRunResult, CreatedBranch, GroupingConfig from pydantic import BaseModel class GetDiffRequest(BaseModel): codemod: Codemod max_transactions: int | None = None max_seconds: int | None = None
class GetDiffRequest(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
4
0
4
3
3
0
4
3
3
0
5
0
0
326,965
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/runner/models/apis.py
apis.GetDiffResponse
from graph_sitter.runner.models.codemod import BranchConfig, Codemod, CodemodRunResult, CreatedBranch, GroupingConfig from pydantic import BaseModel class GetDiffResponse(BaseModel): result: CodemodRunResult
class GetDiffResponse(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
2
0
2
1
1
0
2
1
1
0
5
0
0
326,966
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/runner/models/apis.py
apis.GetRunOnStringRequest
from pydantic import BaseModel class GetRunOnStringRequest(BaseModel): codemod_source: str language: str files: dict[str, str]
class GetRunOnStringRequest(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
4
0
4
1
3
0
4
1
3
0
5
0
0
326,967
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/runner/models/apis.py
apis.GetRunOnStringResult
from pydantic import BaseModel from graph_sitter.runner.models.codemod import BranchConfig, Codemod, CodemodRunResult, CreatedBranch, GroupingConfig class GetRunOnStringResult(BaseModel): result: CodemodRunResult
class GetRunOnStringResult(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
2
0
2
1
1
0
2
1
1
0
5
0
0
326,968
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/runner/models/apis.py
apis.RunFunctionRequest
from pydantic import BaseModel class RunFunctionRequest(BaseModel): codemod_source: str function_name: str commit: bool = False
class RunFunctionRequest(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
4
0
4
2
3
0
4
2
3
0
5
0
0
326,969
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/runner/models/apis.py
apis.ServerInfo
from graph_sitter.runner.enums.warmup_state import WarmupState from pydantic import BaseModel class ServerInfo(BaseModel): repo_name: str | None = None synced_commit: str | None = None warmup_state: WarmupState = WarmupState.PENDING
class ServerInfo(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
4
0
4
4
3
0
4
4
3
0
5
0
0
326,970
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/flagging/groupers/app_grouper.py
app_grouper.AppGrouper
from graph_sitter.codebase.flagging.groupers.enums import GroupBy from graph_sitter.codebase.flagging.code_flag import CodeFlag from graph_sitter.git.repo_operator.repo_operator import RepoOperator from graph_sitter.codebase.flagging.groupers.base_grouper import BaseGrouper from graph_sitter.codebase.flagging.group imp...
class AppGrouper(BaseGrouper): '''Group flags by segment=app. Ex: apps/profile. ''' @staticmethod def create_all_groups(flags: list[CodeFlag], repo_operator: RepoOperator | None=None) -> list[Group]: pass @staticmethod def create_single_group(flags: list[CodeFlag], segment: str, rep...
5
1
7
0
7
0
3
0.18
1
7
4
0
0
0
2
5
23
3
17
11
12
3
15
9
12
3
1
2
5
326,971
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/expressions/array_type.py
array_type.TSArrayType
from graph_sitter.shared.decorators.docs import ts_apidoc from tree_sitter import Node as TSNode from graph_sitter.typescript.expressions.named_type import TSNamedType @ts_apidoc class TSArrayType(TSNamedType[Parent]): """Array type Examples: string[] """ def _get_name_node(self) -> TSNode | N...
@ts_apidoc class TSArrayType(TSNamedType[Parent]): '''Array type Examples: string[] ''' def _get_name_node(self) -> TSNode | None: pass
3
1
2
0
2
0
1
1.33
1
0
0
0
1
0
1
42
8
1
3
2
1
4
3
2
1
1
7
0
1
326,972
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/output/ast.py
ast.AST
from graph_sitter.codebase.span import Span from typing import Self from openai import BaseModel from pydantic.config import ConfigDict class AST(BaseModel): model_config = ConfigDict(frozen=True) graph_sitter_type: str span: Span tree_sitter_type: str children: list[tuple[str | None, Self]]
class AST(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
8
6
0
6
2
5
0
6
2
5
0
2
0
0
326,973
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/configs/models/base_config.py
base_config.BaseConfig
from graph_sitter.shared.path import get_git_root_path from abc import ABC from pathlib import Path from pydantic_settings import BaseSettings, SettingsConfigDict from graph_sitter.configs.constants import ENV_FILENAME, GLOBAL_ENV_FILE from dotenv import load_dotenv, set_key class BaseConfig(BaseSettings, ABC): ""...
class BaseConfig(BaseSettings, ABC): '''Base class for all config classes. Handles loading and saving of configuration values from environment files. Supports both global and local config files. ''' def __init__(self, prefix: str, env_filepath: Path | None=None, *args, **kwargs) -> None: p...
6
3
9
1
7
1
3
0.28
2
3
0
3
4
0
4
24
47
10
29
10
23
8
28
8
23
6
4
2
13
326,974
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/flagging/groupers/base_grouper.py
base_grouper.BaseGrouper
from graph_sitter.codebase.flagging.code_flag import CodeFlag from graph_sitter.codebase.flagging.group import Group from graph_sitter.git.repo_operator.repo_operator import RepoOperator from graph_sitter.codebase.flagging.groupers.enums import GroupBy class BaseGrouper: """Base class of all groupers. Children...
null
6
2
4
0
3
0
1
0.36
0
8
3
6
1
0
3
3
23
4
14
9
8
5
12
7
8
2
0
1
4
326,975
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/gsbuild/build.py
build.SpecialBuildHook
from hatchling.builders.hooks.plugin.interface import BuildHookInterface from pathlib import Path from typing import Any class SpecialBuildHook(BuildHookInterface): PLUGIN_NAME = 'codegen_build' def initialize(self, version: str, build_data: dict[str, Any]) -> None: file = Path(self.root) / 'src' / 'g...
class SpecialBuildHook(BuildHookInterface): def initialize(self, version: str, build_data: dict[str, Any]) -> None: pass
2
0
4
0
4
0
1
0
1
4
0
0
1
0
1
1
7
1
6
4
4
0
6
4
4
1
1
0
1
326,976
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/built_in_type_annotation/built_in_type_annotation.py
built_in_type_annotation.BuiltInTypeAnnotation
from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from tests.shared.skills.skill import Skill from tests.shared.skills.decorators import skill, skill_impl from graph_sitter.core.codebase import Codebase from graph_sitter.writer_decorators import canonical from codemods.codemod import Codemo...
@skill(canonical=True, prompt='Generate a Python codemod that replaces type annotations from the typing module with their corresponding built-in types. The codemod should iterate\nthrough all files in a codebase, check for imports from the typing module, remove those imports, and replace any usages of typing.List, typi...
5
1
15
0
9
6
6
1.08
2
1
1
0
1
0
1
32
28
3
12
8
9
13
11
7
9
6
5
5
6
326,977
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/utils/cache_utils.py
cache_utils.LazyGeneratorCache
from typing import Generic, ParamSpec, TypeVar from collections.abc import Callable, Iterator class LazyGeneratorCache(Generic[ItemType]): """A cache for a generator that is lazily evaluated.""" _cache: list[ItemType] gen: Iterator[ItemType] def __init__(self, gen: Iterator[ItemType]): self._c...
class LazyGeneratorCache(Generic[ItemType]): '''A cache for a generator that is lazily evaluated.''' def __init__(self, gen: Iterator[ItemType]): pass def __iter__(self) -> Iterator[ItemType]: pass
3
1
5
1
5
0
2
0.08
1
1
0
0
2
0
2
4
17
4
12
4
9
1
12
4
9
3
1
1
4
326,978
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/add_function_parameter_type_annotations/add_function_parameter_type_annotations.py
canonical.add_function_parameter_type_annotations.add_function_parameter_type_annotations.AddFunctionParameterTypeAnnotations
from graph_sitter.core.codebase import Codebase from codemods.codemod import Codemod from tests.shared.skills.skill import Skill from tests.shared.skills.decorators import skill, skill_impl from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.writer_decorators import canonica...
@skill(canonical=True, prompt="Generate a Python codemod that adds type annotations for function parameters named 'db' to be of type 'SessionLocal' from 'app.db'. The codemod should\nalso ensure that the necessary import statement is added if it is not already present. Include examples of the code before and after the\...
5
1
13
0
8
5
5
1.73
2
1
1
0
1
0
1
32
35
5
11
7
8
19
10
6
8
5
5
4
5
326,979
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/add_internal_to_non_exported_components/add_internal_to_non_exported_components.py
canonical.add_internal_to_non_exported_components.add_internal_to_non_exported_components.AddInternalToNonExportedComponents
from tests.shared.skills.decorators import skill, skill_impl from codemods.codemod import Codemod from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.writer_decorators import canonical from tests.shared.skills.skill import Skill from graph_sitter.core.codebase import Codebas...
@skill(canonical=True, prompt="Generate a codemod that iterates through a codebase and renames all non-exported React function components by appending 'Internal' to their names. The\ncodemod should check each function to determine if it is a JSX component and not exported, then rename it accordingly.", uid='302d8f7c-c8...
5
1
8
0
5
3
4
2.25
2
1
1
0
1
0
1
32
29
3
8
6
5
18
7
5
5
4
5
3
4
326,980
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/bang_bang_to_boolean/bang_bang_to_boolean.py
canonical.bang_bang_to_boolean.bang_bang_to_boolean.BangBangToBoolean
from graph_sitter.writer_decorators import canonical from tests.shared.skills.skill import Skill from graph_sitter.core.codebase import Codebase from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from tests.shared.skills.decorators import skill, skill_impl from codemods.codemod import Codemo...
@skill(canonical=True, prompt="Generate a TypeScript codemod that transforms instances of '!!(expression)' into 'Boolean(expression)'. The codemod should search through all\nTypeScript files in a codebase, using a regular expression to identify the pattern. Upon finding a match, it should replace '!!' with 'Boolean(' a...
5
1
15
1
8
6
4
0.64
2
1
1
0
1
0
1
32
21
3
11
8
8
7
10
7
8
4
5
3
4
326,981
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/change_component_tag_names/change_component_tag_names.py
canonical.change_component_tag_names.change_component_tag_names.ChangeJSXElementName
from tests.shared.skills.skill import Skill from graph_sitter.writer_decorators import canonical from codemods.codemod import Codemod from tests.shared.skills.decorators import skill, skill_impl from graph_sitter.core.codebase import Codebase from graph_sitter.shared.enums.programming_language import ProgrammingLanguag...
@skill(canonical=True, prompt='Generate a codemod that updates all instances of the JSX element <PrivateRoute> to <PrivateRoutesContainer> within React components in a TypeScript\ncodebase. Ensure that the new component is imported if it is not already present. The codemod should check for the existence of the\n<Privat...
5
1
22
1
13
8
8
1.31
2
2
1
0
1
0
1
32
43
6
16
9
13
21
15
8
13
8
5
6
8
326,982
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/classnames_to_backtick.py
canonical.classnames_to_backtick.ClassNamesToBackTick
from codemods.codemod import Codemod from graph_sitter.core.codebase import Codebase from graph_sitter.writer_decorators import canonical from tests.shared.skills.skill import Skill from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from tests.shared.skills.decorators import skill, skill_imp...
@skill(canonical=True, prompt="Generate a TypeScript codemod that converts all `className='...'` props in JSX elements to use backticks. The codemod should iterate through all files\nin a codebase, identify JSX components, and for each JSX element, check its props. If a prop is named `className` and its value is not al...
5
1
19
0
10
9
8
1.23
2
1
1
0
1
0
1
32
34
5
13
9
10
16
12
8
10
8
5
7
8
326,983
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/convert_array_type_to_square_bracket/convert_array_type_to_square_bracket.py
canonical.convert_array_type_to_square_bracket.convert_array_type_to_square_bracket.ConvertArrayTypeToSquareBracket
from tests.shared.skills.skill import Skill from graph_sitter.writer_decorators import canonical from codemods.codemod import Codemod from graph_sitter.core.expressions.generic_type import GenericType from tests.shared.skills.decorators import skill, skill_impl from graph_sitter.core.codebase import Codebase from graph...
@skill(canonical=True, prompt="Generate a TypeScript codemod that converts types from `Array<T>` to `T[]`. The codemod should iterate through all files in a codebase, checking each\nfunction's return type and parameters. If a return type or parameter type is of the form `Array<T>`, it should be transformed to `T[]`. En...
5
1
15
1
8
6
6
0.64
2
2
2
0
1
0
1
32
21
3
11
9
8
7
10
6
8
6
5
4
6
326,984
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/convert_attribute_to_decorator/convert_attribute_to_decorator.py
canonical.convert_attribute_to_decorator.convert_attribute_to_decorator.ConvertAttributeToDecorator
from codemods.codemod import Codemod from graph_sitter.core.codebase import Codebase from graph_sitter.writer_decorators import canonical from tests.shared.skills.skill import Skill from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from tests.shared.skills.decorators import skill, skill_imp...
@skill(canonical=True, prompt="Generate a Python codemod that transforms class attributes initializing specific Session objects into decorators. The codemod should iterate through\nall classes in a codebase, check for attributes with values 'NullSession' or 'SecureCookieSession', import the corresponding decorators, ad...
5
1
22
2
15
5
5
0.94
2
1
1
0
1
0
1
32
43
8
18
9
15
17
14
8
12
5
5
3
5
326,985
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/convert_comments_to_JSDoc_style/convert_comments_to_JSDoc_style.py
canonical.convert_comments_to_JSDoc_style.convert_comments_to_JSDoc_style.ConvertCommentsToJSDocStyle
from tests.shared.skills.skill import Skill from tests.shared.skills.decorators import skill, skill_impl from codemods.codemod import Codemod from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.core.codebase import Codebase from graph_sitter.writer_decorators import canonica...
@skill(canonical=True, prompt="Generate a codemod that converts comments on exported functions and classes in a TypeScript codebase to JSDoc style. The codemod should iterate\nthrough all functions and classes, check if they are exported, and if they lack docstrings. If comments are present and do not contain 'eslint',...
5
1
17
0
9
8
6
1
2
1
1
0
1
0
1
32
28
4
12
6
9
12
11
5
9
6
5
5
6
326,986
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/convert_docstring_to_google_style/convert_docstring_to_google_style.py
canonical.convert_docstring_to_google_style.convert_docstring_to_google_style.ConvertDocstringToGoogleStyle
from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from codemods.codemod import Codemod from tests.shared.skills.decorators import skill, skill_impl from graph_sitter.core.codebase import Codebase from graph_sitter.writer_decorators import canonical from tests.shared.skills.skill import Skil...
@skill(canonical=True, prompt="Generate a Python codemod class named `ConvertDocstringToGoogleStyle` that inherits from `Codemod` and `Skill`. The class should have a docstring\nexplaining its purpose: converting docstrings of functions and classes to Google style if they aren't already. The `execute` method should ite...
5
1
4
0
4
0
3
0.43
2
1
1
0
1
0
1
32
13
3
7
6
4
3
6
4
4
3
5
2
3
326,987
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/insert_arguments_to_decorator/insert_arguments_to_decorator.py
canonical.insert_arguments_to_decorator.insert_arguments_to_decorator.InsertArgumentsToDecorator
from tests.shared.skills.skill import Skill from codemods.codemod import Codemod from graph_sitter.writer_decorators import canonical from tests.shared.skills.decorators import skill, skill_impl from graph_sitter.core.codebase import Codebase from graph_sitter.shared.enums.programming_language import ProgrammingLanguag...
@skill(canonical=True, prompt="Generate a Python codemod that iterates through a codebase, identifying all instances of the `@app.function` decorator. For each decorator, check if\nthe `cloud` and `region` arguments are present. If they are missing, append `cloud='aws'` and `region='us-east-1'` to the decorator's argum...
5
1
15
0
9
6
7
1.08
2
1
1
0
1
0
1
32
29
4
12
7
9
13
11
6
9
7
5
5
7
326,988
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/invite_factory_create_params/invite_factory_create_params.py
canonical.invite_factory_create_params.invite_factory_create_params.InviteFactoryCreateParams
from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.writer_decorators import canonical from graph_sitter.core.codebase import Codebase from tests.shared.skills.decorators import skill, skill_impl from tests.shared.skills.skill import Skill from graph_sitter.core.detached_sym...
@skill(canonical=True, prompt="Generate a Python codemod that updates calls to `InviteFactory.create`, `InviteFactory.build`, and `InviteFactory(...)` to use the `invitee` parameter\ninstead of `invitee_id`, `invitee['email']`, or `invitee.id`. The codemod should iterate through all files in a codebase, find the releva...
5
1
34
4
19
12
7
0.86
2
2
2
0
1
0
1
32
51
11
22
10
19
19
19
9
17
7
5
4
7
326,989
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/mark_is_boolean/mark_is_boolean.py
canonical.mark_is_boolean.mark_is_boolean.MarkIsBoolean
from tests.shared.skills.decorators import skill, skill_impl from codemods.codemod import Codemod from tests.shared.skills.skill import Skill from graph_sitter.writer_decorators import canonical from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.core.codebase import Codebas...
@skill(canonical=True, prompt="Generate a TypeScript codemod that renames function parameters of boolean type that do not start with 'is'. The codemod should iterate through all\nfiles in a codebase, check each function's parameters, and if a parameter is boolean and does not start with 'is', it should be renamed to st...
5
1
20
0
12
8
8
0.73
2
1
1
0
1
0
1
32
29
3
15
10
12
11
14
9
12
8
5
7
8
326,990
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/pascal_case_symbols/pascal_case_symbols.py
canonical.pascal_case_symbols.pascal_case_symbols.PascalCaseSymbols
from tests.shared.skills.skill import Skill from graph_sitter.core.class_definition import Class from codemods.codemod import Codemod from tests.shared.skills.decorators import skill, skill_impl from graph_sitter.core.interface import Interface from graph_sitter.writer_decorators import canonical from graph_sitter.core...
@skill(canonical=True, prompt="Generate a TypeScript codemod that converts all Classes, Interfaces, and Types in a codebase to PascalCase. The codemod should iterate through all\nsymbols in the codebase, check if each symbol is a Class, Interface, or Type using the `isinstance` function, and if the symbol's name is not...
5
1
11
0
6
5
4
1
2
4
4
0
1
0
1
32
21
3
9
6
6
9
8
5
6
4
5
3
4
326,991
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/pivot_return_types/pivot_return_types.py
canonical.pivot_return_types.pivot_return_types.PivotReturnTypes
from graph_sitter.writer_decorators import canonical from codemods.codemod import Codemod from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from tests.shared.skills.skill import Skill from graph_sitter.core.codebase import Codebase from tests.shared.skills.decorators import skill, skill_imp...
@skill(canonical=True, prompt="Generate a Python codemod that transforms all functions returning a string type to return a custom FastStr type instead. The codemod should iterate\nthrough the codebase, check for functions with a return type of 'str', update the return type to 'FastStr', add the necessary import stateme...
5
1
15
2
7
6
4
1.6
2
1
1
0
1
0
1
32
33
7
10
7
7
16
9
5
7
4
5
3
4
326,992
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/split_decorators/split_decorators.py
canonical.split_decorators.split_decorators.SplitDecorators
from codemods.codemod import Codemod from graph_sitter.core.codebase import Codebase from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.writer_decorators import canonical from tests.shared.skills.decorators import skill, skill_impl from tests.shared.skills.skill import Skil...
null
5
1
13
1
9
3
4
1.42
2
1
1
0
1
0
1
32
36
7
12
9
9
17
11
8
9
4
5
3
4
326,993
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/swap_call_site_imports/swap_call_site_imports.py
canonical.swap_call_site_imports.swap_call_site_imports.SwapCallSiteImports
from graph_sitter.writer_decorators import canonical from codemods.codemod import Codemod from tests.shared.skills.decorators import skill, skill_impl from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from tests.shared.skills.skill import Skill from graph_sitter.core.codebase import Codebas...
@skill(canonical=True, prompt="Generate a Python codemod that replaces all imports of a legacy function with its new replacement. The codemod should find all call sites of the\nlegacy function, update the import module to the new module, and handle the edge case where the legacy function is called within the same file ...
5
1
20
4
10
6
4
1.62
2
1
1
0
1
0
1
32
45
11
13
8
10
21
12
7
10
4
5
2
4
326,994
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/update_optional_type_annotations/update_optional_type_annotations.py
canonical.update_optional_type_annotations.update_optional_type_annotations.UpdateOptionalTypeAnnotations
from tests.shared.skills.decorators import skill, skill_impl from codemods.codemod import Codemod from graph_sitter.core.expressions.generic_type import GenericType from graph_sitter.core.codebase import Codebase from graph_sitter.writer_decorators import canonical from graph_sitter.core.expressions import Type from te...
@skill(canonical=True, prompt="Generate a Python codemod that updates type annotations in a codebase. The codemod should replace instances of 'Optional[X]' with 'X | None' and\nhandle other generic types and unions appropriately. Ensure that the codemod iterates through all files, processes functions and methods, check...
6
1
18
1
15
3
6
0.43
2
4
3
0
1
0
1
32
36
3
23
9
19
10
21
8
18
7
5
6
12
326,995
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/canonical/update_union_types/update_union_types.py
canonical.update_union_types.update_union_types.UpdateUnionTypes
from codemods.codemod import Codemod from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.core.codebase import Codebase from graph_sitter.writer_decorators import canonical from tests.shared.skills.decorators import skill, skill_impl from tests.shared.skills.skill import Skil...
@skill(canonical=True, prompt='Generate a Python codemod that updates type annotations from the old Union[x, y] syntax to the new x | y syntax for migration from Python 3.9 to\nPython 3.10. The codemod should iterate through all files in a codebase, check for imports of Union from typing, and replace occurrences of Uni...
5
1
18
0
14
4
7
0.29
2
1
1
0
1
0
1
32
24
2
17
8
14
5
15
7
13
7
5
5
7
326,996
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/python/expressions/chained_attribute.py
chained_attribute.PyChainedAttribute
from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.core.expressions import Expression, Name from graph_sitter.core.expressions.chained_attribute import ChainedAttribute from graph_sitter.shared.decorators.docs import py_apidoc @py_apidoc class PyChainedAttribute(ChainedAttribute[Expression, Name, Par...
@py_apidoc class PyChainedAttribute(ChainedAttribute[Expression, Name, Parent], Generic[Parent]): '''Abstract representation of a python chained attribute. This includes methods of python classes and module functions. ''' def __init__(self, ts_node, file_node_id, ctx, parent: Parent): pass
3
1
2
0
2
0
1
1
2
1
0
0
1
0
1
19
7
1
3
2
1
3
3
2
1
1
4
0
1
326,997
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/expressions/chained_attribute.py
chained_attribute.TSChainedAttribute
from graph_sitter.core.detached_symbols.function_call import FunctionCall from graph_sitter.shared.decorators.docs import ts_apidoc from graph_sitter.core.expressions import Expression, Name from graph_sitter.core.expressions.chained_attribute import ChainedAttribute from typing import TYPE_CHECKING, Generic, TypeVar f...
@ts_apidoc class TSChainedAttribute(ChainedAttribute[Expression, Name, Parent], Generic[Parent]): '''A TypeScript chained attribute class representing member access expressions. This class handles the representation and analysis of chained attribute access expressions in TypeScript, such as 'object.property...
6
2
7
1
2
4
1
1.71
2
3
1
0
2
0
2
20
24
5
7
4
2
12
5
3
2
1
4
0
2
326,998
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/cli/errors.py
cli.errors.AuthError
class AuthError(Exception): """Error raised if authed user cannot be established.""" pass
class AuthError(Exception): '''Error raised if authed user cannot be established.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
2
0
0
0
10
4
1
2
1
1
1
2
1
1
0
3
0
0
326,999
codegen-sh/graph-sitter
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/cli/errors.py
cli.errors.CodegenError
class CodegenError(Exception): """Base class for Codegen-specific errors.""" pass
class CodegenError(Exception): '''Base class for Codegen-specific errors.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
1
0
0
0
10
4
1
2
1
1
1
2
1
1
0
3
0
0