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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
323,100 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/common_subexpression_elimination.py | onnx_ir.passes.common.common_subexpression_elimination.CommonSubexpressionEliminationPass | import onnx_ir as ir
class CommonSubexpressionEliminationPass(ir.passes.InPlacePass):
"""Eliminate common subexpression in ONNX graphs.
.. versionadded:: 0.1.1
.. versionchanged:: 0.1.3
Constant nodes with values smaller than ``size_limit`` will be CSE'd.
Attributes:
size_limit: The ... |
class CommonSubexpressionEliminationPass(ir.passes.InPlacePass):
'''Eliminate common subexpression in ONNX graphs.
.. versionadded:: 0.1.1
.. versionchanged:: 0.1.3
Constant nodes with values smaller than ``size_limit`` will be CSE'd.
Attributes:
size_limit: The maximum size of the tens... | 4 | 4 | 34 | 2 | 24 | 9 | 4 | 0.47 | 1 | 11 | 5 | 0 | 3 | 1 | 3 | 32 | 117 | 14 | 72 | 19 | 68 | 34 | 45 | 18 | 41 | 11 | 6 | 4 | 13 |
323,101 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/constant_manipulation.py | onnx_ir.passes.common.constant_manipulation.AddInitializersToInputsPass | import onnx_ir as ir
class AddInitializersToInputsPass(ir.passes.InPlacePass):
"""Add initializers to inputs.
This pass finds all initializers and adds them to the graph.inputs list if they are not already present.
"""
def call(self, model: ir.Model) -> ir.passes.PassResult:
count = 0
... |
class AddInitializersToInputsPass(ir.passes.InPlacePass):
'''Add initializers to inputs.
This pass finds all initializers and adds them to the graph.inputs list if they are not already present.
'''
def call(self, model: ir.Model) -> ir.passes.PassResult: | 2 | 1 | 10 | 0 | 10 | 0 | 4 | 0.27 | 1 | 4 | 2 | 0 | 1 | 0 | 1 | 30 | 16 | 2 | 11 | 6 | 9 | 3 | 11 | 6 | 9 | 4 | 6 | 3 | 4 |
323,102 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/constant_manipulation.py | onnx_ir.passes.common.constant_manipulation.LiftConstantsToInitializersPass | import numpy as np
import onnx_ir as ir
class LiftConstantsToInitializersPass(ir.passes.InPlacePass):
"""Lift constants to initializers.
Attributes:
lift_all_constants: Whether to lift all Constant nodes, including those that does not contain a tensor attribute (e.g. with value_ints etc.)
... | null | 4 | 2 | 32 | 1 | 30 | 2 | 6 | 0.13 | 1 | 15 | 9 | 0 | 3 | 2 | 3 | 32 | 109 | 7 | 91 | 15 | 85 | 12 | 52 | 13 | 48 | 9 | 6 | 2 | 17 |
323,103 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/constant_manipulation.py | onnx_ir.passes.common.constant_manipulation.LiftSubgraphInitializersToMainGraphPass | import onnx_ir as ir
class LiftSubgraphInitializersToMainGraphPass(ir.passes.InPlacePass):
"""Lift subgraph initializers to main graph.
This pass lifts the initializers of a subgraph to the main graph.
It is used to ensure that the initializers are available in the main graph
for further processing or... |
class LiftSubgraphInitializersToMainGraphPass(ir.passes.InPlacePass):
'''Lift subgraph initializers to main graph.
This pass lifts the initializers of a subgraph to the main graph.
It is used to ensure that the initializers are available in the main graph
for further processing or optimization.
Ini... | 2 | 1 | 42 | 0 | 38 | 4 | 8 | 0.26 | 1 | 7 | 2 | 0 | 1 | 0 | 1 | 30 | 52 | 3 | 39 | 8 | 37 | 10 | 28 | 8 | 26 | 8 | 6 | 4 | 8 |
323,104 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/constant_manipulation.py | onnx_ir.passes.common.constant_manipulation.RemoveInitializersFromInputsPass | import onnx_ir as ir
class RemoveInitializersFromInputsPass(ir.passes.InPlacePass):
"""Remove initializers from inputs.
This pass finds all graph inputs that have a const_value and removes them from the graph.inputs list.
"""
def call(self, model: ir.Model) -> ir.passes.PassResult:
count = 0
... |
class RemoveInitializersFromInputsPass(ir.passes.InPlacePass):
'''Remove initializers from inputs.
This pass finds all graph inputs that have a const_value and removes them from the graph.inputs list.
'''
def call(self, model: ir.Model) -> ir.passes.PassResult: | 2 | 1 | 14 | 0 | 14 | 0 | 4 | 0.2 | 1 | 4 | 2 | 0 | 1 | 0 | 1 | 30 | 20 | 2 | 15 | 7 | 13 | 3 | 14 | 7 | 12 | 4 | 6 | 3 | 4 |
323,105 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/identity_elimination.py | onnx_ir.passes.common.identity_elimination.IdentityEliminationPass | import onnx_ir as ir
class IdentityEliminationPass(ir.passes.InPlacePass):
"""Pass for eliminating redundant Identity nodes.
This pass removes Identity nodes according to the following rules:
1. For any node of the form `y = Identity(x)`, where `y` is not an output
of any graph, replace all uses o... | null | 3 | 3 | 34 | 8 | 19 | 8 | 8 | 0.63 | 1 | 6 | 4 | 0 | 2 | 0 | 2 | 31 | 81 | 19 | 38 | 13 | 35 | 24 | 38 | 13 | 35 | 8 | 6 | 3 | 15 |
323,106 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/initializer_deduplication.py | onnx_ir.passes.common.initializer_deduplication.DeduplicateHashedInitializersPass | import onnx_ir as ir
import hashlib
class DeduplicateHashedInitializersPass(ir.passes.InPlacePass):
"""Remove duplicated initializer tensors (using a hashed method) from the graph.
This pass detects initializers with identical shape, dtype, and hashed content,
and replaces all duplicate references with a ... |
class DeduplicateHashedInitializersPass(ir.passes.InPlacePass):
'''Remove duplicated initializer tensors (using a hashed method) from the graph.
This pass detects initializers with identical shape, dtype, and hashed content,
and replaces all duplicate references with a canonical one.
This pass should h... | 3 | 1 | 25 | 4 | 20 | 2 | 4 | 0.27 | 1 | 9 | 4 | 0 | 2 | 1 | 2 | 31 | 63 | 13 | 41 | 15 | 38 | 11 | 31 | 15 | 28 | 6 | 6 | 4 | 7 |
323,107 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/initializer_deduplication.py | onnx_ir.passes.common.initializer_deduplication.DeduplicateInitializersPass | import onnx_ir as ir
class DeduplicateInitializersPass(ir.passes.InPlacePass):
"""Remove duplicated initializer tensors from the main graph and all subgraphs.
This pass detects initializers with identical shape, dtype, and content,
and replaces all duplicate references with a canonical one.
Initializ... | null | 3 | 1 | 16 | 2 | 14 | 1 | 3 | 0.43 | 1 | 9 | 4 | 0 | 2 | 1 | 2 | 31 | 47 | 9 | 28 | 11 | 25 | 12 | 23 | 11 | 20 | 5 | 6 | 3 | 6 |
323,108 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/inliner.py | onnx_ir.passes.common.inliner.InlinePass | from collections import defaultdict
import onnx_ir as ir
import onnx_ir.convenience as _ir_convenience
from collections.abc import Iterable, Mapping, Sequence
class InlinePass(ir.passes.InPlacePass):
"""Inline model local functions to the main graph and clear function definitions."""
def __init__(self) -> Non... |
class InlinePass(ir.passes.InPlacePass):
'''Inline model local functions to the main graph and clear function definitions.'''
def __init__(self) -> None:
pass
def _reset(self, model: ir.Model) -> None:
pass
def call(self, model: ir.Model) -> InlinePassResult:
pass
def _i... | 6 | 1 | 25 | 2 | 21 | 3 | 6 | 0.13 | 1 | 18 | 8 | 0 | 5 | 6 | 5 | 34 | 132 | 13 | 106 | 35 | 100 | 14 | 82 | 35 | 76 | 17 | 6 | 5 | 29 |
323,109 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/inliner.py | onnx_ir.passes.common.inliner.InlinePassResult | import dataclasses
import onnx_ir as ir
@dataclasses.dataclass
class InlinePassResult(ir.passes.PassResult):
id_count: dict[ir.OperatorIdentifier, int] | @dataclasses.dataclass
class InlinePassResult(ir.passes.PassResult): | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
323,110 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/inliner.py | onnx_ir.passes.common.inliner._CopyReplace | from collections.abc import Iterable, Mapping, Sequence
import onnx_ir as ir
class _CopyReplace:
"""Utilities for creating a copy of IR objects with substitutions for attributes/input values."""
def __init__(self, inliner: InlinePass, attr_map: Mapping[str, ir.Attr], value_map: dict[ir.Value, ir.Value | None]... |
class _CopyReplace:
'''Utilities for creating a copy of IR objects with substitutions for attributes/input values.'''
def __init__(self, inliner: InlinePass, attr_map: Mapping[str, ir.Attr], value_map: dict[ir.Value, ir.Value | None], metadata_props: dict[str, str], call_stack: CallStack) -> None:
pas... | 7 | 1 | 20 | 1 | 18 | 2 | 3 | 0.11 | 0 | 10 | 6 | 0 | 6 | 5 | 6 | 6 | 125 | 11 | 107 | 37 | 93 | 12 | 57 | 29 | 50 | 6 | 0 | 2 | 16 |
323,111 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/naming.py | onnx_ir.passes.common.naming.NameFixPass | import collections
import onnx_ir as ir
class NameFixPass(ir.passes.InPlacePass):
"""Pass for fixing names to ensure all values and nodes have unique names.
This pass ensures that:
1. Graph inputs and outputs have unique names (take precedence)
2. All intermediate values have unique names (assign name... | null | 11 | 10 | 23 | 3 | 16 | 4 | 3 | 0.4 | 1 | 15 | 9 | 0 | 8 | 1 | 8 | 37 | 231 | 43 | 134 | 52 | 105 | 54 | 95 | 35 | 83 | 10 | 6 | 4 | 33 |
323,112 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/naming.py | onnx_ir.passes.common.naming.NameGenerator | import onnx_ir as ir
from typing import Protocol
class NameGenerator(Protocol):
def generate_node_name(self, node: ir.Node) -> str:
"""Generate a preferred name for a node."""
...
def generate_value_name(self, value: ir.Value) -> str:
"""Generate a preferred name for a value."""
... |
class NameGenerator(Protocol):
def generate_node_name(self, node: ir.Node) -> str:
'''Generate a preferred name for a node.'''
pass
def generate_value_name(self, value: ir.Value) -> str:
'''Generate a preferred name for a value.'''
pass | 3 | 2 | 3 | 0 | 2 | 1 | 1 | 0.4 | 1 | 3 | 2 | 1 | 2 | 0 | 2 | 26 | 8 | 1 | 5 | 3 | 2 | 2 | 5 | 3 | 2 | 1 | 5 | 0 | 2 |
323,113 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/naming.py | onnx_ir.passes.common.naming.SimpleNameGenerator | import onnx_ir as ir
class SimpleNameGenerator(NameGenerator):
"""Base class for name generation functions."""
def generate_node_name(self, node: ir.Node) -> str:
"""Generate a preferred name for a node."""
return node.name or 'node'
def generate_value_name(self, value: ir.Value) -> str:
... |
class SimpleNameGenerator(NameGenerator):
'''Base class for name generation functions.'''
def generate_node_name(self, node: ir.Node) -> str:
'''Generate a preferred name for a node.'''
pass
def generate_value_name(self, value: ir.Value) -> str:
'''Generate a preferred name for a ... | 3 | 3 | 3 | 0 | 2 | 1 | 1 | 0.6 | 1 | 3 | 2 | 0 | 2 | 0 | 2 | 28 | 10 | 2 | 5 | 3 | 2 | 3 | 5 | 3 | 2 | 1 | 6 | 0 | 2 |
323,114 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/onnx_checker.py | onnx_ir.passes.common.onnx_checker.CheckerPass | import onnx
from typing import Literal
from onnx_ir.passes.common import _c_api_utils
import onnx_ir as ir
class CheckerPass(ir.passes.PassBase):
"""Run onnx checker on the model."""
@property
def in_place(self) -> Literal[True]:
"""This pass does not create a new model."""
return True
... | null | 8 | 5 | 8 | 0 | 6 | 1 | 1 | 0.22 | 1 | 4 | 2 | 0 | 4 | 3 | 4 | 31 | 39 | 6 | 27 | 16 | 14 | 6 | 15 | 9 | 9 | 1 | 5 | 0 | 5 |
323,115 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/shape_inference.py | onnx_ir.passes.common.shape_inference.ShapeInferencePass | from onnx_ir.passes.common import _c_api_utils
import onnx
import onnx_ir as ir
class ShapeInferencePass(ir.passes.InPlacePass):
"""This pass performs shape inference on the graph."""
def __init__(self, check_type: bool=True, strict_mode: bool=True, data_prop: bool=True) -> None:
"""Initialize the sha... | null | 4 | 2 | 13 | 1 | 10 | 3 | 1 | 0.39 | 1 | 5 | 2 | 0 | 2 | 3 | 2 | 31 | 37 | 6 | 23 | 12 | 17 | 9 | 16 | 9 | 12 | 2 | 6 | 1 | 4 |
323,116 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/topological_sort.py | onnx_ir.passes.common.topological_sort.TopologicalSortPass | import onnx_ir as ir
class TopologicalSortPass(ir.passes.InPlacePass):
"""Topologically sort graphs and functions in a model."""
def call(self, model: ir.Model) -> ir.passes.PassResult:
original_nodes = list(model.graph)
model.graph.sort()
sorted_nodes = list(model.graph)
for f... |
class TopologicalSortPass(ir.passes.InPlacePass):
'''Topologically sort graphs and functions in a model.'''
def call(self, model: ir.Model) -> ir.passes.PassResult: | 2 | 1 | 16 | 1 | 14 | 1 | 4 | 0.13 | 1 | 4 | 2 | 0 | 1 | 0 | 1 | 30 | 19 | 2 | 15 | 7 | 13 | 2 | 15 | 7 | 13 | 4 | 6 | 2 | 4 |
323,117 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/unused_removal.py | onnx_ir.passes.common.unused_removal.RemoveUnusedFunctionsPass | import onnx_ir as ir
class RemoveUnusedFunctionsPass(ir.passes.InPlacePass):
def __init__(self):
super().__init__()
self._used: set[ir.OperatorIdentifier] | None = None
def call(self, model: ir.Model) -> ir.passes.PassResult:
self._used = set()
for node in ir.traversal.Recursi... | null | 5 | 0 | 9 | 1 | 8 | 1 | 3 | 0.06 | 1 | 9 | 5 | 0 | 4 | 1 | 4 | 33 | 40 | 7 | 31 | 11 | 26 | 2 | 31 | 11 | 26 | 4 | 6 | 1 | 10 |
323,118 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/unused_removal.py | onnx_ir.passes.common.unused_removal.RemoveUnusedNodesPass | import onnx_ir as ir
class RemoveUnusedNodesPass(ir.passes.InPlacePass):
"""Pass for removing unused nodes and initializers (dead code elimination).
This pass does not modify the model signature (inputs and outputs). It ensures
that unused nodes and initializers are removed while preserving the original
... |
class RemoveUnusedNodesPass(ir.passes.InPlacePass):
'''Pass for removing unused nodes and initializers (dead code elimination).
This pass does not modify the model signature (inputs and outputs). It ensures
that unused nodes and initializers are removed while preserving the original
contract of the mod... | 2 | 1 | 15 | 0 | 15 | 0 | 5 | 0.31 | 1 | 5 | 2 | 0 | 1 | 0 | 1 | 30 | 23 | 2 | 16 | 8 | 14 | 5 | 16 | 8 | 14 | 5 | 6 | 2 | 5 |
323,119 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/passes/common/unused_removal.py | onnx_ir.passes.common.unused_removal.RemoveUnusedOpsetsPass | import onnx_ir as ir
class RemoveUnusedOpsetsPass(ir.passes.InPlacePass):
"""Remove unused opset imports from the model and functions.
Attributes:
process_functions: Whether to process functions in the model. If True, the pass will
remove unused opset imports from functions as well. If Fal... |
class RemoveUnusedOpsetsPass(ir.passes.InPlacePass):
'''Remove unused opset imports from the model and functions.
Attributes:
process_functions: Whether to process functions in the model. If True, the pass will
remove unused opset imports from functions as well. If False, only the main grap... | 4 | 1 | 8 | 1 | 7 | 1 | 3 | 0.36 | 1 | 9 | 5 | 0 | 3 | 1 | 3 | 32 | 35 | 6 | 22 | 13 | 16 | 8 | 20 | 11 | 16 | 4 | 6 | 2 | 8 |
323,120 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/serde.py | onnx_ir.serde.SerdeError | class SerdeError(RuntimeError):
"""Error during serialization or deserialization.""" | class SerdeError(RuntimeError):
'''Error during serialization or deserialization.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
323,121 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/serde.py | onnx_ir.serde.TensorProtoTensor | from onnx_ir import _convenience, _core, _enums, _protocols, _type_casting
import onnx.external_data_helper
import onnx
import numpy as np
from typing import Any, Callable
class TensorProtoTensor(_core.TensorBase):
"""A tensor initialized from a tensor proto."""
__slots__ = ('_proto',)
def __init__(self, ... |
class TensorProtoTensor(_core.TensorBase):
'''A tensor initialized from a tensor proto.'''
def __init__(self, proto: onnx.TensorProto) -> None:
pass
@property
def name(self) -> str:
pass
@name.setter
def name(self) -> str:
pass
@property
def shape(self) -> _core... | 20 | 4 | 16 | 1 | 13 | 2 | 3 | 0.18 | 1 | 9 | 2 | 0 | 13 | 1 | 13 | 60 | 234 | 24 | 180 | 28 | 160 | 32 | 108 | 22 | 94 | 18 | 8 | 2 | 44 |
323,122 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/tensor_adapters.py | onnx_ir.tensor_adapters.TorchTensor | import onnx_ir as ir
from onnx_ir import _core
import numpy.typing as npt
from typing import TYPE_CHECKING, Any
import ctypes
class TorchTensor(_core.Tensor):
def __init__(self, tensor: torch.Tensor, name: str | None=None, doc_string: str | None=None):
super().__init__(tensor, dtype=from_torch_dtype(tenso... |
class TorchTensor(_core.Tensor):
def __init__(self, tensor: torch.Tensor, name: str | None=None, doc_string: str | None=None):
pass
def numpy(self) -> npt.NDArray:
pass
def __array__(self, dtype: Any=None, copy: bool | None=None) -> npt.NDArray:
pass
def tobytes(self) -> byt... | 5 | 0 | 13 | 1 | 10 | 2 | 2 | 0.2 | 1 | 8 | 1 | 0 | 4 | 1 | 4 | 61 | 54 | 8 | 41 | 11 | 32 | 8 | 23 | 8 | 16 | 3 | 9 | 1 | 8 |
323,123 | onnx/ir-py | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/onnx_ir-py/src/onnx_ir/traversal.py | onnx_ir.traversal.RecursiveGraphIterator | from typing import Callable, Union
from typing_extensions import Self
from onnx_ir import _core, _enums
from collections.abc import Iterator, Reversible
class RecursiveGraphIterator(Iterator[_core.Node], Reversible[_core.Node]):
def __init__(self, graph_like: GraphLike, *, recursive: Callable[[_core.Node], bool] ... |
class RecursiveGraphIterator(Iterator[_core.Node], Reversible[_core.Node]):
def __init__(self, graph_like: GraphLike, *, recursive: Callable[[_core.Node], bool] | None=None, reverse: bool=False, enter_graph: Callable[[GraphLike], None] | None=None, exit_graph: Callable[[GraphLike], None] | None=None):
'''... | 7 | 1 | 15 | 1 | 12 | 3 | 4 | 0.22 | 2 | 8 | 6 | 0 | 6 | 6 | 6 | 33 | 98 | 11 | 72 | 28 | 55 | 16 | 43 | 18 | 36 | 11 | 5 | 4 | 21 |
323,124 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/plugins/api_docs_generator.py | api_docs_generator.APIDocsGenerator | from datetime import datetime
from bedrock_server_manager import Settings, PluginBase, __version__
from typing import Any
import inspect
import os
class APIDocsGenerator(PluginBase):
"""
A utility plugin that automatically generates Markdown documentation
for all registered plugin API functions.
"""
... |
class APIDocsGenerator(PluginBase):
'''
A utility plugin that automatically generates Markdown documentation
for all registered plugin API functions.
'''
def on_load(self):
pass
def on_manager_startup(self, **kwargs: Any):
'''
Triggered once when the application is ful... | 5 | 4 | 26 | 4 | 17 | 6 | 3 | 0.37 | 1 | 6 | 0 | 0 | 4 | 1 | 4 | 70 | 116 | 21 | 70 | 25 | 65 | 26 | 55 | 23 | 50 | 7 | 5 | 4 | 12 |
323,125 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/config/Settings.py | bedrock_server_manager.config.Settings.Settings | import os
from typing import Any, Dict, TYPE_CHECKING, Optional
from . import bcm_config
from ..error import ConfigurationError
from ..db.models import Setting, Base
from .const import package_name, env_name, app_author, get_installed_version
import logging
class Settings:
"""Manages loading, accessing, and saving... |
class Settings:
'''Manages loading, accessing, and saving application settings.
This class acts as a single source of truth for all configuration data.
It handles:
- Determining appropriate application data and configuration directories
based on the environment (respecting ``BSM_DATA_DIR`... | 18 | 14 | 25 | 3 | 11 | 12 | 2 | 1.17 | 0 | 10 | 2 | 0 | 13 | 7 | 13 | 13 | 368 | 54 | 145 | 45 | 127 | 169 | 92 | 36 | 78 | 4 | 0 | 4 | 27 |
323,126 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/config/settings.py | bedrock_server_manager.config.settings.Settings | from ..db.models import Setting, Base
from . import bcm_config
from ..error import ConfigurationError
from .const import package_name, env_name, app_author, get_installed_version
import logging
from typing import Any, Dict, TYPE_CHECKING, Optional
import os
class Settings:
"""Manages loading, accessing, and saving... |
class Settings:
'''Manages loading, accessing, and saving application settings.
This class acts as a single source of truth for all configuration data.
It handles:
- Determining appropriate application data and configuration directories
based on the environment (respecting ``BSM_DATA_DIR`... | 18 | 14 | 25 | 3 | 11 | 12 | 2 | 1.17 | 0 | 10 | 2 | 0 | 13 | 7 | 13 | 13 | 368 | 54 | 145 | 45 | 127 | 169 | 92 | 36 | 78 | 4 | 0 | 4 | 27 |
323,127 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/context.py | bedrock_server_manager.context.AppContext | from pathlib import Path
from typing import TYPE_CHECKING, Dict, Optional
import os
class AppContext:
"""
A context object that holds application-wide instances and caches.
"""
def __init__(self, settings: Optional['Settings']=None, manager: Optional['BedrockServerManager']=None, db: Optional['Databas... |
class AppContext:
'''
A context object that holds application-wide instances and caches.
'''
def __init__(self, settings: Optional['Settings']=None, manager: Optional['BedrockServerManager']=None, db: Optional['Database']=None):
'''
Initializes the AppContext.
'''
pass
... | 22 | 13 | 11 | 1 | 7 | 3 | 2 | 0.44 | 0 | 10 | 7 | 0 | 12 | 8 | 12 | 12 | 161 | 24 | 95 | 50 | 58 | 42 | 75 | 36 | 52 | 3 | 0 | 2 | 21 |
323,128 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/bedrock_process_manager.py | bedrock_server_manager.core.bedrock_process_manager.BedrockProcessManager | import time
from ..error import BSMError, ServerNotRunningError, ServerStartError, FileOperationError
from ..context import AppContext
import threading
import logging
from mcstatus import BedrockServer as mc
from typing import Dict, Optional, TYPE_CHECKING
class BedrockProcessManager:
"""
Manages Bedrock serve... |
class BedrockProcessManager:
'''
Manages Bedrock server processes, including monitoring and restarting.
'''
def __init__(self, app_context: AppContext):
'''Initializes the BedrockProcessManager.'''
pass
def add_server(self, server: 'BedrockServer'):
'''Adds a server to be ... | 8 | 8 | 18 | 1 | 17 | 1 | 3 | 0.11 | 0 | 8 | 3 | 0 | 7 | 7 | 7 | 7 | 140 | 12 | 117 | 30 | 106 | 13 | 79 | 24 | 71 | 12 | 0 | 6 | 22 |
323,129 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/bedrock_server.py | bedrock_server_manager.core.bedrock_server.BedrockServer | from . import server
from ..error import FileOperationError, ConfigParseError
from ..config.settings import Settings
from typing import Dict, Any
class BedrockServer(server.ServerStateMixin, server.ServerProcessMixin, server.ServerInstallationMixin, server.ServerWorldMixin, server.ServerAddonMixin, server.ServerBackup... |
class BedrockServer(server.ServerStateMixin, server.ServerProcessMixin, server.ServerInstallationMixin, server.ServerWorldMixin, server.ServerAddonMixin, server.ServerBackupMixin, server.ServerPlayerMixin, server.ServerConfigManagementMixin, server.ServerInstallUpdateMixin, server.BedrockServerBaseMixin):
'''Repre... | 4 | 4 | 45 | 5 | 17 | 24 | 2 | 2.45 | 10 | 8 | 3 | 0 | 3 | 0 | 3 | 94 | 246 | 32 | 62 | 22 | 47 | 152 | 27 | 9 | 23 | 5 | 2 | 2 | 7 |
323,130 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/downloader.py | bedrock_server_manager.core.downloader.BedrockDownloader | import re
import os
from pathlib import Path
import platform
from typing import Tuple, Optional, Set, TYPE_CHECKING
import requests
import zipfile
from .system import base as system_base
import logging
import json
from ..error import DownloadError, ExtractError, MissingArgumentError, InternetConnectivityError, FileOper... |
class BedrockDownloader:
'''Manages the download, extraction, and setup of a Bedrock Server instance.
This class orchestrates the process of obtaining and preparing Minecraft
Bedrock server files for a specific server instance. It handles:
- **Version Targeting**: Allows specifying "LATEST" (stable... | 15 | 15 | 54 | 5 | 34 | 16 | 6 | 0.52 | 0 | 18 | 8 | 0 | 14 | 13 | 14 | 14 | 817 | 94 | 478 | 72 | 457 | 250 | 264 | 57 | 249 | 12 | 0 | 5 | 79 |
323,131 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/manager.py | bedrock_server_manager.core.manager.BedrockServerManager | from .manager_mixins.web_service_mixin import WebServiceMixin
from .manager_mixins.system_mixin import SystemMixin
from typing import Optional, List, Dict, Any, Union, Tuple
from .manager_mixins.web_process_mixin import WebProcessMixin
from .manager_mixins.content_mixin import ContentMixin
from ..config import EXPATH, ... |
class BedrockServerManager(PlayerMixin, WebProcessMixin, WebServiceMixin, ContentMixin, SystemMixin, DiscoveryMixin):
'''
Manages global application settings, server discovery, and application-wide data.
The :class:`~.BedrockServerManager` serves as the primary high-level interface
for operations that ... | 5 | 5 | 31 | 4 | 14 | 14 | 2 | 1.57 | 6 | 4 | 1 | 0 | 4 | 15 | 4 | 33 | 185 | 25 | 63 | 30 | 51 | 99 | 46 | 22 | 41 | 4 | 1 | 1 | 7 |
323,132 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/manager_mixins/content_mixin.py | bedrock_server_manager.core.manager_mixins.content_mixin.ContentMixin | import os
from typing import List
from bedrock_server_manager.error import AppFileNotFoundError, FileOperationError
import glob
class ContentMixin:
"""
Mixin class for BedrockServerManager that handles global content management.
"""
def _list_content_files(self, sub_folder: str, extensions: List[str])... |
class ContentMixin:
'''
Mixin class for BedrockServerManager that handles global content management.
'''
def _list_content_files(self, sub_folder: str, extensions: List[str]) -> List[str]:
'''
Internal helper to list files with specified extensions from a sub-folder
within ... | 4 | 4 | 32 | 5 | 8 | 19 | 3 | 2.31 | 0 | 6 | 2 | 1 | 3 | 0 | 3 | 3 | 103 | 17 | 26 | 10 | 22 | 60 | 22 | 9 | 18 | 8 | 0 | 4 | 10 |
323,133 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/manager_mixins/discovery_mixin.py | bedrock_server_manager.core.manager_mixins.discovery_mixin.DiscoveryMixin | import os
from bedrock_server_manager.error import AppFileNotFoundError, ConfigurationError, FileOperationError, InvalidServerNameError, MissingArgumentError
from typing import Any, Dict, List, Optional, Tuple
from bedrock_server_manager.context import AppContext
from bedrock_server_manager.instances import get_server_... |
class DiscoveryMixin:
'''
Mixin class for BedrockServerManager that handles server discovery and validation.
'''
def validate_server(self, server_name: str, app_context: Optional[AppContext]=None) -> bool:
'''Validates if a given server name corresponds to a valid installation.
Thi... | 3 | 3 | 77 | 11 | 42 | 25 | 7 | 0.62 | 0 | 10 | 5 | 1 | 2 | 0 | 2 | 2 | 159 | 23 | 84 | 19 | 77 | 52 | 46 | 13 | 43 | 8 | 0 | 3 | 13 |
323,134 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/manager_mixins/player_mixin.py | bedrock_server_manager.core.manager_mixins.player_mixin.PlayerMixin | from bedrock_server_manager.error import AppFileNotFoundError, FileOperationError, UserInputError
from bedrock_server_manager.db.models import Player
from typing import TYPE_CHECKING, Any, Dict, List, Optional
import os
from bedrock_server_manager.instances import get_server_instance
from bedrock_server_manager.context... |
class PlayerMixin:
'''
Mixin class for BedrockServerManager that handles player database management.
'''
def parse_player_cli_argument(self, player_string: str) -> None:
'''Parses a comma-separated string of 'player_name:xuid' pairs and saves them to the database.
This utility meth... | 5 | 5 | 65 | 8 | 38 | 20 | 7 | 0.56 | 0 | 10 | 4 | 1 | 4 | 0 | 4 | 4 | 269 | 34 | 151 | 33 | 144 | 84 | 89 | 25 | 84 | 11 | 0 | 5 | 26 |
323,135 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/manager_mixins/system_mixin.py | bedrock_server_manager.core.manager_mixins.system_mixin.SystemMixin | import shutil
import platform
from typing import Dict
class SystemMixin:
"""
Mixin class for BedrockServerManager that handles system information and capabilities.
"""
def get_app_version(self) -> str:
"""Returns the application's version string.
The version is typically derived from ... |
class SystemMixin:
'''
Mixin class for BedrockServerManager that handles system information and capabilities.
'''
def get_app_version(self) -> str:
'''Returns the application's version string.
The version is typically derived from the application's settings
during manager i... | 9 | 7 | 16 | 3 | 6 | 8 | 2 | 1.34 | 0 | 2 | 0 | 1 | 6 | 0 | 6 | 6 | 108 | 21 | 38 | 11 | 29 | 51 | 28 | 9 | 21 | 7 | 0 | 2 | 14 |
323,136 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/manager_mixins/web_process_mixin.py | bedrock_server_manager.core.manager_mixins.web_process_mixin.WebProcessMixin | from bedrock_server_manager.error import ConfigurationError
import os
from bedrock_server_manager.context import AppContext
from typing import List, Optional, Union
class WebProcessMixin:
"""
Mixin class for BedrockServerManager that handles direct Web UI process management.
"""
def start_web_ui_direc... |
class WebProcessMixin:
'''
Mixin class for BedrockServerManager that handles direct Web UI process management.
'''
def start_web_ui_direct(self, app_context: AppContext, host: Optional[Union[str, List[str]]]=None, debug: bool=False, threads: Optional[int]=None) -> None:
'''Starts the Web U... | 5 | 5 | 24 | 3 | 8 | 12 | 2 | 1.5 | 0 | 6 | 1 | 1 | 4 | 0 | 4 | 4 | 102 | 17 | 34 | 15 | 20 | 51 | 20 | 6 | 14 | 3 | 0 | 1 | 7 |
323,137 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/manager_mixins/web_service_mixin.py | bedrock_server_manager.core.manager_mixins.web_service_mixin.WebServiceMixin | from typing import Optional
import subprocess
import shutil
import os
from bedrock_server_manager.error import AppFileNotFoundError, CommandNotFoundError, FileOperationError, MissingArgumentError, PermissionsError, SystemError
class WebServiceMixin:
"""
Mixin class for BedrockServerManager that handles Web UI ... |
class WebServiceMixin:
'''
Mixin class for BedrockServerManager that handles Web UI system service management.
'''
def _ensure_linux_for_web_service(self, operation_name: str) -> None:
'''Ensures the current OS is Linux before proceeding with a Web UI systemd operation.
Args:
... | 11 | 11 | 59 | 5 | 40 | 16 | 5 | 0.41 | 0 | 12 | 5 | 1 | 10 | 3 | 10 | 10 | 605 | 58 | 400 | 57 | 384 | 162 | 191 | 45 | 180 | 10 | 0 | 4 | 51 |
323,138 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/server/addon_mixin.py | bedrock_server_manager.core.server.addon_mixin.ServerAddonMixin | from typing import Tuple, List, Dict, Optional, Any
import glob
import zipfile
from .base_server_mixin import BedrockServerBaseMixin
import shutil
from ...error import MissingArgumentError, FileOperationError, UserInputError, ExtractError, AppFileNotFoundError, ConfigParseError
import json
import re
import os
import te... | null | 16 | 16 | 75 | 9 | 39 | 26 | 6 | 0.71 | 1 | 20 | 6 | 1 | 15 | 0 | 15 | 25 | 1,166 | 158 | 592 | 151 | 550 | 420 | 340 | 105 | 324 | 13 | 1 | 5 | 91 |
323,139 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/server/backup_restore_mixin.py | bedrock_server_manager.core.server.backup_restore_mixin.ServerBackupMixin | from .base_server_mixin import BedrockServerBaseMixin
from ...error import FileOperationError, UserInputError, BackupRestoreError, MissingArgumentError, ConfigurationError, AppFileNotFoundError
import os
from typing import Optional, Dict, List, Union, Any
from ...utils import get_timestamp
import re
import glob
import ... | null | 13 | 11 | 81 | 10 | 43 | 32 | 6 | 0.78 | 1 | 17 | 6 | 1 | 9 | 1 | 10 | 20 | 851 | 114 | 435 | 89 | 420 | 339 | 238 | 70 | 227 | 14 | 1 | 4 | 62 |
323,140 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/server/base_server_mixin.py | bedrock_server_manager.core.server.base_server_mixin.BedrockServerBaseMixin | from ..system import base as system_base
import platform
from ...error import MissingArgumentError, ConfigurationError
from typing import Optional, Any
from ...config.settings import Settings
import logging
from functools import cached_property
import os
from ...instances import get_settings_instance
class BedrockServ... |
class BedrockServerBaseMixin:
'''Initializes fundamental attributes for a Bedrock server instance.
This mixin serves as the primary base for the main
:class:`~.core.bedrock_server.BedrockServer` class and, by extension,
all other server-specific mixins. Its main role is to set up essential
instance... | 18 | 11 | 14 | 2 | 6 | 6 | 2 | 1.17 | 0 | 8 | 4 | 10 | 10 | 8 | 10 | 10 | 183 | 31 | 70 | 36 | 46 | 82 | 45 | 23 | 34 | 6 | 0 | 1 | 16 |
323,141 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/server/config_management_mixin.py | bedrock_server_manager.core.server.config_management_mixin.ServerConfigManagementMixin | from .base_server_mixin import BedrockServerBaseMixin
from ...error import MissingArgumentError, FileOperationError, UserInputError, AppFileNotFoundError, ConfigParseError
from typing import List, Dict, Any, Optional
import json
import os
class ServerConfigManagementMixin(BedrockServerBaseMixin):
"""Provides metho... | null | 10 | 10 | 65 | 8 | 38 | 21 | 8 | 0.6 | 1 | 16 | 5 | 1 | 9 | 2 | 9 | 19 | 618 | 81 | 339 | 71 | 323 | 202 | 218 | 51 | 208 | 18 | 1 | 5 | 70 |
323,142 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/server/install_update_mixin.py | bedrock_server_manager.core.server.install_update_mixin.ServerInstallUpdateMixin | from .base_server_mixin import BedrockServerBaseMixin
import os
from ..downloader import BedrockDownloader
from typing import Optional, Any
from ...error import MissingArgumentError, DownloadError, ExtractError, FileOperationError, PermissionsError, ServerStopError, AppFileNotFoundError, FileError, BSMError
class Serv... | null | 5 | 5 | 105 | 10 | 67 | 37 | 10 | 0.66 | 1 | 16 | 10 | 1 | 4 | 2 | 4 | 14 | 458 | 47 | 268 | 42 | 256 | 177 | 126 | 22 | 121 | 20 | 1 | 3 | 39 |
323,143 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/server/installation_mixin.py | bedrock_server_manager.core.server.installation_mixin.ServerInstallationMixin | from typing import Any, Dict, List, Optional
import os
from ..system import base as system_base
from ...error import AppFileNotFoundError, MissingArgumentError, FileOperationError, PermissionsError, ServerStopError
from .base_server_mixin import BedrockServerBaseMixin
class ServerInstallationMixin(BedrockServerBaseMix... | null | 7 | 7 | 48 | 6 | 28 | 17 | 5 | 0.7 | 1 | 10 | 5 | 1 | 6 | 0 | 6 | 16 | 319 | 44 | 171 | 25 | 162 | 119 | 89 | 20 | 82 | 20 | 1 | 3 | 32 |
323,144 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/server/player_mixin.py | bedrock_server_manager.core.server.player_mixin.ServerPlayerMixin | from ...error import FileOperationError
from typing import List, Dict, TYPE_CHECKING, Any
from .base_server_mixin import BedrockServerBaseMixin
import os
import re
class ServerPlayerMixin(BedrockServerBaseMixin):
"""Provides methods for discovering player information by scanning server logs.
This mixin extend... | null | 3 | 3 | 48 | 7 | 26 | 17 | 4 | 0.83 | 1 | 7 | 1 | 1 | 2 | 0 | 2 | 12 | 111 | 17 | 52 | 12 | 49 | 43 | 29 | 10 | 26 | 7 | 1 | 5 | 8 |
323,145 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/server/process_mixin.py | bedrock_server_manager.core.server.process_mixin.ServerProcessMixin | from ..system import base as system_base
from ..system import process as system_process
import subprocess
import platform
import os
import time
from typing import Optional, Dict, Any, TYPE_CHECKING
from .base_server_mixin import BedrockServerBaseMixin
from ...error import MissingArgumentError, ServerNotRunningError, Se... | null | 7 | 7 | 42 | 4 | 31 | 7 | 6 | 0.3 | 1 | 18 | 6 | 1 | 6 | 5 | 6 | 16 | 274 | 35 | 185 | 26 | 178 | 56 | 116 | 17 | 109 | 12 | 1 | 4 | 36 |
323,146 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/server/state_mixin.py | bedrock_server_manager.core.server.state_mixin.ServerStateMixin | import os
from ...error import MissingArgumentError, UserInputError, FileOperationError, ConfigParseError, AppFileNotFoundError
from typing import Optional, Any, Dict, TYPE_CHECKING
from ...db.models import Server
from .base_server_mixin import BedrockServerBaseMixin
class ServerStateMixin(BedrockServerBaseMixin):
... |
class ServerStateMixin(BedrockServerBaseMixin):
'''Manages persistent state and configuration for a Bedrock server instance.
This mixin extends :class:`.BedrockServerBaseMixin` and is responsible for
handling the server's specific configuration, which is stored in a JSON file
(e.g., ``<server_name>_con... | 20 | 20 | 32 | 3 | 19 | 11 | 3 | 0.64 | 1 | 15 | 5 | 1 | 19 | 3 | 19 | 29 | 658 | 84 | 359 | 60 | 334 | 229 | 206 | 43 | 186 | 12 | 1 | 5 | 64 |
323,147 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/server/world_mixin.py | bedrock_server_manager.core.server.world_mixin.ServerWorldMixin | import zipfile
from .base_server_mixin import BedrockServerBaseMixin
from ..system import base as system_base_utils
import os
from ...error import MissingArgumentError, ExtractError, FileOperationError, BackupRestoreError, AppFileNotFoundError, ConfigParseError
import shutil
from typing import Optional, Any
class Serv... | null | 14 | 11 | 46 | 5 | 24 | 17 | 4 | 0.75 | 1 | 15 | 6 | 1 | 10 | 0 | 10 | 20 | 487 | 67 | 242 | 42 | 224 | 182 | 137 | 26 | 126 | 12 | 1 | 2 | 44 |
323,148 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/system/base.py | bedrock_server_manager.core.system.base.ResourceMonitor | from . import process as core_process
from datetime import timedelta
from ...error import PermissionsError, AppFileNotFoundError, MissingArgumentError, SystemError, InternetConnectivityError
import time
import threading
from typing import Optional, Dict, Any, Tuple
class ResourceMonitor:
"""A singleton class for m... |
class ResourceMonitor:
'''A singleton class for monitoring process resource usage (CPU, memory, uptime).
This class provides a way to get resource statistics for a given ``psutil.Process``
object. It is implemented as a thread-safe singleton to ensure that the
internal state required for calculating CP... | 4 | 4 | 39 | 5 | 22 | 15 | 5 | 0.96 | 0 | 13 | 0 | 0 | 3 | 2 | 3 | 3 | 149 | 23 | 69 | 22 | 65 | 66 | 49 | 21 | 45 | 8 | 0 | 4 | 14 |
323,149 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/system/process.py | bedrock_server_manager.core.system.process.GuardedProcess | from ...config import GUARD_VARIABLE
from typing import Optional, List, Dict, Union, Any
import os
import subprocess
class GuardedProcess:
"""Wraps ``subprocess`` calls to inject a recursion guard environment variable.
When the application needs to launch a new instance of itself as a subprocess
(e.g., to... |
class GuardedProcess:
'''Wraps ``subprocess`` calls to inject a recursion guard environment variable.
When the application needs to launch a new instance of itself as a subprocess
(e.g., to start a server in a detached background process via
:func:`launch_detached_process`), this class is used to manag... | 5 | 5 | 14 | 2 | 3 | 8 | 1 | 3.93 | 0 | 5 | 0 | 0 | 4 | 2 | 4 | 4 | 86 | 17 | 14 | 8 | 9 | 55 | 14 | 8 | 9 | 1 | 0 | 0 | 4 |
323,150 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/core/system/windows_class.py | bedrock_server_manager.core.system.windows_class.WebServerWindowsService | import sys
import os
from ...api.web import start_web_server_api, stop_web_server_api
import logging
import threading
class WebServerWindowsService(win32serviceutil.ServiceFramework):
"""
Manages the application's Web UI as a self-sufficient Windows Service.
"""
_svc_name_ = 'BSMWebUIService'
_svc_... |
class WebServerWindowsService(win32serviceutil.ServiceFramework):
'''
Manages the application's Web UI as a self-sufficient Windows Service.
'''
def __init__(self, args):
'''
Constructor is simple. It only gets the service name from `args`.
All other configuration is loaded int... | 4 | 4 | 23 | 3 | 16 | 5 | 2 | 0.39 | 1 | 3 | 0 | 1 | 3 | 2 | 3 | 3 | 82 | 13 | 51 | 13 | 47 | 20 | 36 | 11 | 32 | 3 | 1 | 2 | 7 |
323,151 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.AppFileNotFoundError | class AppFileNotFoundError(FileError, FileNotFoundError):
"""
Raised when an essential application file or directory is not found.
Inherits from `FileNotFoundError` for standard exception handling.
"""
def __init__(self, path: str, description: str='Required file or directory'):
self.path =... | class AppFileNotFoundError(FileError, FileNotFoundError):
'''
Raised when an essential application file or directory is not found.
Inherits from `FileNotFoundError` for standard exception handling.
'''
def __init__(self, path: str, description: str='Required file or directory'):
pass | 2 | 1 | 4 | 0 | 4 | 0 | 1 | 0.8 | 2 | 2 | 0 | 0 | 1 | 2 | 1 | 15 | 10 | 1 | 5 | 4 | 3 | 4 | 5 | 4 | 3 | 1 | 5 | 0 | 1 |
323,152 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.BSMError | class BSMError(Exception):
"""Base class for all custom exceptions in this project."""
pass | class BSMError(Exception):
'''Base class for all custom exceptions in this project.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 6 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
323,153 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.BackupRestoreError | class BackupRestoreError(FileOperationError):
"""Raised when a backup or restore operation fails."""
pass | class BackupRestoreError(FileOperationError):
'''Raised when a backup or restore operation fails.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 6 | 0 | 0 |
323,154 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.BlockedCommandError | class BlockedCommandError(ConfigParseError):
"""Raised when an attempt is made to send a command blocked by configuration."""
pass | class BlockedCommandError(ConfigParseError):
'''Raised when an attempt is made to send a command blocked by configuration.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 6 | 0 | 0 |
323,155 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.CommandNotFoundError | class CommandNotFoundError(SystemError):
"""Raised when a required system command (e.g., 'systemctl', 'unzip') is not found."""
def __init__(self, command_name: str, message='System command not found'):
self.command_name = command_name
self.message = message
super().__init__(f"{self.mes... | class CommandNotFoundError(SystemError):
'''Raised when a required system command (e.g., 'systemctl', 'unzip') is not found.'''
def __init__(self, command_name: str, message='System command not found'):
pass | 2 | 1 | 4 | 0 | 4 | 0 | 1 | 0.2 | 1 | 2 | 0 | 0 | 1 | 2 | 1 | 11 | 7 | 1 | 5 | 4 | 3 | 1 | 5 | 4 | 3 | 1 | 5 | 0 | 1 |
323,156 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.ConfigParseError | class ConfigParseError(ConfigurationError, ValueError):
"""
Raised when a configuration file is malformed or contains invalid values.
Inherits from `ValueError` for standard exception handling.
"""
pass | class ConfigParseError(ConfigurationError, ValueError):
'''
Raised when a configuration file is malformed or contains invalid values.
Inherits from `ValueError` for standard exception handling.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 0 | 0 | 1 | 0 | 0 | 0 | 11 | 7 | 1 | 2 | 1 | 1 | 4 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
323,157 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.ConfigurationError | class ConfigurationError(BSMError):
"""Base for errors related to configuration files or values."""
pass | class ConfigurationError(BSMError):
'''Base for errors related to configuration files or values.'''
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 | 4 | 0 | 0 |
323,158 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.DownloadError | class DownloadError(FileError, IOError):
"""Raised when downloading a file fails. Inherits from IOError."""
pass | class DownloadError(FileError, IOError):
'''Raised when downloading a file fails. Inherits from IOError.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
323,159 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.ExtractError | class ExtractError(FileError):
"""Raised when extracting an archive (zip, etc.) fails."""
pass | class ExtractError(FileError):
'''Raised when extracting an archive (zip, etc.) fails.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
323,160 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.FileError | class FileError(BSMError):
"""Base for errors related to file or directory operations."""
pass | class FileError(BSMError):
'''Base for errors related to file or directory operations.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 4 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
323,161 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.FileOperationError | class FileOperationError(FileError):
"""Raised for general failures during file operations like copy, move, or delete."""
pass | class FileOperationError(FileError):
'''Raised for general failures during file operations like copy, move, or delete.'''
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 | 5 | 0 | 0 |
323,162 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.InternetConnectivityError | class InternetConnectivityError(NetworkError):
"""Raised when an operation requires internet access, but it's unavailable."""
pass | class InternetConnectivityError(NetworkError):
'''Raised when an operation requires internet access, but it's unavailable.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
323,163 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.InvalidServerNameError | class InvalidServerNameError(UserInputError):
"""Raised when a provided server name is invalid or contains illegal characters."""
pass | class InvalidServerNameError(UserInputError):
'''Raised when a provided server name is invalid or contains illegal characters.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
323,164 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.MissingArgumentError | class MissingArgumentError(UserInputError):
"""Raised when a required function or command-line argument is missing."""
pass | class MissingArgumentError(UserInputError):
'''Raised when a required function or command-line argument is missing.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
323,165 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.NetworkError | class NetworkError(BSMError):
"""Base for errors related to network connectivity."""
pass | class NetworkError(BSMError):
'''Base for errors related to network connectivity.'''
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 | 4 | 0 | 0 |
323,166 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.PermissionsError | class PermissionsError(SystemError, PermissionError):
"""
Raised for OS-level file or directory permission errors.
Inherits from `PermissionError` for standard exception handling.
"""
pass | class PermissionsError(SystemError, PermissionError):
'''
Raised for OS-level file or directory permission errors.
Inherits from `PermissionError` for standard exception handling.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 7 | 1 | 2 | 1 | 1 | 4 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
323,167 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.SendCommandError | class SendCommandError(ServerError):
"""Raised when sending a command to the server console fails."""
pass | class SendCommandError(ServerError):
'''Raised when sending a command to the server console fails.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
323,168 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.ServerError | class ServerError(BSMError):
"""Base for errors related to managing the Bedrock server process."""
pass | class ServerError(BSMError):
'''Base for errors related to managing the Bedrock server process.'''
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 | 4 | 0 | 0 |
323,169 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.ServerNotRunningError | class ServerNotRunningError(ServerProcessError):
"""Raised when an operation requires the server to be running, but it's not."""
pass | class ServerNotRunningError(ServerProcessError):
'''Raised when an operation requires the server to be running, but it's not.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 6 | 0 | 0 |
323,170 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.ServerProcessError | class ServerProcessError(ServerError):
"""Base for errors in starting, stopping, or checking the server process."""
pass | class ServerProcessError(ServerError):
'''Base for errors in starting, stopping, or checking the server process.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 3 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
323,171 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.ServerStartError | class ServerStartError(ServerProcessError):
"""Raised when the server process fails to start."""
pass | class ServerStartError(ServerProcessError):
'''Raised when the server process fails to start.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 6 | 0 | 0 |
323,172 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.ServerStopError | class ServerStopError(ServerProcessError):
"""Raised when the server process fails to stop."""
pass | class ServerStopError(ServerProcessError):
'''Raised when the server process fails to stop.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 6 | 0 | 0 |
323,173 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.SystemError | class SystemError(BSMError):
"""Base for errors related to interactions with the host operating system."""
pass | class SystemError(BSMError):
'''Base for errors related to interactions with the host operating system.'''
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 | 4 | 0 | 0 |
323,174 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.UserExitError | class UserExitError(KeyboardInterrupt):
"""
Raised for graceful exits initiated by the user (e.g., answering 'no' to a prompt).
Inherits from `KeyboardInterrupt` so it's not caught by a broad `except Exception`.
"""
pass | class UserExitError(KeyboardInterrupt):
'''
Raised for graceful exits initiated by the user (e.g., answering 'no' to a prompt).
Inherits from `KeyboardInterrupt` so it's not caught by a broad `except Exception`.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 7 | 1 | 2 | 1 | 1 | 4 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
323,175 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/error.py | bedrock_server_manager.error.UserInputError | class UserInputError(BSMError, ValueError):
"""
Base for errors caused by invalid user input.
Inherits from `ValueError` for broader compatibility.
"""
pass | class UserInputError(BSMError, ValueError):
'''
Base for errors caused by invalid user input.
Inherits from `ValueError` for broader compatibility.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 2 | 0 | 0 | 2 | 0 | 0 | 0 | 11 | 7 | 1 | 2 | 1 | 1 | 4 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
323,176 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/logging.py | bedrock_server_manager.logging.AppAndPluginFilter | import logging
import os
from typing import Optional
import logging.handlers
class AppAndPluginFilter(logging.Filter):
"""
A logging filter that allows records from 'bedrock_server_manager'
or from a specified plugin directory.
"""
def __init__(self, plugin_dir: Optional[str]=None):
super(... |
class AppAndPluginFilter(logging.Filter):
'''
A logging filter that allows records from 'bedrock_server_manager'
or from a specified plugin directory.
'''
def __init__(self, plugin_dir: Optional[str]=None):
pass
def filter(self, record: logging.LogRecord) -> bool:
'''
... | 3 | 2 | 11 | 1 | 6 | 5 | 3 | 1.08 | 1 | 4 | 0 | 0 | 2 | 1 | 2 | 4 | 29 | 4 | 12 | 4 | 9 | 13 | 10 | 4 | 7 | 3 | 2 | 1 | 5 |
323,177 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/plugins/api_bridge.py | bedrock_server_manager.plugins.api_bridge.PluginAPI | import functools
import inspect
from typing import Dict, Any, Callable, TYPE_CHECKING, TypeVar, List
from typing import Optional
class PluginAPI:
"""Provides a safe, dynamic, and decoupled interface for plugins to access core APIs.
An instance of this class is passed to each plugin upon its initialization
... |
class PluginAPI:
'''Provides a safe, dynamic, and decoupled interface for plugins to access core APIs.
An instance of this class is passed to each plugin upon its initialization
by the `PluginManager`. Plugins use this instance (typically `self.api`)
to call registered core functions (e.g., `self.api.s... | 9 | 8 | 37 | 4 | 16 | 17 | 2 | 1.19 | 0 | 9 | 0 | 0 | 7 | 3 | 7 | 7 | 283 | 36 | 113 | 30 | 98 | 134 | 52 | 22 | 43 | 6 | 0 | 3 | 16 |
323,178 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/plugins/default/auto_reload_config.py | bedrock_server_manager.plugins.default.auto_reload_config.AutoReloadPlugin | from typing import Any
from bedrock_server_manager import PluginBase
class AutoReloadPlugin(PluginBase):
"""
Automatically sends a `reload` command to a running server after its
configuration files (e.g., allowlist.json, permissions.json) are modified,
ensuring changes take effect immediately without m... |
class AutoReloadPlugin(PluginBase):
'''
Automatically sends a `reload` command to a running server after its
configuration files (e.g., allowlist.json, permissions.json) are modified,
ensuring changes take effect immediately without manual intervention.
'''
def on_load(self):
'''Logs a... | 6 | 6 | 15 | 1 | 13 | 1 | 3 | 0.17 | 1 | 5 | 0 | 0 | 5 | 0 | 5 | 71 | 87 | 10 | 66 | 16 | 60 | 11 | 42 | 14 | 36 | 4 | 5 | 2 | 13 |
323,179 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/plugins/default/autostart_plugin.py | bedrock_server_manager.plugins.default.autostart_plugin.AutostartServers | from typing import Any
from bedrock_server_manager import PluginBase
class AutostartServers(PluginBase):
"""
Starts all servers with the autostart setting set to true on manager startup.
"""
version = '1.0.0'
def on_load(self):
"""
This event is called when the plugin is loaded by ... |
class AutostartServers(PluginBase):
'''
Starts all servers with the autostart setting set to true on manager startup.
'''
def on_load(self):
'''
This event is called when the plugin is loaded by the manager.
'''
pass
def on_manager_startup(self, **kwargs: Any):
... | 3 | 2 | 10 | 1 | 8 | 2 | 2 | 0.33 | 1 | 1 | 0 | 0 | 2 | 0 | 2 | 68 | 28 | 4 | 18 | 9 | 15 | 6 | 14 | 9 | 11 | 3 | 5 | 2 | 4 |
323,180 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/plugins/default/backup_on_start.py | bedrock_server_manager.plugins.default.backup_on_start.AutoBackupOnStart | from typing import Any
from bedrock_server_manager import PluginBase
class AutoBackupOnStart(PluginBase):
"""
Performs a full backup of a server each time a start command is initiated.
This plugin hooks into the `before_server_start` event to ensure a recent
backup exists before the server goes online.... |
class AutoBackupOnStart(PluginBase):
'''
Performs a full backup of a server each time a start command is initiated.
This plugin hooks into the `before_server_start` event to ensure a recent
backup exists before the server goes online.
'''
def on_load(self):
'''Logs a message when the p... | 3 | 3 | 19 | 2 | 13 | 5 | 2 | 0.52 | 1 | 2 | 0 | 0 | 2 | 0 | 2 | 68 | 47 | 6 | 27 | 8 | 24 | 14 | 15 | 7 | 12 | 3 | 5 | 2 | 4 |
323,181 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/plugins/default/content_uploader_plugin/__init__.py | bedrock_server_manager.plugins.default.content_uploader_plugin.ContentUploaderPlugin | import os
from fastapi.responses import HTMLResponse, RedirectResponse
from fastapi import APIRouter, Request, File, UploadFile, Depends
from bedrock_server_manager import PluginBase
from typing import Optional, Dict, Any
import shutil
from pathlib import Path
from bedrock_server_manager.web import get_admin_user
clas... |
class ContentUploaderPlugin(PluginBase):
def on_load(self, **kwargs):
pass
def _define_routes(self):
pass
@self.router.get('/content/upload', response_class=HTMLResponse, name='Content Upload Page', summary='Upload Content', tags=['plugin-ui'])
async def get_upload_page_method... | 10 | 0 | 43 | 5 | 38 | 0 | 3 | 0 | 1 | 6 | 0 | 0 | 5 | 1 | 5 | 71 | 193 | 25 | 168 | 45 | 144 | 0 | 94 | 27 | 85 | 11 | 5 | 3 | 22 |
323,182 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/plugins/default/server_lifecycle_notifications.py | bedrock_server_manager.plugins.default.server_lifecycle_notifications.ServerLifecycleNotificationsPlugin | from typing import Any
from bedrock_server_manager import PluginBase
import time
class ServerLifecycleNotificationsPlugin(PluginBase):
"""
Enhances server management by sending in-game notifications and introducing
delays at critical server lifecycle points (e.g., stop, start, update, delete).
This giv... |
class ServerLifecycleNotificationsPlugin(PluginBase):
'''
Enhances server management by sending in-game notifications and introducing
delays at critical server lifecycle points (e.g., stop, start, update, delete).
This gives players warnings and can help ensure smoother transitions.
'''
def on... | 9 | 9 | 15 | 1 | 13 | 1 | 3 | 0.14 | 1 | 6 | 0 | 0 | 8 | 3 | 8 | 74 | 139 | 15 | 109 | 32 | 100 | 15 | 72 | 30 | 63 | 4 | 5 | 3 | 23 |
323,183 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/plugins/default/update_before_start.py | bedrock_server_manager.plugins.default.update_before_start.AutoupdatePlugin | from typing import Any
from bedrock_server_manager.error import BSMError
from bedrock_server_manager import PluginBase
class AutoupdatePlugin(PluginBase):
"""
Automatically updates a server to the latest version before it starts.
This plugin checks for a server-specific `autoupdate: true` setting in its
... |
class AutoupdatePlugin(PluginBase):
'''
Automatically updates a server to the latest version before it starts.
This plugin checks for a server-specific `autoupdate: true` setting in its
configuration. If enabled, it triggers the update process before launch.
'''
def on_load(self):
'''L... | 3 | 3 | 31 | 3 | 23 | 5 | 4 | 0.32 | 1 | 3 | 1 | 0 | 2 | 0 | 2 | 68 | 71 | 9 | 47 | 11 | 44 | 15 | 26 | 10 | 23 | 6 | 5 | 3 | 7 |
323,184 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/plugins/default/update_version_on_start.py | bedrock_server_manager.plugins.default.update_version_on_start.UpdateVersionOnStartPlugin | from bedrock_server_manager import PluginBase
from mcstatus import BedrockServer as mc
class UpdateVersionOnStartPlugin(PluginBase):
version = '1.0.0'
def on_load(self):
self.logger.info('Plugin loaded. Will check server version on start.')
def after_server_start(self, **kwargs):
server_n... |
class UpdateVersionOnStartPlugin(PluginBase):
def on_load(self):
pass
def after_server_start(self, **kwargs):
pass | 3 | 0 | 17 | 3 | 15 | 0 | 3 | 0 | 1 | 1 | 0 | 0 | 2 | 0 | 2 | 68 | 38 | 7 | 31 | 12 | 28 | 0 | 22 | 11 | 19 | 4 | 5 | 2 | 5 |
323,185 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/plugins/default/world_operation_notifications.py | bedrock_server_manager.plugins.default.world_operation_notifications.WorldOperationNotificationsPlugin | from bedrock_server_manager import PluginBase
from typing import Any
class WorldOperationNotificationsPlugin(PluginBase):
"""
Notifies in-game players before significant world operations (export, import, reset)
are performed on a running server, providing a heads-up for potential disruptions.
"""
v... |
class WorldOperationNotificationsPlugin(PluginBase):
'''
Notifies in-game players before significant world operations (export, import, reset)
are performed on a running server, providing a heads-up for potential disruptions.
'''
def on_load(self):
'''Logs a message when the plugin is loade... | 7 | 7 | 15 | 0 | 14 | 1 | 3 | 0.13 | 1 | 5 | 0 | 0 | 6 | 0 | 6 | 72 | 103 | 8 | 84 | 23 | 77 | 11 | 53 | 21 | 46 | 4 | 5 | 3 | 18 |
323,186 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/plugins/plugin_base.py | bedrock_server_manager.plugins.plugin_base.PluginBase | from typing import Dict, Any, List
from .api_bridge import PluginAPI
from abc import ABC, abstractmethod
from logging import Logger
class PluginBase(ABC):
"""The abstract base class (ABC) from which all plugins must inherit.
Plugins should subclass :class:`.PluginBase` and **must** define a class
attribut... |
class PluginBase(ABC):
'''The abstract base class (ABC) from which all plugins must inherit.
Plugins should subclass :class:`.PluginBase` and **must** define a class
attribute named ``version`` (e.g., ``version = "1.0.0"``). This version string
is used by the :class:`~bedrock_server_manager.plugins.plu... | 48 | 47 | 11 | 1 | 2 | 8 | 1 | 3.73 | 1 | 6 | 1 | 18 | 46 | 3 | 46 | 66 | 624 | 119 | 107 | 53 | 59 | 399 | 101 | 52 | 54 | 2 | 4 | 1 | 47 |
323,187 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/plugins/plugin_manager.py | bedrock_server_manager.plugins.plugin_manager.PluginManager | from ..config.const import _MISSING_PARAM_PLACEHOLDER
import os
from pathlib import Path
from ..config.settings import Settings
from typing import List, Dict, Any, Optional, Type, Callable, Tuple, TYPE_CHECKING
import logging
from ..db.models import Plugin
from .api_bridge import PluginAPI
import importlib.util
from .p... | null | 19 | 19 | 58 | 6 | 38 | 15 | 6 | 0.4 | 0 | 13 | 1 | 0 | 18 | 11 | 18 | 18 | 1,066 | 121 | 685 | 110 | 660 | 275 | 389 | 94 | 370 | 26 | 0 | 8 | 113 |
323,188 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/web/auth_utils.py | bedrock_server_manager.web.auth_utils.CustomAuthBackend | from ..config import bcm_config
from starlette.authentication import AuthCredentials, AuthenticationBackend, SimpleUser
class CustomAuthBackend(AuthenticationBackend):
async def authenticate(self, conn):
if bcm_config.needs_setup(conn.app.state.app_context):
return (AuthCredentials(['unauthent... |
class CustomAuthBackend(AuthenticationBackend):
async def authenticate(self, conn):
pass | 2 | 0 | 9 | 2 | 7 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 10 | 2 | 8 | 3 | 6 | 0 | 8 | 3 | 6 | 3 | 1 | 1 | 3 |
323,189 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/web/routers/account_router.py | bedrock_server_manager.web.routers.account_router.ChangePasswordRequest | from pydantic import BaseModel
class ChangePasswordRequest(BaseModel):
current_password: str
new_password: str |
class ChangePasswordRequest(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 5 | 0 | 0 |
323,190 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/web/routers/account_router.py | bedrock_server_manager.web.routers.account_router.ProfileUpdate | from pydantic import BaseModel
class ProfileUpdate(BaseModel):
full_name: str
email: str |
class ProfileUpdate(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 5 | 0 | 0 |
323,191 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/web/routers/account_router.py | bedrock_server_manager.web.routers.account_router.ThemeUpdate | from pydantic import BaseModel
class ThemeUpdate(BaseModel):
theme: str |
class ThemeUpdate(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 |
323,192 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/web/routers/api_info.py | bedrock_server_manager.web.routers.api_info.AddPlayersPayload | from typing import Dict, Any, List, Optional
from pydantic import BaseModel, Field
class AddPlayersPayload(BaseModel):
"""Request model for manually adding players to the database.
Each string in the 'players' list should be in the format "gamertag:xuid".
"""
players: List[str] = Field(..., descriptio... |
class AddPlayersPayload(BaseModel):
'''Request model for manually adding players to the database.
Each string in the 'players' list should be in the format "gamertag:xuid".
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 10 | 2 | 5 | 2 | 4 | 3 | 2 | 2 | 1 | 0 | 5 | 0 | 0 |
323,193 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/web/routers/api_info.py | bedrock_server_manager.web.routers.api_info.GeneralApiResponse | from typing import Dict, Any, List, Optional
from ...api import application as app_api, utils as utils_api, system as system_api, player as player_api, info as info_api
from ..schemas import BaseApiResponse, User
class GeneralApiResponse(BaseApiResponse):
"""A general-purpose API response model."""
data: Optio... |
class GeneralApiResponse(BaseApiResponse):
'''A general-purpose API response model.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1.29 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 11 | 1 | 7 | 7 | 6 | 9 | 7 | 7 | 6 | 0 | 6 | 0 | 0 |
323,194 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/web/routers/api_info.py | bedrock_server_manager.web.routers.api_info.PruneDownloadsPayload | from typing import Dict, Any, List, Optional
from pydantic import BaseModel, Field
class PruneDownloadsPayload(BaseModel):
"""Request model for pruning the download cache."""
directory: str = Field(..., min_length=1, description="The subdirectory within the main download cache to prune (e.g., 'stable' or 'prev... |
class PruneDownloadsPayload(BaseModel):
'''Request model for pruning the download cache.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.09 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 13 | 1 | 11 | 3 | 10 | 1 | 3 | 3 | 2 | 0 | 5 | 0 | 0 |
323,195 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/web/routers/api_info.py | bedrock_server_manager.web.routers.api_info.ServerSchema | from fastapi import APIRouter, Depends, HTTPException, status, Request
from pydantic import BaseModel, Field
class ServerSchema(BaseModel):
name: str
status: str
version: str
player_count: int |
class ServerSchema(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 |
323,196 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/web/routers/auth.py | bedrock_server_manager.web.routers.auth.Token | from pydantic import BaseModel, Field
from typing import Optional, Dict, Any
class Token(BaseModel):
"""Response model for successful authentication, providing an access token."""
access_token: str
token_type: str
message: Optional[str] = None |
class Token(BaseModel):
'''Response model for successful authentication, providing an access token.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 6 | 1 | 4 | 2 | 3 | 1 | 4 | 2 | 3 | 0 | 5 | 0 | 0 |
323,197 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/web/routers/auth.py | bedrock_server_manager.web.routers.auth.UserLogin | from pydantic import BaseModel, Field
class UserLogin(BaseModel):
"""Request model for user login credentials."""
username: str = Field(..., min_length=1, max_length=80)
password: str = Field(..., min_length=1) |
class UserLogin(BaseModel):
'''Request model for user login credentials.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.33 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 5 | 1 | 3 | 3 | 2 | 1 | 3 | 3 | 2 | 0 | 5 | 0 | 0 |
323,198 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/web/routers/backup_restore.py | bedrock_server_manager.web.routers.backup_restore.BackupActionPayload | from typing import Dict, Any, List, Optional
from pydantic import BaseModel, Field
class BackupActionPayload(BaseModel):
"""Request model for triggering a backup action."""
backup_type: str = Field(..., description="Type of backup: 'world', 'config', or 'all'.")
file_to_backup: Optional[str] = Field(defaul... |
class BackupActionPayload(BaseModel):
'''Request model for triggering a backup action.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.13 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 10 | 1 | 8 | 3 | 7 | 1 | 3 | 3 | 2 | 0 | 5 | 0 | 0 |
323,199 | DMedina559/bedrock-server-manager | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/DMedina559_bedrock-server-manager/src/bedrock_server_manager/web/routers/backup_restore.py | bedrock_server_manager.web.routers.backup_restore.BackupRestoreResponse | from typing import Dict, Any, List, Optional
from ..schemas import BaseApiResponse, User
from pydantic import BaseModel, Field
class BackupRestoreResponse(BaseApiResponse):
"""Generic API response model for backup and restore operations."""
details: Optional[Any] = Field(default=None, description='Optional det... |
class BackupRestoreResponse(BaseApiResponse):
'''Generic API response model for backup and restore operations.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.23 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 17 | 1 | 13 | 5 | 12 | 3 | 5 | 5 | 4 | 0 | 6 | 0 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.