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,600
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/multi_step_elicitation.py
multi_step_elicitation.MultiStepWorkflow
from dataclasses import dataclass, field from typing import Any, Callable, Dict, List, Optional, Union @dataclass class MultiStepWorkflow: """Defines a complete multi-step workflow.""" id: str name: str description: str steps: Dict[str, WorkflowStep] initial_step_id: str metadata: Dict[str,...
@dataclass class MultiStepWorkflow: '''Defines a complete multi-step workflow.''' def __post_init__(self): pass def get_step(self, step_id: str) -> Optional[WorkflowStep]: '''Get a step by ID.''' pass
4
2
11
1
7
3
5
0.33
0
4
1
0
2
0
2
2
32
4
21
7
18
7
20
7
17
9
0
5
10
323,601
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/multi_step_elicitation.py
multi_step_elicitation.WorkflowState
from typing import Any, Callable, Dict, List, Optional, Union from dataclasses import dataclass, field from datetime import datetime, timezone @dataclass class WorkflowState: """Maintains the state of a multi-step workflow.""" workflow_id: str current_step_id: str step_history: List[str] = field(defaul...
@dataclass class WorkflowState: '''Maintains the state of a multi-step workflow.''' def __post_init__(self): '''Initialize step_history with current_step_id if empty.''' pass def add_response(self, step_id: str, response_values: Dict[str, Any]): '''Add a response for a step.''' ...
7
6
6
0
5
2
2
0.35
0
5
0
0
5
0
5
5
47
6
31
15
25
11
31
15
25
3
0
2
9
323,602
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/multi_step_elicitation.py
multi_step_elicitation.WorkflowStep
from elicitation import ElicitationField, ElicitationManager, ElicitationRequest, ElicitationResponse, ElicitationType from dataclasses import dataclass, field from typing import Any, Callable, Dict, List, Optional, Union @dataclass class WorkflowStep: """Represents a single step in a multi-step workflow.""" i...
@dataclass class WorkflowStep: '''Represents a single step in a multi-step workflow.''' def get_next_step(self, response_values: Dict[str, Any], workflow_state: Dict[str, Any]) -> Optional[str]: '''Determine the next step based on response values and workflow state.''' pass
3
2
27
3
18
6
9
0.3
0
4
0
0
1
0
1
1
39
5
27
13
25
8
26
12
24
9
0
3
9
323,603
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/multi_step_elicitation.py
multi_step_elicitation.WorkflowTransitionType
from enum import Enum class WorkflowTransitionType(Enum): """Types of transitions between workflow steps.""" NEXT = 'next' CONDITIONAL = 'conditional' JUMP = 'jump' BACK = 'back' FINISH = 'finish' ABORT = 'abort'
class WorkflowTransitionType(Enum): '''Types of transitions between workflow steps.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
49
9
1
7
7
6
7
7
7
6
0
4
0
0
323,604
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/remote-mcp-server.py
remote-mcp-server.RemoteMCPMetrics
from datetime import datetime, timezone import time from collections import defaultdict from kafka_schema_registry_unified_mcp import MCP_PROTOCOL_VERSION, REGISTRY_MODE, mcp, registry_manager class RemoteMCPMetrics: """Collect and expose metrics for remote MCP server.""" def __init__(self): self.star...
class RemoteMCPMetrics: '''Collect and expose metrics for remote MCP server.''' def __init__(self): pass def record_request(self, method: str, duration: float, success: bool): '''Record a request metric.''' pass def record_oauth_validation(self, success: bool): '''Rec...
11
10
44
5
37
10
6
0.28
0
7
0
0
10
30
10
10
448
57
366
74
348
101
174
66
163
20
0
6
56
323,605
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/resource_linking.py
resource_linking.RegistryURI
from urllib.parse import quote from typing import Any, Dict, List, Optional, Union import re class RegistryURI: """ URI scheme implementation for Schema Registry resources. Supports the following URI patterns: - registry://{registry-name}/contexts/{context}/subjects/{subject}/versions/{version} - ...
class RegistryURI: ''' URI scheme implementation for Schema Registry resources. Supports the following URI patterns: - registry://{registry-name}/contexts/{context}/subjects/{subject}/versions/{version} - registry://{registry-name}/contexts/{context}/subjects/{subject}/config - registry://{regi...
22
22
4
0
3
1
1
0.63
0
2
0
0
21
1
21
21
130
29
62
38
40
39
62
38
40
2
0
1
23
323,606
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/resource_linking.py
resource_linking.ResourceLinker
from typing import Any, Dict, List, Optional, Union class ResourceLinker: """ Helper class for adding resource links to tool responses. Provides methods to add _links sections to various tool outputs according to the MCP 2025-06-18 specification. """ def __init__(self, registry_name: str): ...
class ResourceLinker: ''' Helper class for adding resource links to tool responses. Provides methods to add _links sections to various tool outputs according to the MCP 2025-06-18 specification. ''' def __init__(self, registry_name: str): '''Initialize the resource linker for a specifi...
15
15
19
3
14
2
2
0.21
0
6
1
0
14
1
14
14
299
60
197
76
153
42
162
47
147
5
0
2
33
323,607
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/schema_registry_common.py
schema_registry_common.BaseRegistryManager
import aiohttp from datetime import datetime import time from typing import Any, Dict, List, Optional, Union class BaseRegistryManager: """Base class for managing Schema Registry instances.""" def __init__(self): self.registries: Dict[str, RegistryClient] = {} self.default_registry: Optional[s...
class BaseRegistryManager: '''Base class for managing Schema Registry instances.''' def __init__(self): pass def get_registry(self, name: Optional[str]=None) -> Optional[RegistryClient]: '''Get a registry client by name, or default if name is None.''' pass def list_registries...
13
12
13
1
11
1
2
0.13
0
11
2
3
12
3
12
12
167
23
127
40
113
17
83
33
69
5
0
5
27
323,608
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/schema_registry_common.py
schema_registry_common.LegacyRegistryManager
import json import logging class LegacyRegistryManager(BaseRegistryManager): """Manager that supports legacy JSON configuration mode.""" def __init__(self, registries_config: str=''): super().__init__() self.registries_config = registries_config self._load_registries() def _load_r...
class LegacyRegistryManager(BaseRegistryManager): '''Manager that supports legacy JSON configuration mode.''' def __init__(self, registries_config: str=''): pass def _load_registries(self): '''Load registry configurations from environment variables and JSON config.''' pass
3
2
33
3
27
3
5
0.13
1
7
2
0
2
2
2
14
69
8
54
11
50
7
33
10
29
9
1
5
10
323,609
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/schema_registry_common.py
schema_registry_common.MigrationTask
from dataclasses import asdict, dataclass from typing import Any, Dict, List, Optional, Union @dataclass class MigrationTask: """Represents a migration task.""" id: str source_registry: str target_registry: str scope: str status: str created_at: str completed_at: Optional[str] = None ...
@dataclass class MigrationTask: '''Represents a migration task.''' pass
2
1
0
0
0
0
0
0.09
0
0
0
0
0
0
0
0
13
1
11
5
10
1
11
5
10
0
0
0
0
323,610
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/schema_registry_common.py
schema_registry_common.MultiRegistryManager
import logging import os class MultiRegistryManager(BaseRegistryManager): """Manager for multi-registry mode.""" def __init__(self, max_registries: int=8): super().__init__() self.max_registries = max_registries self._load_multi_registries() def _load_multi_registries(self): ...
class MultiRegistryManager(BaseRegistryManager): '''Manager for multi-registry mode.''' def __init__(self, max_registries: int=8): pass def _load_multi_registries(self): '''Load multi-registry configurations from environment variables.''' pass
3
2
44
6
35
4
5
0.11
1
7
2
0
2
2
2
14
92
14
71
21
67
8
45
20
41
9
1
4
10
323,611
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/schema_registry_common.py
schema_registry_common.RegistryClient
from requests.auth import HTTPBasicAuth import json from urllib.parse import quote, urlparse import requests import logging from typing import Any, Dict, List, Optional, Union import os import base64 import urllib3 class RegistryClient: """Client for interacting with a single Schema Registry instance.""" def ...
class RegistryClient: '''Client for interacting with a single Schema Registry instance.''' def __init__(self, config: RegistryConfig): pass def _create_secure_session(self) -> requests.Session: '''Create a secure requests session with proper SSL/TLS configuration.''' pass def...
31
28
14
1
12
2
2
0.14
0
11
2
0
28
5
28
28
418
43
331
124
288
47
237
95
208
4
0
2
59
323,612
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/schema_registry_common.py
schema_registry_common.RegistryConfig
from typing import Any, Dict, List, Optional, Union from dataclasses import asdict, dataclass @dataclass class RegistryConfig: """Configuration for a Schema Registry instance.""" name: str url: str user: str = '' password: str = '' description: str = '' viewonly: bool = False def to_di...
@dataclass class RegistryConfig: '''Configuration for a Schema Registry instance.''' def to_dict(self) -> Dict[str, Any]: '''Convert to dictionary with sensitive data masked.''' pass def __repr__(self) -> str: '''Safe representation without credentials.''' pass def __s...
5
4
5
0
4
1
2
0.22
0
2
0
0
3
0
3
3
26
4
18
11
14
4
18
11
14
2
0
1
6
323,613
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/schema_registry_common.py
schema_registry_common.SecureHTTPAdapter
import ssl from requests.adapters import HTTPAdapter class SecureHTTPAdapter(HTTPAdapter): """Custom HTTP adapter with enhanced SSL/TLS security.""" def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def init_poolmanager(self, *args, **kwargs): """Initialize the pool m...
class SecureHTTPAdapter(HTTPAdapter): '''Custom HTTP adapter with enhanced SSL/TLS security.''' def __init__(self, *args, **kwargs): pass def init_poolmanager(self, *args, **kwargs): '''Initialize the pool manager with secure SSL context.''' pass
3
2
8
2
5
2
1
0.36
1
2
0
0
2
0
2
20
20
5
11
4
8
4
11
4
8
1
2
0
2
323,614
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/schema_registry_common.py
schema_registry_common.SensitiveDataFilter
import logging import re class SensitiveDataFilter(logging.Filter): """Filter to mask sensitive data in log messages.""" def filter(self, record): """Mask Authorization headers and other sensitive data in log messages.""" if hasattr(record, 'msg') and record.msg: msg = str(record.m...
class SensitiveDataFilter(logging.Filter): '''Filter to mask sensitive data in log messages.''' def filter(self, record): '''Mask Authorization headers and other sensitive data in log messages.''' pass
2
2
30
5
19
6
2
0.35
1
1
0
0
1
0
1
3
33
6
20
3
18
7
10
3
8
2
2
1
2
323,615
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/schema_registry_common.py
schema_registry_common.SingleRegistryManager
import logging class SingleRegistryManager(BaseRegistryManager): """Manager for single registry mode (backward compatibility).""" def __init__(self): super().__init__() self._load_single_registry() def _load_single_registry(self): """Load single registry configuration.""" ...
class SingleRegistryManager(BaseRegistryManager): '''Manager for single registry mode (backward compatibility).''' def __init__(self): pass def _load_single_registry(self): '''Load single registry configuration.''' pass
3
2
10
0
10
1
2
0.1
1
4
2
0
2
1
2
14
24
2
20
6
17
2
13
5
10
3
1
2
4
323,616
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/schema_validation.py
schema_validation.SchemaValidationError
from typing import Any, Callable, Dict, Optional, Union class SchemaValidationError(Exception): """Custom exception for schema validation errors.""" def __init__(self, message: str, validation_error: Optional[Exception]=None, data: Optional[Any]=None): super().__init__(message) self.validation...
class SchemaValidationError(Exception): '''Custom exception for schema validation errors.''' def __init__(self, message: str, validation_error: Optional[Exception]=None, data: Optional[Any]=None): pass
2
1
9
0
9
0
1
0.1
1
3
0
0
1
2
1
11
12
1
10
9
3
1
5
4
3
1
3
0
1
323,617
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/schema_validation.py
schema_validation.ValidationResult
from typing import Any, Callable, Dict, Optional, Union import warnings class ValidationResult: """Container for validation results.""" def __init__(self, is_valid: bool, data: Any, errors: Optional[list]=None, warnings: Optional[list]=None): self.is_valid = is_valid self.data = data s...
class ValidationResult: '''Container for validation results.''' def __init__(self, is_valid: bool, data: Any, errors: Optional[list]=None, warnings: Optional[list]=None): pass def add_warning(self, message: str): '''Add a validation warning.''' pass def to_dict(self) -> Dict[...
4
3
7
0
7
1
1
0.14
0
4
0
0
3
4
3
3
27
3
21
14
11
3
10
8
6
1
0
0
3
323,618
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/smart_defaults.py
smart_defaults.FieldSuggestion
from dataclasses import dataclass, field from typing import Any, Dict, List, Optional, Set @dataclass class FieldSuggestion: """Represents a field suggestion with metadata""" name: str type: str default_value: Optional[Any] = None confidence: float = 0.0 source: str = 'pattern' metadata: Di...
@dataclass class FieldSuggestion: '''Represents a field suggestion with metadata''' pass
2
1
0
0
0
0
0
0.29
0
0
0
0
0
0
0
0
9
1
7
5
6
2
7
5
6
0
0
0
0
323,619
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/smart_defaults.py
smart_defaults.LearningEngine
import json from datetime import datetime, timedelta, timezone from dataclasses import dataclass, field from pathlib import Path from typing import Any, Dict, List, Optional, Set from collections import Counter, defaultdict class LearningEngine: """Learns from user interactions and feedback""" def __init__(se...
class LearningEngine: '''Learns from user interactions and feedback''' def __init__(self, storage_path: Optional[Path]=None): pass def record_choice(self, operation: str, context: str, field: str, value: Any, accepted: bool=True): '''Record a user's choice for future learning''' p...
7
6
16
2
12
2
2
0.15
0
13
1
0
6
4
6
6
102
18
73
31
66
11
54
27
47
3
0
3
12
323,620
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/smart_defaults.py
smart_defaults.PatternAnalyzer
import re from dataclasses import dataclass, field from datetime import datetime, timedelta, timezone from collections import Counter, defaultdict from typing import Any, Dict, List, Optional, Set class PatternAnalyzer: """Analyzes schemas and operations to detect patterns""" def __init__(self): self....
class PatternAnalyzer: '''Analyzes schemas and operations to detect patterns''' def __init__(self): pass def analyze_naming_convention(self, subjects: List[str], context: Optional[str]=None) -> Dict[str, PatternMatch]: '''Analyze naming patterns in subject names''' pass def _...
6
5
29
3
23
4
7
0.18
0
10
2
0
5
4
5
5
153
22
114
42
106
20
70
40
64
13
0
4
34
323,621
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/smart_defaults.py
smart_defaults.PatternMatch
from datetime import datetime, timedelta, timezone from typing import Any, Dict, List, Optional, Set from dataclasses import dataclass, field @dataclass class PatternMatch: """Represents a detected pattern with confidence score""" pattern: str confidence: float occurrences: int last_seen: datetime ...
@dataclass class PatternMatch: '''Represents a detected pattern with confidence score''' pass
2
1
0
0
0
0
0
0.17
0
0
0
0
0
0
0
0
8
1
6
2
5
1
6
2
5
0
0
0
0
323,622
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/smart_defaults.py
smart_defaults.SmartDefault
from dataclasses import dataclass, field from typing import Any, Dict, List, Optional, Set @dataclass class SmartDefault: """Container for smart default values""" field: str value: Any confidence: float source: str reasoning: Optional[str] = None
@dataclass class SmartDefault: '''Container for smart default values''' pass
2
1
0
0
0
0
0
0.17
0
0
0
0
0
0
0
0
8
1
6
2
5
1
6
2
5
0
0
0
0
323,623
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/smart_defaults.py
smart_defaults.SmartDefaultsEngine
from dataclasses import dataclass, field import json from typing import Any, Dict, List, Optional, Set from datetime import datetime, timedelta, timezone from schema_registry_common import BaseRegistryManager from functools import lru_cache class SmartDefaultsEngine: """Main engine for generating smart defaults"""...
class SmartDefaultsEngine: '''Main engine for generating smart defaults''' def __init__(self, registry_manager: Optional[BaseRegistryManager]=None): pass async def suggest_defaults(self, operation: str, context: Optional[str]=None, existing_data: Optional[Dict[str, Any]]=None) -> Dict[str, SmartD...
11
9
33
3
26
4
4
0.17
0
12
5
0
9
6
9
9
312
40
235
52
222
39
100
48
90
10
0
6
37
323,624
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/smart_defaults_config.py
smart_defaults_config.SmartDefaultsConfig
from pathlib import Path import os from dataclasses import dataclass, field from typing import Any, Dict, List, Optional import json @dataclass class SmartDefaultsConfig: """Configuration for Smart Defaults system""" enabled: bool = False enable_pattern_recognition: bool = True enable_learning: bool = ...
@dataclass class SmartDefaultsConfig: '''Configuration for Smart Defaults system''' @classmethod def from_env(cls) -> 'SmartDefaultsConfig': '''Create configuration from environment variables''' pass @classmethod def from_file(cls, config_path: Path) -> 'SmartDefaultsConfig': ...
11
8
28
6
19
3
7
0.29
0
7
0
0
5
0
7
7
259
56
169
49
159
49
131
43
123
19
0
2
46
323,625
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/smart_defaults_integration.py
smart_defaults_integration.EnhancedElicitationField
from dataclasses import dataclass from elicitation import ElicitationField, ElicitationRequest, ElicitationResponse, create_context_metadata_elicitation, create_export_preferences_elicitation, create_migration_preferences_elicitation, create_schema_field_elicitation from typing import Any, Dict, List, Optional @datacl...
@dataclass class EnhancedElicitationField(ElicitationField): '''Extended ElicitationField with smart default support''' pass
2
1
0
0
0
0
0
0.17
1
0
0
0
0
0
0
0
8
1
6
6
5
1
6
6
5
0
1
0
0
323,626
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/smart_defaults_integration.py
smart_defaults_integration.SmartDefaultsElicitationEnhancer
from schema_registry_common import BaseRegistryManager from smart_defaults import FieldSuggestion, SmartDefault, get_smart_defaults_engine from elicitation import ElicitationField, ElicitationRequest, ElicitationResponse, create_context_metadata_elicitation, create_export_preferences_elicitation, create_migration_prefe...
class SmartDefaultsElicitationEnhancer: '''Enhances elicitation requests with smart defaults''' def __init__(self, registry_manager: Optional[BaseRegistryManager]=None): pass async def enhance_elicitation_request(self, request: ElicitationRequest, operation: str, context: Optional[str]=None, exis...
8
7
26
3
19
4
4
0.2
0
10
7
0
7
2
7
7
191
31
135
39
115
27
71
27
63
6
0
3
25
323,627
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/task_management.py
task_management.AsyncPattern
from enum import Enum class AsyncPattern(Enum): DIRECT = 'direct' TASK_QUEUE = 'task_queue'
class AsyncPattern(Enum): pass
1
0
0
0
0
0
0
0.67
1
0
0
0
0
0
0
49
3
0
3
3
2
2
3
3
2
0
4
0
0
323,628
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/task_management.py
task_management.AsyncTask
import asyncio from dataclasses import dataclass from typing import Any, Callable, Dict, List, Optional @dataclass class AsyncTask: """Represents an async task in the queue.""" id: str type: TaskType status: TaskStatus created_at: str started_at: Optional[str] = None completed_at: Optional[...
@dataclass class AsyncTask: '''Represents an async task in the queue.''' def to_dict(self) -> Dict[str, Any]: '''Convert task to dictionary, excluding internal fields.''' pass
3
2
14
0
13
1
1
0.08
0
2
0
0
1
0
1
1
30
2
26
10
24
2
15
10
13
1
0
0
1
323,629
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/task_management.py
task_management.AsyncTaskManager
from typing import Any, Callable, Dict, List, Optional import inspect from datetime import datetime, timezone from concurrent.futures import ThreadPoolExecutor import asyncio import uuid import threading class AsyncTaskManager: """Manages async tasks and their execution.""" def __init__(self): self.ta...
class AsyncTaskManager: '''Manages async tasks and their execution.''' def __init__(self): pass def create_task(self, task_type: TaskType, metadata: Optional[Dict[str, Any]]=None) -> AsyncTask: '''Create a new async task.''' pass async def execute_task(self, task: AsyncTask, ...
11
9
17
2
13
2
4
0.17
0
12
3
0
9
4
9
9
167
26
121
27
110
21
114
25
103
7
0
4
36
323,630
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/task_management.py
task_management.OperationDuration
from enum import Enum class OperationDuration(Enum): QUICK = 'quick' MEDIUM = 'medium' LONG = 'long'
class OperationDuration(Enum): pass
1
0
0
0
0
0
0
0.75
1
0
0
0
0
0
0
49
4
0
4
4
3
3
4
4
3
0
4
0
0
323,631
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/task_management.py
task_management.TaskStatus
from enum import Enum class TaskStatus(Enum): PENDING = 'pending' RUNNING = 'running' COMPLETED = 'completed' FAILED = 'failed' CANCELLED = 'cancelled'
class TaskStatus(Enum): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
49
6
0
6
6
5
0
6
6
5
0
4
0
0
323,632
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/task_management.py
task_management.TaskType
from enum import Enum class TaskType(Enum): MIGRATION = 'migration' SYNC = 'sync' CLEANUP = 'cleanup' EXPORT = 'export' IMPORT = 'import' STATISTICS = 'statistics'
class TaskType(Enum): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
49
7
0
7
7
6
0
7
7
6
0
4
0
0
323,633
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/task_management_enhanced.py
task_management_enhanced.EnhancedAsyncTask
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, cast from dataclasses import dataclass, field from task_management import TaskStatus, TaskType import asyncio @dataclass class EnhancedAsyncTask: """Enhanced async task with MCP Context support.""" id: str type: TaskType status: Tas...
@dataclass class EnhancedAsyncTask: '''Enhanced async task with MCP Context support.''' def to_dict(self) -> Dict[str, Any]: '''Convert task to dictionary, excluding internal fields.''' pass
3
2
14
0
13
1
1
0.07
0
2
0
0
1
0
1
1
33
2
29
13
27
2
18
13
16
1
0
0
1
323,634
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/task_management_enhanced.py
task_management_enhanced.EnhancedAsyncTaskManager
import asyncio from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, cast from concurrent.futures import ThreadPoolExecutor import inspect import threading from datetime import datetime, timezone import uuid from task_management import TaskStatus, TaskType class EnhancedAsyncTaskManager: """Enhanc...
class EnhancedAsyncTaskManager: '''Enhanced async task manager with MCP Context integration.''' def __init__(self): pass def create_task(self, task_type: TaskType, metadata: Optional[Dict[str, Any]]=None, context: Optional['Context']=None) -> EnhancedAsyncTask: '''Create a new async task ...
14
12
21
3
16
2
5
0.16
0
13
3
0
12
4
12
12
273
46
197
42
179
31
170
34
156
10
0
4
62
323,635
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/task_management_enhanced.py
task_management_enhanced.ProgressReporter
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, cast class ProgressReporter: """ Helper class for reporting progress from within task functions. Usage: ```python async def my_task_function(data, context: Context, task_id: str): reporter = ProgressReporter(task_id, co...
class ProgressReporter: ''' Helper class for reporting progress from within task functions. Usage: ```python async def my_task_function(data, context: Context, task_id: str): reporter = ProgressReporter(task_id, context) # Report progress await reporter.update(25.0, "Process...
9
5
4
0
4
1
1
0.7
0
4
1
0
3
3
3
3
57
11
27
19
18
19
27
19
18
2
0
1
9
323,636
aywengo/kafka-schema-reg-mcp
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/aywengo_kafka-schema-reg-mcp/workflow_mcp_integration.py
workflow_mcp_integration.WorkflowMCPTools
from typing import Any, Dict, List, Optional from elicitation import ElicitationManager, ElicitationResponse import json from multi_step_elicitation import MultiStepElicitationManager from workflow_definitions import get_all_workflows, get_workflow_by_id from fastmcp import FastMCP class WorkflowMCPTools: """MCP t...
class WorkflowMCPTools: '''MCP tools for managing multi-step workflows.''' def __init__(self, mcp: FastMCP, elicitation_manager: ElicitationManager): pass def _register_tools(self): '''Register MCP tools for workflow management.''' pass @self.mcp.tool(description='Start a ...
21
11
53
4
46
3
3
0.07
0
6
2
0
2
3
2
2
315
31
266
63
236
18
102
40
90
7
0
3
37
323,637
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/domain/charge_discharge_settings.py
charge_discharge_settings.ChargeDischargeSettings
from abc import ABC, abstractmethod class ChargeDischargeSettings(ABC): @staticmethod def create(value: str | None) -> 'ChargeDischargeSettings | None': if value is None: return None fields = value.split(',') fields_length = len(fields) if fields_length == 18: ...
class ChargeDischargeSettings(ABC): @staticmethod def create(value: str | None) -> 'ChargeDischargeSettings | None': pass @abstractmethod def get_charge_current(self, slot_index: int) -> float | None: pass @abstractmethod def get_discharge_current(self, slot_index: int) -> floa...
27
0
3
0
3
0
1
0
1
7
2
2
9
0
13
33
63
14
49
29
22
0
34
16
20
4
4
1
17
323,638
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/domain/charge_discharge_settings.py
charge_discharge_settings.ChargeDischargeSettingsVariant1
from custom_components.solis_cloud_control.utils.safe_converters import safe_get_float_value class ChargeDischargeSettingsVariant1(ChargeDischargeSettings): def __init__(self, fields: list[str]) -> None: self._fields = fields def get_charge_current(self, slot_index: int) -> float | None: base...
class ChargeDischargeSettingsVariant1(ChargeDischargeSettings): def __init__(self, fields: list[str]) -> None: pass def get_charge_current(self, slot_index: int) -> float | None: pass def get_discharge_current(self, slot_index: int) -> float | None: pass def get_charge_time_...
11
0
4
0
4
0
1
0
1
4
0
0
10
1
10
43
50
13
37
26
26
0
37
26
26
1
5
0
10
323,639
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/domain/charge_discharge_settings.py
charge_discharge_settings.ChargeDischargeSettingsVariant2
from custom_components.solis_cloud_control.utils.safe_converters import safe_get_float_value class ChargeDischargeSettingsVariant2(ChargeDischargeSettings): def __init__(self, fields: list[str]) -> None: self._fields = fields def get_charge_current(self, slot_index: int) -> float | None: base...
class ChargeDischargeSettingsVariant2(ChargeDischargeSettings): def __init__(self, fields: list[str]) -> None: pass def get_charge_current(self, slot_index: int) -> float | None: pass def get_discharge_current(self, slot_index: int) -> float | None: pass def get_charge_time_...
11
0
4
0
3
0
1
0
1
4
0
0
10
1
10
43
46
11
35
22
24
0
35
22
24
2
5
1
12
323,640
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.Inverter
from dataclasses import dataclass, field @dataclass(frozen=True) class Inverter: info: InverterInfo on_off: InverterOnOff | None = None storage_mode: InverterStorageMode | None = None charge_discharge_settings: InverterChargeDischargeSettings | None = None charge_discharge_slots: InverterChargeDisc...
@dataclass(frozen=True) class Inverter: @property def read_batch_cids(self) -> list[int]: pass @property def read_cids(self) -> list[int]: pass @property def all_cids(self) -> list[int]: pass
8
0
14
1
13
0
6
0
0
2
0
0
3
0
3
3
66
7
59
24
52
0
56
21
52
15
0
1
18
323,641
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.InverterAllowExport
from dataclasses import dataclass, field @dataclass(frozen=True) class InverterAllowExport: cid: int = 6962 on_value: str = '80' off_value: str = '88'
@dataclass(frozen=True) class InverterAllowExport: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
4
0
4
4
3
0
4
4
3
0
0
0
0
323,642
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.InverterBatteryForceChargeSOC
from dataclasses import dataclass, field @dataclass(frozen=True) class InverterBatteryForceChargeSOC: cid: int = 160
@dataclass(frozen=True) class InverterBatteryForceChargeSOC: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
2
2
1
0
2
2
1
0
0
0
0
323,643
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.InverterBatteryMaxChargeCurrent
from dataclasses import dataclass, field @dataclass(frozen=True) class InverterBatteryMaxChargeCurrent: cid: int = 7224 parallel_battery_count: int = InverterInfo.PARALLEL_BATTERY_COUNT_DEFAULT
@dataclass(frozen=True) class InverterBatteryMaxChargeCurrent: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
0
3
3
2
0
3
3
2
0
0
0
0
323,644
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.InverterBatteryMaxChargeSOC
from dataclasses import dataclass, field @dataclass(frozen=True) class InverterBatteryMaxChargeSOC: cid: int = 7963
@dataclass(frozen=True) class InverterBatteryMaxChargeSOC: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
2
2
1
0
2
2
1
0
0
0
0
323,645
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.InverterBatteryMaxDischargeCurrent
from dataclasses import dataclass, field @dataclass(frozen=True) class InverterBatteryMaxDischargeCurrent: cid: int = 7226 parallel_battery_count: int = InverterInfo.PARALLEL_BATTERY_COUNT_DEFAULT
@dataclass(frozen=True) class InverterBatteryMaxDischargeCurrent: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
0
3
3
2
0
3
3
2
0
0
0
0
323,646
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.InverterBatteryOverDischargeSOC
from dataclasses import dataclass, field @dataclass(frozen=True) class InverterBatteryOverDischargeSOC: cid: int = 158
@dataclass(frozen=True) class InverterBatteryOverDischargeSOC: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
2
2
1
0
2
2
1
0
0
0
0
323,647
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.InverterBatteryRecoverySOC
from dataclasses import dataclass, field @dataclass(frozen=True) class InverterBatteryRecoverySOC: cid: int = 7229
@dataclass(frozen=True) class InverterBatteryRecoverySOC: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
2
2
1
0
2
2
1
0
0
0
0
323,648
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.InverterBatteryReserveSOC
from dataclasses import dataclass, field @dataclass(frozen=True) class InverterBatteryReserveSOC: cid: int = 157
@dataclass(frozen=True) class InverterBatteryReserveSOC: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
2
2
1
0
2
2
1
0
0
0
0
323,649
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.InverterChargeDischargeSettings
from typing import ClassVar from dataclasses import dataclass, field @dataclass(frozen=True) class InverterChargeDischargeSettings: SLOTS_COUNT: ClassVar[int] = 3 cid: int = 103 current_min_value: float = 0 current_max_value: float = 1000 current_step: float = 1
@dataclass(frozen=True) class InverterChargeDischargeSettings: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
7
1
6
6
5
0
6
6
5
0
0
0
0
323,650
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.InverterChargeDischargeSlot
from dataclasses import dataclass, field @dataclass(frozen=True) class InverterChargeDischargeSlot: switch_cid: int time_cid: int current_cid: int soc_cid: int current_min_value: float = 0 current_max_value: float = 1000 current_step: float = 1 soc_min_value: float = 0 soc_max_value...
@dataclass(frozen=True) class InverterChargeDischargeSlot: @property def all_cids(self) -> list[int]: pass
4
0
7
0
7
0
1
0
0
2
0
0
1
0
1
1
20
1
19
9
16
0
13
8
11
1
0
0
1
323,651
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.InverterChargeDischargeSlots
from dataclasses import dataclass, field from typing import ClassVar @dataclass(frozen=True) class InverterChargeDischargeSlots: SLOTS_COUNT: ClassVar[int] = 6 charge_slot1: InverterChargeDischargeSlot = field(default_factory=lambda: InverterChargeDischargeSlot(switch_cid=5916, time_cid=5946, current_cid=5948,...
@dataclass(frozen=True) class InverterChargeDischargeSlots: @property def all_cids(self) -> list[int]: pass def get_charge_slot(self, slot_number: int) -> InverterChargeDischargeSlot | None: pass def get_discharge_slot(self, slot_number: int) -> InverterChargeDischargeSlot | None: ...
6
0
16
0
16
0
5
0
0
3
1
0
3
0
3
3
169
10
159
32
154
0
49
31
45
7
0
1
16
323,652
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.InverterInfo
from dataclasses import dataclass, field from typing import ClassVar from custom_components.solis_cloud_control.utils.safe_converters import safe_convert_power_to_watts, safe_get_float_value @dataclass(frozen=True) class InverterInfo: ENERGY_STORAGE_CONTROL_DISABLED: ClassVar[str] = '0' TOU_V2_MODE: ClassVar[s...
@dataclass(frozen=True) class InverterInfo: @property def is_string_inverter(self) -> bool: pass @property def is_tou_v2_enabled(self) -> bool: pass @property def max_export_power(self) -> float: pass @property def max_export_power_scale(self) -> float: p...
14
0
5
0
5
0
2
0.02
0
3
0
0
6
0
6
6
65
7
58
25
45
1
45
19
38
2
0
1
10
323,653
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.InverterMaxExportPower
from dataclasses import dataclass, field @dataclass(frozen=True) class InverterMaxExportPower: cid: int = 499 min_value: float = 0 max_value: float = InverterInfo.MAX_EXPORT_POWER_DEFAULT step: float = InverterInfo.MAX_EXPORT_POWER_STEP_DEFAULT scale: float = InverterInfo.MAX_EXPORT_POWER_SCALE_DEF...
@dataclass(frozen=True) class InverterMaxExportPower: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
6
0
6
6
5
0
6
6
5
0
0
0
0
323,654
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.InverterMaxOutputPower
from dataclasses import dataclass, field @dataclass(frozen=True) class InverterMaxOutputPower: cid: int = 376
@dataclass(frozen=True) class InverterMaxOutputPower: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
2
2
1
0
2
2
1
0
0
0
0
323,655
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.InverterOnOff
from dataclasses import dataclass, field @dataclass(frozen=True) class InverterOnOff: on_cid: int = 52 off_cid: int = 54 on_value: str = '190' off_value: str = '222' def is_valid_value(self, value: str | None) -> bool: return value in (self.on_value, self.off_value)
@dataclass(frozen=True) class InverterOnOff: def is_valid_value(self, value: str | None) -> bool: pass
3
0
2
0
2
0
1
0
0
2
0
0
1
0
1
1
8
1
7
6
5
0
7
6
5
1
0
0
1
323,656
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.InverterPowerLimit
from dataclasses import dataclass, field @dataclass(frozen=True) class InverterPowerLimit: cid: int = 15 min_value: float = 0 max_value: float = InverterInfo.POWER_LIMIT_DEFAULT
@dataclass(frozen=True) class InverterPowerLimit: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
4
0
4
4
3
0
4
4
3
0
0
0
0
323,657
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/inverters/inverter.py
inverter.InverterStorageMode
from dataclasses import dataclass, field @dataclass(frozen=True) class InverterStorageMode: cid: int = 636
@dataclass(frozen=True) class InverterStorageMode: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
2
2
1
0
2
2
1
0
0
0
0
323,658
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/api/solis_api.py
solis_api.SolisCloudControlApiClient
import aiohttp from custom_components.solis_cloud_control.api.solis_api_utils import current_date, digest, format_date, sign_authorization import json import asyncio class SolisCloudControlApiClient: _READ_ENDPOINT = '/v2/api/atRead' _READ_BATCH_ENDPOINT = '/v2/api/atReadBatch' _CONTROL_ENDPOINT = '/v2/api...
class SolisCloudControlApiClient: def __init__(self, base_url: str, api_key: str, api_token: str, session: aiohttp.ClientSession, timeout: int=_TIMEOUT_SECONDS, concurrent_requests: int=_CONCURRENT_REQUESTS) -> None: pass async def read(self, inverter_sn: str, cid: int, retry_count: int=_RETRY_COUNT,...
14
0
21
5
16
0
3
0.01
0
10
1
0
8
6
8
8
217
49
168
100
116
1
124
59
110
8
0
5
38
323,659
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/api/solis_api.py
solis_api.SolisCloudControlApiError
class SolisCloudControlApiError(Exception): def __init__(self, message: str, status_code: int | None=None, response_code: str | None=None) -> None: self.status_code = status_code self.response_code = response_code final_message = message if status_code is not None: final...
class SolisCloudControlApiError(Exception): def __init__(self, message: str, status_code: int | None=None, response_code: str | None=None) -> None: pass
2
0
15
1
14
0
3
0
1
3
0
0
1
2
1
11
16
1
15
10
8
0
10
5
8
3
3
1
3
323,660
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/config_flow.py
solis_cloud_control.config_flow.SolisCloudControlFlowHandler
from homeassistant.const import CONF_API_KEY, CONF_API_TOKEN from typing import Any from custom_components.solis_cloud_control.const import API_BASE_URL, CONF_INVERTER_SN, DOMAIN from homeassistant.helpers import aiohttp_client from homeassistant.config_entries import ConfigFlow, ConfigFlowResult from custom_components...
class SolisCloudControlFlowHandler(ConfigFlow, domain=DOMAIN): def __init__(self) -> None: pass async def async_step_user(self, user_input: dict[str, Any] | None=None) -> ConfigFlowResult: pass async def async_step_select_inverter(self, user_input: dict[str, Any] | None=None) -> ConfigFl...
5
0
20
3
18
0
3
0
2
7
2
0
4
3
4
4
87
15
72
19
67
0
44
18
39
8
1
4
12
323,661
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/coordinator.py
solis_cloud_control.coordinator.SolisCloudControlCoordinator
import asyncio from homeassistant.core import HomeAssistant from custom_components.solis_cloud_control.inverters.inverter import Inverter from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed from homeassistant.config_entries import ConfigEntry from homeassistant.exceptions import Hom...
class SolisCloudControlCoordinator(DataUpdateCoordinator[SolisCloudControlData]): def __init__(self, hass: HomeAssistant, config_entry: ConfigEntry, api_client: SolisCloudControlApiClient, inverter: Inverter) -> None: pass async def _async_update_data(self) -> SolisCloudControlData: pass ...
5
0
20
2
18
0
2
0
1
8
4
0
4
2
4
4
83
9
74
34
51
0
34
15
29
4
1
2
9
323,662
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/coordinator.py
solis_cloud_control.coordinator.SolisCloudControlData
class SolisCloudControlData(dict[int, str | None]): pass
class SolisCloudControlData(dict[int, str | None]): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
27
2
0
2
1
1
0
2
1
1
0
2
0
0
323,663
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/data.py
solis_cloud_control.data.SolisCloudControlConfigEntry
from homeassistant.config_entries import ConfigEntry class SolisCloudControlConfigEntry(ConfigEntry[SolisCloudControlData]): pass
class SolisCloudControlConfigEntry(ConfigEntry[SolisCloudControlData]): pass
1
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,664
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/data.py
solis_cloud_control.data.SolisCloudControlData
from custom_components.solis_cloud_control.inverters.inverter import Inverter from dataclasses import dataclass from custom_components.solis_cloud_control.coordinator import SolisCloudControlCoordinator @dataclass class SolisCloudControlData: inverter: Inverter coordinator: SolisCloudControlCoordinator
@dataclass class SolisCloudControlData: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
0
3
1
2
0
3
1
2
0
0
0
0
323,665
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/entity.py
solis_cloud_control.entity.SolisCloudControlEntity
from homeassistant.helpers.entity import EntityDescription from custom_components.solis_cloud_control.coordinator import SolisCloudControlCoordinator from homeassistant.helpers.update_coordinator import CoordinatorEntity from homeassistant.helpers.device_registry import DeviceInfo from custom_components.solis_cloud_con...
class SolisCloudControlEntity(CoordinatorEntity[SolisCloudControlCoordinator]): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: EntityDescription, cids: int | list[int]) -> None: pass @property def available(self) -> bool: pass
4
0
17
2
15
0
3
0
1
5
1
18
2
5
2
2
36
5
31
15
22
0
17
9
14
4
1
2
6
323,666
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/number.py
solis_cloud_control.number.BatteryCurrentV1
from custom_components.solis_cloud_control.inverters.inverter import InverterBatteryForceChargeSOC, InverterBatteryMaxChargeCurrent, InverterBatteryMaxChargeSOC, InverterBatteryMaxDischargeCurrent, InverterBatteryOverDischargeSOC, InverterBatteryRecoverySOC, InverterBatteryReserveSOC, InverterChargeDischargeSettings, I...
class BatteryCurrentV1(SolisCloudControlEntity, NumberEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: NumberEntityDescription, inverter_charge_discharge_settings: InverterChargeDischargeSettings, inverter_battery_max_charge_discharge_current: InverterBatteryMaxChargeCurr...
7
0
16
2
14
0
3
0
2
8
5
0
4
8
4
6
70
12
58
34
41
0
41
22
36
3
2
1
10
323,667
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/number.py
solis_cloud_control.number.BatteryCurrentV2
from custom_components.solis_cloud_control.inverters.inverter import InverterBatteryForceChargeSOC, InverterBatteryMaxChargeCurrent, InverterBatteryMaxChargeSOC, InverterBatteryMaxDischargeCurrent, InverterBatteryOverDischargeSOC, InverterBatteryRecoverySOC, InverterBatteryReserveSOC, InverterChargeDischargeSettings, I...
class BatteryCurrentV2(SolisCloudControlEntity, NumberEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: NumberEntityDescription, inverter_charge_discharge_slot: InverterChargeDischargeSlot, inverter_battery_max_charge_discharge_current: InverterBatteryMaxChargeCurrent | In...
7
0
9
1
9
0
2
0
2
8
4
0
4
6
4
6
42
5
37
26
22
0
24
16
19
3
2
1
6
323,668
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/number.py
solis_cloud_control.number.BatterySocNumber
from custom_components.solis_cloud_control.utils.safe_converters import safe_get_float_value from .coordinator import SolisCloudControlCoordinator from homeassistant.components.number import NumberDeviceClass, NumberEntity, NumberEntityDescription from homeassistant.const import PERCENTAGE, UnitOfElectricCurrent, UnitO...
class BatterySocNumber(SolisCloudControlEntity, NumberEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: NumberEntityDescription, inverter_battery_soc: InverterBatteryReserveSOC | InverterBatteryOverDischargeSOC | InverterBatteryForceChargeSOC | InverterBatteryRecoverySOC |...
5
0
8
0
8
0
1
0
2
10
6
0
3
6
3
5
29
3
26
22
12
0
16
12
12
1
2
0
3
323,669
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/number.py
solis_cloud_control.number.BatterySocV2
from custom_components.solis_cloud_control.utils.safe_converters import safe_get_float_value from custom_components.solis_cloud_control.inverters.inverter import InverterBatteryForceChargeSOC, InverterBatteryMaxChargeCurrent, InverterBatteryMaxChargeSOC, InverterBatteryMaxDischargeCurrent, InverterBatteryOverDischargeS...
class BatterySocV2(SolisCloudControlEntity, NumberEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: NumberEntityDescription, inverter_charge_discharge_slot: InverterChargeDischargeSlot, inverter_battery_over_discharge_soc: InverterBatteryOverDischargeSOC | None, inverter_b...
9
0
9
1
8
0
2
0
2
8
4
0
5
6
5
7
52
8
44
28
28
0
32
18
26
3
2
1
9
323,670
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/number.py
solis_cloud_control.number.MaxExportPower
from .coordinator import SolisCloudControlCoordinator from custom_components.solis_cloud_control.inverters.inverter import InverterBatteryForceChargeSOC, InverterBatteryMaxChargeCurrent, InverterBatteryMaxChargeSOC, InverterBatteryMaxDischargeCurrent, InverterBatteryOverDischargeSOC, InverterBatteryRecoverySOC, Inverte...
class MaxExportPower(SolisCloudControlEntity, NumberEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: NumberEntityDescription, inverter_max_export_power: InverterMaxExportPower) -> None: pass @property def native_value(self) -> float | None: pass ...
5
0
7
0
7
0
1
0
2
6
2
0
3
6
3
5
26
3
23
19
13
0
17
13
13
2
2
0
4
323,671
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/number.py
solis_cloud_control.number.MaxOutputPower
from .coordinator import SolisCloudControlCoordinator from custom_components.solis_cloud_control.utils.safe_converters import safe_get_float_value from custom_components.solis_cloud_control.inverters.inverter import InverterBatteryForceChargeSOC, InverterBatteryMaxChargeCurrent, InverterBatteryMaxChargeSOC, InverterBat...
class MaxOutputPower(SolisCloudControlEntity, NumberEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: NumberEntityDescription, inverter_max_output_power: InverterMaxOutputPower) -> None: pass @property def native_value(self) -> float | None: pass ...
5
0
7
0
6
0
1
0
2
6
2
0
3
5
3
5
24
3
21
17
11
0
15
11
11
1
2
0
3
323,672
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/number.py
solis_cloud_control.number.PowerLimit
from .coordinator import SolisCloudControlCoordinator from homeassistant.components.number import NumberDeviceClass, NumberEntity, NumberEntityDescription from homeassistant.const import PERCENTAGE, UnitOfElectricCurrent, UnitOfPower from custom_components.solis_cloud_control.utils.safe_converters import safe_get_float...
class PowerLimit(SolisCloudControlEntity, NumberEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: NumberEntityDescription, inverter_power_limit: InverterPowerLimit) -> None: pass @property def native_value(self) -> float | None: pass async def ...
5
0
7
0
6
0
1
0
2
6
2
0
3
5
3
5
24
3
21
17
11
0
15
11
11
1
2
0
3
323,673
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/select.py
solis_cloud_control.select.StorageModeSelect
from homeassistant.components.select import SelectEntity, SelectEntityDescription from custom_components.solis_cloud_control.inverters.inverter import InverterStorageMode from custom_components.solis_cloud_control.domain.storage_mode import StorageMode from .coordinator import SolisCloudControlCoordinator from .entity ...
class StorageModeSelect(SolisCloudControlEntity, SelectEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: SelectEntityDescription, inverter_storage_mode: InverterStorageMode) -> None: pass @property def current_option(self) -> str | None: pass a...
5
0
16
3
14
0
4
0
2
5
3
0
3
2
3
5
57
11
46
20
36
0
32
14
28
5
2
1
11
323,674
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/sensor.py
solis_cloud_control.sensor.BatteryCurrentSensor
from .entity import SolisCloudControlEntity from homeassistant.components.sensor import SensorEntity, SensorEntityDescription from .coordinator import SolisCloudControlCoordinator from homeassistant.const import PERCENTAGE, UnitOfElectricCurrent from custom_components.solis_cloud_control.utils.safe_converters import sa...
class BatteryCurrentSensor(SolisCloudControlEntity, SensorEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: SensorEntityDescription, inverter_battery_current: InverterBatteryMaxChargeCurrent | InverterBatteryMaxDischargeCurrent) -> None: pass @property def ...
4
0
7
1
6
0
1
0
2
5
3
0
2
2
2
4
16
2
14
12
5
0
8
6
5
1
2
0
2
323,675
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/sensor.py
solis_cloud_control.sensor.BatterySocSensor
from custom_components.solis_cloud_control.inverters.inverter import InverterBatteryForceChargeSOC, InverterBatteryMaxChargeCurrent, InverterBatteryMaxChargeSOC, InverterBatteryMaxDischargeCurrent, InverterBatteryOverDischargeSOC, InverterBatteryRecoverySOC, InverterBatteryReserveSOC from .entity import SolisCloudContr...
class BatterySocSensor(SolisCloudControlEntity, SensorEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: SensorEntityDescription, inverter_battery_soc: InverterBatteryReserveSOC | InverterBatteryOverDischargeSOC | InverterBatteryForceChargeSOC | InverterBatteryRecoverySOC |...
4
0
9
1
8
0
1
0
2
8
6
0
2
2
2
4
20
2
18
16
5
0
8
6
5
1
2
0
2
323,676
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/switch.py
solis_cloud_control.switch.AllowExportSwitch
from homeassistant.components.switch import SwitchEntity, SwitchEntityDescription from .entity import SolisCloudControlEntity from .coordinator import SolisCloudControlCoordinator from custom_components.solis_cloud_control.domain.storage_mode import StorageMode from custom_components.solis_cloud_control.inverters.inver...
class AllowExportSwitch(SolisCloudControlEntity, SwitchEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: SwitchEntityDescription, inverter_allow_export: InverterAllowExport, inverter_storage_mode: InverterStorageMode) -> None: pass @property def is_on(self)...
9
0
8
1
7
0
2
0.04
2
8
4
0
6
2
6
8
57
10
47
23
32
2
38
15
31
3
2
1
13
323,677
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/switch.py
solis_cloud_control.switch.AllowGridChargingSwitch
from custom_components.solis_cloud_control.domain.storage_mode import StorageMode from .coordinator import SolisCloudControlCoordinator from .entity import SolisCloudControlEntity from custom_components.solis_cloud_control.inverters.inverter import InverterAllowExport, InverterChargeDischargeSlot, InverterChargeDischar...
class AllowGridChargingSwitch(SolisCloudControlEntity, SwitchEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: SwitchEntityDescription, inverter_storage_mode: InverterStorageMode) -> None: pass @property def is_on(self) -> bool | None: pass asy...
6
0
11
3
9
1
2
0.05
2
5
3
0
4
1
4
6
50
13
37
20
26
2
31
14
26
2
2
1
7
323,678
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/switch.py
solis_cloud_control.switch.BatteryReserveSwitch
from .coordinator import SolisCloudControlCoordinator from custom_components.solis_cloud_control.inverters.inverter import InverterAllowExport, InverterChargeDischargeSlot, InverterChargeDischargeSlots, InverterOnOff, InverterStorageMode from .entity import SolisCloudControlEntity from homeassistant.components.switch i...
class BatteryReserveSwitch(SolisCloudControlEntity, SwitchEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: SwitchEntityDescription, inverter_storage_mode: InverterStorageMode) -> None: pass @property def is_on(self) -> bool | None: pass async ...
6
0
11
3
9
1
2
0.05
2
5
3
0
4
1
4
6
50
13
37
20
26
2
31
14
26
2
2
1
7
323,679
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/switch.py
solis_cloud_control.switch.OnOffSwitch
from .entity import SolisCloudControlEntity from custom_components.solis_cloud_control.inverters.inverter import InverterAllowExport, InverterChargeDischargeSlot, InverterChargeDischargeSlots, InverterOnOff, InverterStorageMode from homeassistant.components.switch import SwitchEntity, SwitchEntityDescription from .coor...
class OnOffSwitch(SolisCloudControlEntity, SwitchEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: SwitchEntityDescription, inverter_on_off: InverterOnOff) -> None: pass @property def assumed_state(self) -> bool: pass @property def is_on(sel...
8
0
8
1
7
0
2
0.05
2
6
2
0
5
1
5
7
46
9
37
22
24
2
28
15
22
2
2
1
8
323,680
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/switch.py
solis_cloud_control.switch.SlotV2Switch
from .coordinator import SolisCloudControlCoordinator from custom_components.solis_cloud_control.inverters.inverter import InverterAllowExport, InverterChargeDischargeSlot, InverterChargeDischargeSlots, InverterOnOff, InverterStorageMode from .entity import SolisCloudControlEntity from homeassistant.components.switch i...
class SlotV2Switch(SolisCloudControlEntity, SwitchEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: SwitchEntityDescription, inverter_charge_discharge_slot: InverterChargeDischargeSlot, inverter_charge_discharge_slots: InverterChargeDischargeSlots) -> None: pass ...
7
0
9
1
9
0
2
0.04
2
7
3
0
5
2
5
7
53
8
45
23
32
2
25
16
19
3
2
2
8
323,681
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/switch.py
solis_cloud_control.switch.TimeOfUseSwitch
from .entity import SolisCloudControlEntity from custom_components.solis_cloud_control.domain.storage_mode import StorageMode from .coordinator import SolisCloudControlCoordinator from homeassistant.components.switch import SwitchEntity, SwitchEntityDescription from custom_components.solis_cloud_control.inverters.inver...
class TimeOfUseSwitch(SolisCloudControlEntity, SwitchEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: SwitchEntityDescription, inverter_storage_mode: InverterStorageMode) -> None: pass @property def is_on(self) -> bool | None: pass async def a...
6
0
11
3
9
1
2
0.05
2
5
3
0
4
1
4
6
50
13
37
20
26
2
31
14
26
2
2
1
7
323,682
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/text.py
solis_cloud_control.text.TimeSlotV1Text
from .entity import SolisCloudControlEntity from homeassistant.components.text import TextEntity, TextEntityDescription from custom_components.solis_cloud_control.domain.charge_discharge_settings import ChargeDischargeSettings from typing import Literal from custom_components.solis_cloud_control.inverters.inverter impo...
class TimeSlotV1Text(SolisCloudControlEntity, TextEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: TextEntityDescription, inverter_charge_discharge_settings: InverterChargeDischargeSettings, slot_number: int, slot_type: Literal['charge', 'discharge']) -> None: pas...
5
0
16
3
13
0
2
0
2
6
3
0
3
6
3
5
54
11
43
26
31
0
33
18
29
3
2
1
7
323,683
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/text.py
solis_cloud_control.text.TimeSlotV2Text
from homeassistant.components.text import TextEntity, TextEntityDescription from custom_components.solis_cloud_control.inverters.inverter import InverterChargeDischargeSettings, InverterChargeDischargeSlot from .entity import SolisCloudControlEntity from .coordinator import SolisCloudControlCoordinator class TimeSlotV...
class TimeSlotV2Text(SolisCloudControlEntity, TextEntity): def __init__(self, coordinator: SolisCloudControlCoordinator, entity_description: TextEntityDescription, inverter_charge_discharge_slot: InverterChargeDischargeSlot) -> None: pass @property def native_value(self) -> str | None: pas...
5
0
6
0
5
0
1
0
2
4
2
0
3
4
3
5
24
4
20
16
10
0
14
10
10
1
2
0
3
323,684
mkuthan/solis-cloud-control
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/mkuthan_solis-cloud-control/custom_components/solis_cloud_control/domain/storage_mode.py
storage_mode.StorageMode
from custom_components.solis_cloud_control.utils.safe_converters import safe_get_int_value class StorageMode: BIT_SELF_USE: int = 0 BIT_TOU_MODE: int = 1 BIT_OFF_GRID: int = 2 BIT_BACKUP_MODE: int = 4 BIT_GRID_CHARGING: int = 5 BIT_FEED_IN_PRIORITY: int = 6 @staticmethod def create(val...
class StorageMode: @staticmethod def create(value: str | None) -> 'StorageMode | None': pass def __init__(self, mode: int) -> None: pass def is_self_use(self) -> bool: pass def is_feed_in_priority(self) -> bool: pass def is_off_grid(self) -> bool: pa...
20
0
2
0
2
0
1
0
0
3
0
0
17
1
18
18
69
18
51
28
31
0
50
27
31
2
0
0
19
323,685
enoch85/ovms-home-assistant
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/attribute_manager.py
ovms.attribute_manager.AttributeManager
from homeassistant.util import dt as dt_util import json from homeassistant.const import EntityCategory from typing import Dict, Any, Optional, List class AttributeManager: """Manager for entity attributes.""" def __init__(self, config: Dict[str, Any]): """Initialize the attribute manager.""" ...
class AttributeManager: '''Manager for entity attributes.''' def __init__(self, config: Dict[str, Any]): '''Initialize the attribute manager.''' pass def prepare_attributes(self, topic: str, category: str, parts: List[str], metric_info: Optional[Dict]=None) -> Dict[str, Any]: '''P...
6
6
20
2
15
4
5
0.28
0
8
0
0
5
1
5
5
108
14
75
17
68
21
61
14
55
13
0
4
27
323,686
enoch85/ovms-home-assistant
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/config_flow/__init__.py
ovms.config_flow.OVMSConfigFlow
from .topic_discovery import discover_topics, test_topic_availability, extract_vehicle_ids, format_structure_prefix from .mqtt_connection import test_mqtt_connection import hashlib from homeassistant import config_entries from ..const import DOMAIN, CONFIG_VERSION, DEFAULT_QOS, DEFAULT_TOPIC_PREFIX, DEFAULT_TOPIC_STRUC...
class OVMSConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): '''Handle a config flow for OVMS.''' def __init__(self): '''Initialize the OVMS config flow.''' pass def is_matching(self, _user_input): '''Check if a host + vehicle_id combo is unique.''' pass def _ensur...
12
10
44
6
33
5
5
0.15
2
12
1
0
8
3
9
9
410
64
300
45
288
46
162
43
152
11
1
3
41
323,687
enoch85/ovms-home-assistant
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/config_flow/options_flow.py
ovms.config_flow.options_flow.OVMSOptionsFlow
import voluptuous as vol from ..const import CONF_QOS, CONF_TOPIC_PREFIX, CONF_TOPIC_STRUCTURE, CONF_VERIFY_SSL, CONF_PORT, CONF_PROTOCOL, CONF_TOPIC_BLACKLIST, CONF_ENTITY_STALENESS_MANAGEMENT, CONF_DELETE_STALE_HISTORY, DEFAULT_QOS, DEFAULT_TOPIC_PREFIX, DEFAULT_TOPIC_STRUCTURE, DEFAULT_VERIFY_SSL, DEFAULT_USER_TOPIC...
class OVMSOptionsFlow(OptionsFlow): '''Handle OVMS options.''' def __init__(self, config_entry): '''Initialize options flow.''' pass async def async_step_init(self, user_input=None): '''Manage the options.''' pass
3
3
88
9
70
11
11
0.16
1
3
0
0
2
1
2
2
179
19
141
15
138
23
60
15
57
20
1
3
21
323,688
enoch85/ovms-home-assistant
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/device_tracker.py
ovms.device_tracker.OVMSDeviceTracker
import time from homeassistant.helpers.restore_state import RestoreEntity from homeassistant.helpers.entity import DeviceInfo from homeassistant.helpers.entity import async_generate_entity_id from homeassistant.util import dt as dt_util from .const import DOMAIN, LOGGER_NAME, SIGNAL_ADD_ENTITIES, SIGNAL_UPDATE_ENTITY f...
class OVMSDeviceTracker(TrackerEntity, RestoreEntity): '''OVMS Device Tracker Entity.''' def __init__(self, unique_id: str, name: str, topic: str, initial_payload: Any, device_info: DeviceInfo, attributes: Dict[str, Any], hass: Optional[HomeAssistant]=None, friendly_name: Optional[str]=None, naming_service: O...
14
9
48
7
35
7
7
0.21
2
10
2
0
7
16
7
7
312
48
219
63
193
47
147
43
138
25
1
7
57
323,689
enoch85/ovms-home-assistant
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/entity_staleness_manager.py
ovms.entity_staleness_manager.EntityStalenessManager
from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_registry import RegistryEntryHider from homeassistant.helpers import entity_registry as er from homeassistant.helpers.dispatcher import async_dispatcher_send from typing import Dict, Optional, List, Any import asyncio from homeassistant.help...
class EntityStalenessManager: '''Manager for cleaning up stale entities based on Home Assistant's built-in availability.''' def __init__(self, hass: HomeAssistant, config: Dict[str, Any]) -> None: '''Initialize the staleness manager.''' pass def _schedule_cleanup_task(self) -> None: ...
14
14
30
4
22
4
5
0.2
0
6
1
0
11
7
11
11
341
60
243
66
231
49
181
61
169
11
0
5
59
323,690
enoch85/ovms-home-assistant
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/entity_staleness_manager.py
ovms.entity_staleness_manager.OVMSStalenessStatusSensor
from homeassistant.const import EntityCategory from typing import Dict, Optional, List, Any from homeassistant.components.sensor import SensorEntity from homeassistant.helpers.restore_state import RestoreEntity class OVMSStalenessStatusSensor(SensorEntity, RestoreEntity): """Diagnostic sensor showing count of enti...
class OVMSStalenessStatusSensor(SensorEntity, RestoreEntity): '''Diagnostic sensor showing count of entities scheduled for removal.''' def __init__(self, staleness_manager: 'EntityStalenessManager', device_info: Dict[str, Any]) -> None: '''Initialize the sensor.''' pass @property def n...
7
5
6
0
5
1
1
0.28
1
2
0
0
3
9
3
3
25
3
18
16
12
5
16
14
12
1
1
0
3
323,691
enoch85/ovms-home-assistant
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/mqtt/__init__.py
ovms.mqtt.OVMSMQTTClient
from typing import Dict, Any, Optional, Set import asyncio from .update_dispatcher import UpdateDispatcher from .entity_factory import EntityFactory from ..entity_staleness_manager import EntityStalenessManager from homeassistant.helpers.dispatcher import async_dispatcher_connect, async_dispatcher_send from .command_ha...
class OVMSMQTTClient: '''MQTT Client for OVMS Integration.''' def __init__(self, hass: HomeAssistant, config: Dict[str, Any]): '''Initialize the MQTT Client.''' pass async def async_setup(self) -> bool: '''Set up the MQTT client.''' pass async def _async_platforms_loa...
12
11
18
3
11
4
3
0.36
0
16
9
0
10
20
10
10
188
36
114
39
102
41
86
38
75
5
0
2
27
323,692
enoch85/ovms-home-assistant
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/mqtt/command_handler.py
ovms.mqtt.command_handler.CommandHandler
from ..rate_limiter import CommandRateLimiter from ..const import LOGGER_NAME, CONF_QOS, CONF_VEHICLE_ID, DEFAULT_COMMAND_RATE_LIMIT, DEFAULT_COMMAND_RATE_PERIOD, COMMAND_TOPIC_TEMPLATE, RESPONSE_TOPIC_TEMPLATE import time import json import asyncio from homeassistant.core import HomeAssistant from typing import Dict, ...
class CommandHandler: '''Handler for OVMS commands.''' def __init__(self, hass: HomeAssistant, config: Dict[str, Any]): '''Initialize the command handler.''' pass def _format_structure_prefix(self) -> str: '''Format the topic structure prefix based on configuration.''' pas...
7
7
43
5
33
6
6
0.19
0
7
1
0
6
6
6
6
265
35
196
47
182
37
110
35
103
15
0
4
33
323,693
enoch85/ovms-home-assistant
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/mqtt/connection.py
ovms.mqtt.connection.MQTTConnectionManager
import paho.mqtt.client as mqtt from homeassistant.core import HomeAssistant, callback from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT, CONF_USERNAME from ..const import CONF_CLIENT_ID, CONF_MQTT_USERNAME, CONF_QOS, CONF_TOPIC_PREFIX, CONF_TOPIC_STRUCTURE, CONF_VEHICLE_ID, CONF_VERIFY_SSL, DEFAULT_T...
class MQTTConnectionManager: '''Manages MQTT connection for OVMS integration.''' def __init__(self, hass: HomeAssistant, config: Dict[str, Any], message_callback: Callable[[str, str], None], connection_callback: Callable[[bool], None]): '''Initialize the MQTT connection manager.''' pass d...
16
16
31
4
22
5
4
0.23
0
9
0
0
11
11
11
11
424
68
296
72
273
68
210
57
193
8
0
3
57
323,694
enoch85/ovms-home-assistant
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/mqtt/entity_factory.py
ovms.mqtt.entity_factory.EntityFactory
import asyncio from ..attribute_manager import AttributeManager from typing import Dict, Any, Optional, List import hashlib from homeassistant.helpers.dispatcher import async_dispatcher_send from ..naming_service import EntityNamingService from homeassistant.core import HomeAssistant, callback from ..const import DOMAI...
class EntityFactory: '''Factory for creating OVMS entities.''' def __init__(self, hass: HomeAssistant, entity_registry, update_dispatcher, config: Dict[str, Any], naming_service: EntityNamingService, attribute_manager: AttributeManager): '''Initialize the entity factory.''' pass async def...
10
10
32
5
23
5
4
0.24
0
8
2
0
9
11
9
9
303
51
208
60
197
50
139
55
129
10
0
3
38
323,695
enoch85/ovms-home-assistant
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/mqtt/entity_registry.py
ovms.mqtt.entity_registry.EntityRegistry
from typing import Dict, Any, Optional, List, Set class EntityRegistry: """Registry for tracking OVMS entities and their relationships.""" def __init__(self): """Initialize the entity registry.""" self.topics = {} self.entities = {} self.relationships = {} self.relation...
class EntityRegistry: '''Registry for tracking OVMS entities and their relationships.''' def __init__(self): '''Initialize the entity registry.''' pass def register_entity(self, topic: str, entity_id: str, entity_type: str, priority: int=0) -> bool: '''Register an entity for a top...
14
14
9
1
6
2
2
0.35
0
7
0
0
13
7
13
13
134
26
85
29
71
30
70
26
56
7
0
4
24
323,696
enoch85/ovms-home-assistant
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/mqtt/state_parser.py
ovms.mqtt.state_parser.StateParser
from typing import Any, Dict, List, Optional import json from homeassistant.components.sensor import SensorDeviceClass class StateParser: """Parser for OVMS state values.""" @staticmethod def parse_value(value: Any, device_class: Optional[Any]=None, state_class: Optional[Any]=None, topic: str='') -> Any: ...
class StateParser: '''Parser for OVMS state values.''' @staticmethod def parse_value(value: Any, device_class: Optional[Any]=None, state_class: Optional[Any]=None, topic: str='') -> Any: '''Parse the value from the payload with enhanced precision and validation.''' pass @staticmethod ...
19
10
33
5
22
7
8
0.3
0
10
0
0
0
0
9
9
321
52
210
44
189
62
177
30
166
34
0
6
75
323,697
enoch85/ovms-home-assistant
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/mqtt/topic_parser.py
ovms.mqtt.topic_parser.TopicParser
from ..const import LOGGER_NAME, CONF_TOPIC_BLACKLIST, SYSTEM_TOPIC_BLACKLIST, DEFAULT_USER_TOPIC_BLACKLIST from ..metrics import BINARY_METRICS, get_metric_by_path, get_metric_by_pattern from typing import Dict, Any, Optional, Tuple, List from .. import metrics import re class TopicParser: """Parser for OVMS MQTT...
class TopicParser: '''Parser for OVMS MQTT topics.''' def __init__(self, config: Dict[str, Any], entity_registry): '''Initialize the topic parser.''' pass def _format_structure_prefix(self) -> str: '''Format the topic structure prefix based on configuration.''' pass d...
10
10
36
5
24
9
6
0.36
0
5
0
0
9
5
9
9
338
56
219
48
209
78
144
45
134
18
0
4
53
323,698
enoch85/ovms-home-assistant
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/mqtt/update_dispatcher.py
ovms.mqtt.update_dispatcher.UpdateDispatcher
from typing import Any, Dict, Optional, Set, List from ..const import LOGGER_NAME, SIGNAL_UPDATE_ENTITY, DOMAIN from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.dispatcher import async_dispatcher_send from ..attribute_manager import AttributeManager from homeassistant.util import dt as ...
class UpdateDispatcher: '''Dispatcher for coordinating updates between related entities.''' def __init__(self, hass: HomeAssistant, entity_registry, attribute_manager: AttributeManager): '''Initialize the update dispatcher.''' pass def dispatch_update(self, topic: str, payload: Any) -> No...
13
13
28
5
18
6
6
0.35
0
10
1
0
12
5
12
12
352
67
216
66
202
76
190
59
176
16
0
6
71
323,699
enoch85/ovms-home-assistant
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/naming_service.py
ovms.naming_service.EntityNamingService
import re from .const import LOGGER_NAME, DOMAIN from typing import Dict, Any, Optional, List class EntityNamingService: """Service for creating consistent entity names.""" def __init__(self, config: Dict[str, Any]): """Initialize the naming service.""" self.config = config self.vehicl...
class EntityNamingService: '''Service for creating consistent entity names.''' def __init__(self, config: Dict[str, Any]): '''Initialize the naming service.''' pass def create_friendly_name(self, parts: List[str], metric_info: Optional[Dict], topic: str, raw_name: str) -> str: '''...
6
6
19
2
14
3
7
0.25
0
5
0
0
5
2
5
5
102
16
69
21
62
17
68
18
62
26
0
4
37