id int64 0 328k | repository_name stringlengths 7 58 | file_path stringlengths 9 302 | class_name stringlengths 5 256 | human_written_code stringlengths 16 2.16M | class_skeleton stringlengths 18 1.49M ⌀ | total_program_units int64 1 1.76k | total_doc_str int64 0 771 | AvgCountLine float64 0 7.89k | AvgCountLineBlank float64 0 297 | AvgCountLineCode float64 0 7.89k | AvgCountLineComment float64 0 7.89k | AvgCyclomatic float64 0 130 | CommentToCodeRatio float64 0 168 | CountClassBase float64 0 40 | CountClassCoupled float64 0 583 | CountClassCoupledModified float64 0 575 | CountClassDerived float64 0 5.35k | CountDeclInstanceMethod float64 0 529 | CountDeclInstanceVariable float64 0 296 | CountDeclMethod float64 0 599 | CountDeclMethodAll float64 0 1.12k | CountLine float64 1 40.4k | CountLineBlank float64 0 8.16k | CountLineCode float64 1 25.7k | CountLineCodeDecl float64 1 8.15k | CountLineCodeExe float64 0 24.2k | CountLineComment float64 0 16.5k | CountStmt float64 1 9.71k | CountStmtDecl float64 1 8.15k | CountStmtExe float64 0 9.69k | MaxCyclomatic float64 0 759 | MaxInheritanceTree float64 0 16 | MaxNesting float64 0 34 | SumCyclomatic float64 0 2.9k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
326,600 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/debugging/analyzer.py | circuit_synth.debugging.analyzer.CircuitDebugger | from typing import Any, Dict, List, Optional, Tuple
import json
from pathlib import Path
from datetime import datetime
class CircuitDebugger:
"""Main circuit debugging analysis engine"""
def __init__(self, knowledge_base_path: Optional[Path]=None):
"""Initialize the debugger with optional knowledge ba... |
class CircuitDebugger:
'''Main circuit debugging analysis engine'''
def __init__(self, knowledge_base_path: Optional[Path]=None):
'''Initialize the debugger with optional knowledge base'''
pass
def _load_knowledge_base(self):
'''Load debugging patterns and historical data'''
... | 14 | 14 | 42 | 4 | 34 | 4 | 6 | 0.11 | 0 | 11 | 4 | 0 | 13 | 8 | 13 | 13 | 555 | 65 | 443 | 82 | 422 | 48 | 193 | 74 | 178 | 12 | 0 | 7 | 73 |
326,601 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/debugging/analyzer.py | circuit_synth.debugging.analyzer.DebugCategory | from enum import Enum
class DebugCategory(Enum):
"""Categories of circuit debugging issues"""
POWER = 'power'
DIGITAL = 'digital'
ANALOG = 'analog'
RF = 'rf'
THERMAL = 'thermal'
MECHANICAL = 'mechanical'
MANUFACTURING = 'manufacturing'
SOFTWARE = 'software' |
class DebugCategory(Enum):
'''Categories of circuit debugging issues'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.11 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 11 | 1 | 9 | 9 | 8 | 1 | 9 | 9 | 8 | 0 | 4 | 0 | 0 |
326,602 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/debugging/analyzer.py | circuit_synth.debugging.analyzer.DebugIssue | from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Tuple
@dataclass
class DebugIssue:
"""Represents a potential issue identified during debugging"""
category: DebugCategory
severity: IssueSeverity
title: str
description: str
symptoms: List[str]
probable_c... | @dataclass
class DebugIssue:
'''Represents a potential issue identified during debugging'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.17 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 1 | 12 | 3 | 11 | 2 | 12 | 3 | 11 | 0 | 0 | 0 | 0 |
326,603 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/debugging/analyzer.py | circuit_synth.debugging.analyzer.DebugSession | from datetime import datetime
from typing import Any, Dict, List, Optional, Tuple
from dataclasses import dataclass, field
@dataclass
class DebugSession:
"""Manages a complete debugging session"""
session_id: str
board_name: str
board_version: str
started_at: datetime
symptoms: List[str] = fiel... | @dataclass
class DebugSession:
'''Manages a complete debugging session'''
def add_symptom(self, symptom: str):
'''Add a symptom description'''
pass
def add_measurement(self, name: str, value: Any, unit: str='', notes: str=''):
'''Add a test measurement'''
pass
def add_... | 6 | 5 | 13 | 0 | 12 | 1 | 1 | 0.08 | 0 | 3 | 0 | 0 | 4 | 0 | 4 | 4 | 69 | 5 | 59 | 13 | 54 | 5 | 24 | 13 | 19 | 2 | 0 | 0 | 5 |
326,604 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/debugging/analyzer.py | circuit_synth.debugging.analyzer.IssueSeverity | from enum import Enum
class IssueSeverity(Enum):
"""Severity levels for identified issues"""
CRITICAL = 'critical'
HIGH = 'high'
MEDIUM = 'medium'
LOW = 'low' |
class IssueSeverity(Enum):
'''Severity levels for identified issues'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 7 | 1 | 5 | 5 | 4 | 5 | 5 | 5 | 4 | 0 | 4 | 0 | 0 |
326,605 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/debugging/knowledge_base.py | circuit_synth.debugging.knowledge_base.ComponentFailure | from typing import Any, Dict, List, Optional, Tuple
from dataclasses import asdict, dataclass
@dataclass
class ComponentFailure:
"""Represents known failure modes for specific components"""
component_type: str
manufacturer: str
failure_mode: str
failure_rate: float
symptoms: List[str]
root_... | @dataclass
class ComponentFailure:
'''Represents known failure modes for specific components'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 1 | 10 | 2 | 9 | 4 | 10 | 2 | 9 | 0 | 0 | 0 | 0 |
326,606 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/debugging/knowledge_base.py | circuit_synth.debugging.knowledge_base.DebugKnowledgeBase | import hashlib
from pathlib import Path
import sqlite3
import json
from typing import Any, Dict, List, Optional, Tuple
class DebugKnowledgeBase:
"""Manages debugging knowledge and historical patterns"""
def __init__(self, db_path: Optional[Path]=None):
self.db_path = db_path or Path('memory-bank/debug... |
class DebugKnowledgeBase:
'''Manages debugging knowledge and historical patterns'''
def __init__(self, db_path: Optional[Path]=None):
pass
def _init_database(self):
'''Initialize SQLite database for pattern storage'''
pass
def _load_default_patterns(self):
'''Load def... | 11 | 10 | 37 | 2 | 34 | 1 | 3 | 0.04 | 0 | 9 | 2 | 0 | 10 | 2 | 10 | 10 | 386 | 26 | 345 | 43 | 327 | 15 | 78 | 33 | 67 | 6 | 0 | 3 | 28 |
326,607 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/debugging/knowledge_base.py | circuit_synth.debugging.knowledge_base.DebugPattern | from dataclasses import asdict, dataclass
from typing import Any, Dict, List, Optional, Tuple
@dataclass
class DebugPattern:
"""Represents a known debugging pattern from historical data"""
pattern_id: str
category: str
symptoms: List[str]
root_cause: str
solutions: List[str]
component_types... | @dataclass
class DebugPattern:
'''Represents a known debugging pattern from historical data'''
def matches_symptoms(self, symptoms: List[str], threshold: float=0.5) -> float:
'''Calculate similarity between pattern and given symptoms'''
pass | 3 | 2 | 17 | 3 | 12 | 2 | 3 | 0.13 | 0 | 3 | 0 | 0 | 1 | 0 | 1 | 1 | 31 | 5 | 23 | 11 | 21 | 3 | 19 | 10 | 17 | 3 | 0 | 1 | 3 |
326,608 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/debugging/report_generator.py | circuit_synth.debugging.report_generator.DebugReportGenerator | from typing import Any, Dict, List, Optional
class DebugReportGenerator:
"""Generates professional PDF reports from debugging sessions"""
def __init__(self, session_data: Dict[str, Any]):
"""Initialize with session data"""
if not REPORTLAB_AVAILABLE:
raise ImportError('reportlab is... |
class DebugReportGenerator:
'''Generates professional PDF reports from debugging sessions'''
def __init__(self, session_data: Dict[str, Any]):
'''Initialize with session data'''
pass
def _setup_custom_styles(self):
'''Setup custom paragraph styles'''
pass
def generate... | 11 | 11 | 42 | 6 | 33 | 5 | 3 | 0.15 | 0 | 5 | 0 | 0 | 10 | 2 | 10 | 10 | 435 | 70 | 326 | 53 | 315 | 49 | 132 | 53 | 121 | 7 | 0 | 4 | 29 |
326,609 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/debugging/symptoms.py | circuit_synth.debugging.symptoms.MeasurementType | from enum import Enum
class MeasurementType(Enum):
"""Types of electrical measurements"""
VOLTAGE_DC = 'voltage_dc'
VOLTAGE_AC = 'voltage_ac'
CURRENT = 'current'
RESISTANCE = 'resistance'
CAPACITANCE = 'capacitance'
INDUCTANCE = 'inductance'
FREQUENCY = 'frequency'
TEMPERATURE = 'te... |
class MeasurementType(Enum):
'''Types of electrical measurements'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.08 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 14 | 1 | 12 | 12 | 11 | 1 | 12 | 12 | 11 | 0 | 4 | 0 | 0 |
326,610 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/debugging/symptoms.py | circuit_synth.debugging.symptoms.OscilloscopeTrace | from typing import Any, Dict, List, Optional, Tuple
from dataclasses import dataclass, field
import numpy as np
@dataclass
class OscilloscopeTrace:
"""Represents oscilloscope waveform data"""
channel: str
time_data: List[float]
voltage_data: List[float]
timebase: str
vertical_scale: str
tri... | @dataclass
class OscilloscopeTrace:
'''Represents oscilloscope waveform data'''
def analyze_waveform(self) -> Dict[str, Any]:
'''Analyze waveform characteristics'''
pass | 3 | 2 | 47 | 6 | 35 | 7 | 7 | 0.27 | 0 | 4 | 0 | 0 | 1 | 0 | 1 | 1 | 60 | 8 | 45 | 16 | 43 | 12 | 35 | 16 | 33 | 7 | 0 | 3 | 7 |
326,611 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/debugging/symptoms.py | circuit_synth.debugging.symptoms.SymptomAnalyzer | from typing import Any, Dict, List, Optional, Tuple
class SymptomAnalyzer:
"""Analyzes symptoms and measurements to identify issues"""
POWER_SYMPTOMS = ['not turning on', 'no power', 'dead', "won't start", 'no voltage', 'burning smell', 'hot', 'overheating', 'smoke', 'melted', 'regulator hot', 'fuse blown', 's... |
class SymptomAnalyzer:
'''Analyzes symptoms and measurements to identify issues'''
def __init__(self):
pass
def categorize_symptoms(self, symptoms: List[str]) -> Dict[str, List[str]]:
'''Categorize symptoms by failure domain'''
pass
def analyze_voltage_measurement(self, measu... | 6 | 5 | 43 | 5 | 34 | 5 | 6 | 0.11 | 0 | 5 | 2 | 0 | 5 | 1 | 5 | 5 | 302 | 37 | 245 | 39 | 233 | 28 | 93 | 33 | 87 | 9 | 0 | 3 | 30 |
326,612 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/debugging/symptoms.py | circuit_synth.debugging.symptoms.TestMeasurement | from typing import Any, Dict, List, Optional, Tuple
from dataclasses import dataclass, field
from datetime import datetime
@dataclass
class TestMeasurement:
"""Represents a single test measurement with context"""
measurement_type: MeasurementType
value: Any
unit: str
test_point: str
reference_p... | @dataclass
class TestMeasurement:
'''Represents a single test measurement with context'''
def evaluate(self) -> bool:
'''Evaluate if measurement is within expected range'''
pass | 3 | 2 | 18 | 3 | 14 | 2 | 4 | 0.12 | 0 | 3 | 0 | 0 | 1 | 0 | 1 | 1 | 33 | 5 | 26 | 11 | 24 | 3 | 23 | 11 | 21 | 4 | 0 | 1 | 4 |
326,613 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/design_for_manufacturing/comprehensive_dfm_report_generator.py | circuit_synth.design_for_manufacturing.comprehensive_dfm_report_generator.ComprehensiveDFMReportGenerator | from datetime import datetime
from .dfm_analyzer import ComponentAnalysis, DFMAnalyzer, DFMReport, IssueCategory, IssueSeverity, ManufacturingIssue, ManufacturingProcess, PCBAnalysis
from typing import Any, Dict, List, Optional, Tuple
class ComprehensiveDFMReportGenerator:
"""Generates comprehensive 40+ page DFM r... |
class ComprehensiveDFMReportGenerator:
'''Generates comprehensive 40+ page DFM reports with detailed analysis'''
def __init__(self, project_name: str, author: str='Circuit-Synth DFM System'):
pass
def _setup_comprehensive_styles(self):
'''Setup comprehensive styles for detailed DFM report... | 26 | 25 | 62 | 6 | 52 | 5 | 3 | 0.1 | 0 | 8 | 3 | 0 | 25 | 6 | 25 | 25 | 1,572 | 183 | 1,292 | 182 | 1,258 | 133 | 410 | 174 | 384 | 10 | 0 | 3 | 70 |
326,614 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/design_for_manufacturing/dfm_analyzer.py | circuit_synth.design_for_manufacturing.dfm_analyzer.ComponentAnalysis | from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Tuple
@dataclass
class ComponentAnalysis:
"""Analysis results for a single component"""
reference: str
part_number: str
package: str
technology: ManufacturingProcess
availability_score: float
cost_score: ... | @dataclass
class ComponentAnalysis:
'''Analysis results for a single component'''
@property
def overall_score(self) -> float:
'''Calculate overall component DFM score'''
pass | 4 | 2 | 7 | 0 | 6 | 1 | 1 | 0.29 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 21 | 2 | 17 | 5 | 14 | 5 | 12 | 4 | 10 | 1 | 0 | 0 | 1 |
326,615 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/design_for_manufacturing/dfm_analyzer.py | circuit_synth.design_for_manufacturing.dfm_analyzer.DFMAnalyzer | from typing import Any, Dict, List, Optional, Tuple
class DFMAnalyzer:
"""Main DFM analysis engine"""
def __init__(self):
"""Initialize DFM analyzer"""
self.manufacturing_constraints = self._load_manufacturing_constraints()
self.cost_models = self._load_cost_models()
self.compo... |
class DFMAnalyzer:
'''Main DFM analysis engine'''
def __init__(self):
'''Initialize DFM analyzer'''
pass
def _load_manufacturing_constraints(self) -> Dict:
'''Load manufacturing constraints and capabilities'''
pass
def _load_cost_models(self) -> Dict:
'''Load ... | 20 | 20 | 25 | 3 | 19 | 5 | 3 | 0.25 | 0 | 13 | 7 | 0 | 19 | 3 | 19 | 19 | 498 | 69 | 357 | 112 | 308 | 90 | 151 | 83 | 130 | 6 | 0 | 2 | 56 |
326,616 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/design_for_manufacturing/dfm_analyzer.py | circuit_synth.design_for_manufacturing.dfm_analyzer.DFMReport | from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Tuple
@dataclass
class DFMReport:
"""Complete DFM analysis report"""
circuit_name: str
timestamp: str
total_components: int
unique_components: int
component_analyses: List[ComponentAnalysis]
pcb_analysis:... | @dataclass
class DFMReport:
'''Complete DFM analysis report'''
def get_executive_summary(self) -> str:
'''Generate executive summary of DFM analysis'''
pass | 3 | 2 | 38 | 5 | 31 | 2 | 2 | 0.25 | 0 | 3 | 1 | 0 | 1 | 0 | 1 | 1 | 73 | 13 | 51 | 5 | 49 | 13 | 26 | 5 | 24 | 2 | 0 | 1 | 2 |
326,617 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/design_for_manufacturing/dfm_analyzer.py | circuit_synth.design_for_manufacturing.dfm_analyzer.IssueCategory | from enum import Enum
class IssueCategory(Enum):
"""DFM issue categories"""
COMPONENT_SELECTION = 'Component Selection'
COMPONENT_PLACEMENT = 'Component Placement'
PCB_DESIGN = 'PCB Design'
ASSEMBLY_PROCESS = 'Assembly Process'
TESTABILITY = 'Testability'
COST_OPTIMIZATION = 'Cost Optimizat... |
class IssueCategory(Enum):
'''DFM issue categories'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.11 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 11 | 1 | 9 | 9 | 8 | 1 | 9 | 9 | 8 | 0 | 4 | 0 | 0 |
326,618 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/design_for_manufacturing/dfm_analyzer.py | circuit_synth.design_for_manufacturing.dfm_analyzer.IssueSeverity | from enum import Enum
class IssueSeverity(Enum):
"""DFM issue severity levels"""
CRITICAL = 5
HIGH = 4
MEDIUM = 3
LOW = 2
INFO = 1 |
class IssueSeverity(Enum):
'''DFM issue severity levels'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 8 | 1 | 6 | 6 | 5 | 6 | 6 | 6 | 5 | 0 | 4 | 0 | 0 |
326,619 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/design_for_manufacturing/dfm_analyzer.py | circuit_synth.design_for_manufacturing.dfm_analyzer.ManufacturingIssue | from typing import Any, Dict, List, Optional, Tuple
from dataclasses import dataclass, field
@dataclass
class ManufacturingIssue:
"""Represents a DFM issue found during analysis"""
category: IssueCategory
severity: IssueSeverity
component: Optional[str]
description: str
impact: str
recommen... | @dataclass
class ManufacturingIssue:
'''Represents a DFM issue found during analysis'''
@property
def priority_score(self) -> int:
'''Calculate priority score for issue resolution'''
pass | 4 | 2 | 23 | 3 | 17 | 6 | 9 | 0.26 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 36 | 5 | 27 | 6 | 24 | 7 | 22 | 5 | 20 | 9 | 0 | 2 | 9 |
326,620 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/design_for_manufacturing/dfm_analyzer.py | circuit_synth.design_for_manufacturing.dfm_analyzer.ManufacturingProcess | from enum import Enum
class ManufacturingProcess(Enum):
"""Manufacturing process types"""
SMT = 'Surface Mount Technology'
THT = 'Through-Hole Technology'
MIXED = 'Mixed Technology'
MANUAL = 'Manual Assembly'
SELECTIVE = 'Selective Soldering'
WAVE = 'Wave Soldering'
REFLOW = 'Reflow Sol... |
class ManufacturingProcess(Enum):
'''Manufacturing process types'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.13 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 10 | 1 | 8 | 8 | 7 | 1 | 8 | 8 | 7 | 0 | 4 | 0 | 0 |
326,621 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/design_for_manufacturing/dfm_analyzer.py | circuit_synth.design_for_manufacturing.dfm_analyzer.PCBAnalysis | from typing import Any, Dict, List, Optional, Tuple
from dataclasses import dataclass, field
@dataclass
class PCBAnalysis:
"""Analysis results for PCB design"""
layer_count: int
board_size_mm2: float
min_trace_width_mm: float
min_via_size_mm: float
component_density: float
technology_mix: D... | @dataclass
class PCBAnalysis:
'''Analysis results for PCB design'''
@property
def complexity_score(self) -> float:
'''Calculate PCB complexity score (lower is better)'''
pass | 4 | 2 | 33 | 4 | 25 | 4 | 9 | 0.22 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 47 | 6 | 36 | 5 | 33 | 8 | 27 | 4 | 25 | 9 | 0 | 1 | 9 |
326,622 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/design_for_manufacturing/dfm_analyzer_digikey.py | circuit_synth.design_for_manufacturing.dfm_analyzer_digikey.BOMPricing | from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Tuple
from datetime import datetime
@dataclass
class BOMPricing:
"""Bill of Materials pricing with real data"""
total_components: int
priced_components: int
missing_components: List[str]
pricing_tiers: Dict[int, ... | @dataclass
class BOMPricing:
'''Bill of Materials pricing with real data'''
@property
def coverage_percentage(self) -> float:
'''Percentage of components with pricing data'''
pass
def get_bom_cost(self, quantity: int) -> Optional[float]:
'''Get total BOM cost at specified quanti... | 6 | 4 | 21 | 2 | 18 | 1 | 4 | 0.14 | 0 | 2 | 0 | 0 | 3 | 0 | 3 | 3 | 84 | 12 | 64 | 14 | 59 | 9 | 34 | 13 | 30 | 6 | 0 | 2 | 13 |
326,623 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/design_for_manufacturing/dfm_analyzer_digikey.py | circuit_synth.design_for_manufacturing.dfm_analyzer_digikey.ComponentPricingAnalysis | from typing import Any, Dict, List, Optional, Tuple
from dataclasses import dataclass, field
@dataclass
class ComponentPricingAnalysis:
"""Component analysis with real supplier data"""
reference: str
part_number: str
digikey_pricing: Optional[DigiKeyPricing]
alternatives: List[DigiKeyPricing] = fie... | @dataclass
class ComponentPricingAnalysis:
'''Component analysis with real supplier data'''
@property
def has_pricing(self) -> bool:
'''Check if real pricing is available'''
pass
@property
def unit_price(self) -> Optional[float]:
'''Get unit price at quantity 1'''
pas... | 8 | 5 | 6 | 1 | 5 | 1 | 2 | 0.19 | 0 | 3 | 0 | 0 | 4 | 0 | 4 | 4 | 38 | 7 | 26 | 11 | 19 | 5 | 24 | 9 | 19 | 4 | 0 | 2 | 9 |
326,624 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/design_for_manufacturing/dfm_analyzer_digikey.py | circuit_synth.design_for_manufacturing.dfm_analyzer_digikey.DigiKeyPricing | from dataclasses import dataclass, field
from datetime import datetime
from typing import Any, Dict, List, Optional, Tuple
@dataclass
class DigiKeyPricing:
"""Real pricing data from DigiKey"""
digikey_part_number: str
manufacturer_part_number: str
manufacturer: str
description: str
unit_price: ... | @dataclass
class DigiKeyPricing:
'''Real pricing data from DigiKey'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.14 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 1 | 14 | 1 | 13 | 2 | 14 | 1 | 13 | 0 | 0 | 0 | 0 |
326,625 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/design_for_manufacturing/dfm_analyzer_digikey.py | circuit_synth.design_for_manufacturing.dfm_analyzer_digikey.RealDataDFMAnalyzer | from ..manufacturing.digikey import search_digikey_components
from datetime import datetime
from typing import Any, Dict, List, Optional, Tuple
class RealDataDFMAnalyzer:
"""DFM Analyzer using only real supplier data"""
def __init__(self):
"""Initialize analyzer with DigiKey integration"""
sel... |
class RealDataDFMAnalyzer:
'''DFM Analyzer using only real supplier data'''
def __init__(self):
'''Initialize analyzer with DigiKey integration'''
pass
def analyze_bom_pricing(self, components: Dict[str, Dict], quantity_tiers: List[int]=None) -> BOMPricing:
'''
Analyze BOM... | 5 | 5 | 58 | 10 | 41 | 8 | 6 | 0.2 | 0 | 7 | 3 | 0 | 4 | 1 | 4 | 4 | 237 | 42 | 166 | 44 | 157 | 34 | 111 | 39 | 106 | 9 | 0 | 4 | 25 |
326,626 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/design_for_manufacturing/json_dfm_analyzer.py | circuit_synth.design_for_manufacturing.json_dfm_analyzer.DFMAnalysisResult | from typing import Any, Dict, List, Optional, Tuple
from dataclasses import dataclass, field
@dataclass
class DFMAnalysisResult:
"""Results from DFM analysis of circuit JSON"""
circuit_name: str
total_components: int
unique_components: int
subcircuit_count: int
technology_mix: Dict[str, int]
... | @dataclass
class DFMAnalysisResult:
'''Results from DFM analysis of circuit JSON'''
def to_report(self) -> str:
'''Generate human-readable DFM report'''
pass | 3 | 2 | 73 | 10 | 62 | 1 | 15 | 0.11 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 103 | 16 | 80 | 8 | 78 | 9 | 70 | 8 | 68 | 15 | 0 | 2 | 15 |
326,627 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/design_for_manufacturing/json_dfm_analyzer.py | circuit_synth.design_for_manufacturing.json_dfm_analyzer.JSONDFMAnalyzer | import json
from datetime import datetime
from typing import Any, Dict, List, Optional, Tuple
class JSONDFMAnalyzer:
"""Analyzes circuit JSON for DFM with real data requirements"""
def __init__(self, require_real_data: bool=True):
"""
Initialize analyzer
Args:
require_real... |
class JSONDFMAnalyzer:
'''Analyzes circuit JSON for DFM with real data requirements'''
def __init__(self, require_real_data: bool=True):
'''
Initialize analyzer
Args:
require_real_data: If True, only use real supplier data (no estimates)
'''
pass
def an... | 9 | 9 | 49 | 6 | 34 | 8 | 6 | 0.25 | 0 | 9 | 1 | 0 | 8 | 4 | 8 | 8 | 398 | 57 | 276 | 75 | 247 | 68 | 130 | 55 | 120 | 12 | 0 | 4 | 46 |
326,628 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/design_for_manufacturing/kicad_dfm_analyzer.py | circuit_synth.design_for_manufacturing.kicad_dfm_analyzer.KiCadProject | from typing import Any, Dict, List, Optional, Tuple
from pathlib import Path
from dataclasses import dataclass
@dataclass
class KiCadProject:
"""Represents a parsed KiCad project"""
name: str
path: Path
schematics: List[Path]
pcb: Optional[Path]
netlist: Optional[Path]
@property
def ha... | @dataclass
class KiCadProject:
'''Represents a parsed KiCad project'''
@property
def has_complete_design(self) -> bool:
'''Check if project has both schematic and PCB'''
pass | 4 | 2 | 3 | 0 | 2 | 1 | 1 | 0.22 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 13 | 2 | 9 | 3 | 6 | 2 | 8 | 2 | 6 | 1 | 0 | 0 | 1 |
326,629 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/design_for_manufacturing/kicad_dfm_analyzer.py | circuit_synth.design_for_manufacturing.kicad_dfm_analyzer.KiCadToDFMAnalyzer | from typing import Any, Dict, List, Optional, Tuple
from datetime import datetime
from pathlib import Path
class KiCadToDFMAnalyzer:
"""Converts KiCad projects to circuit-synth format for DFM analysis"""
def __init__(self):
self.hierarchical_json = None
self.flat_json = None
def analyze_k... |
class KiCadToDFMAnalyzer:
'''Converts KiCad projects to circuit-synth format for DFM analysis'''
def __init__(self):
pass
def analyze_kicad_project(self, project_path: str, output_format: str='json') -> Dict[str, Any]:
'''
Main entry point for KiCad DFM analysis
Args:
... | 19 | 18 | 20 | 2 | 15 | 3 | 3 | 0.21 | 0 | 8 | 1 | 0 | 18 | 2 | 18 | 18 | 377 | 55 | 271 | 71 | 245 | 58 | 138 | 64 | 118 | 9 | 0 | 2 | 50 |
326,630 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/fast_generation/core.py | circuit_synth.fast_generation.core.FastCircuitGenerator | from .models import OpenRouterModel, GoogleADKModel, ModelResponse
from pathlib import Path
from datetime import datetime
from .project_templates import ProjectTemplateGenerator
from typing import Dict, List, Optional, Any, Union
from .patterns import CircuitPatterns, PatternType, PatternTemplate
import os
class FastC... |
class FastCircuitGenerator:
'''High-speed circuit generator using patterns and AI models'''
def __init__(self, openrouter_key: str=None, google_project: str=None, default_model: str='openrouter'):
'''Initialize fast circuit generator'''
pass
def _setup_models(self):
'''Setup AI mo... | 16 | 16 | 27 | 4 | 20 | 3 | 3 | 0.18 | 0 | 18 | 7 | 0 | 15 | 7 | 15 | 15 | 425 | 71 | 301 | 103 | 242 | 53 | 144 | 56 | 128 | 8 | 0 | 2 | 44 |
326,631 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/fast_generation/kicad_pin_reader.py | circuit_synth.fast_generation.kicad_pin_reader.KiCadSymbolReader | from typing import Dict, List, Optional, Tuple
from pathlib import Path
import re
class KiCadSymbolReader:
"""Read pin information directly from KiCad symbol files"""
def __init__(self):
self.symbol_paths = self._find_kicad_symbol_paths()
self.cache = {}
def _find_kicad_symbol_paths(self)... |
class KiCadSymbolReader:
'''Read pin information directly from KiCad symbol files'''
def __init__(self):
pass
def _find_kicad_symbol_paths(self) -> List[Path]:
'''Find KiCad symbol library paths'''
pass
def find_symbol_file(self, symbol_name: str) -> Optional[Path]:
'... | 8 | 7 | 25 | 4 | 18 | 3 | 5 | 0.17 | 0 | 5 | 0 | 0 | 7 | 2 | 7 | 7 | 181 | 38 | 124 | 46 | 116 | 21 | 104 | 43 | 96 | 9 | 0 | 3 | 33 |
326,632 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/fast_generation/models.py | circuit_synth.fast_generation.models.GoogleADKModel | from typing import Dict, List, Optional, Any
import os
from .adk_tools import create_adk_tools
import asyncio
class GoogleADKModel:
"""Google ADK Agent for circuit generation orchestration"""
def __init__(self, project_id: str=None):
if not Agent:
raise ImportError('Google ADK required: pi... |
class GoogleADKModel:
'''Google ADK Agent for circuit generation orchestration'''
def __init__(self, project_id: str=None):
pass
def _setup_agents(self):
'''Setup specialized circuit generation agents'''
pass
async def generate_with_agents(self, pattern_type: str, requirement... | 5 | 4 | 27 | 4 | 21 | 4 | 2 | 0.18 | 0 | 5 | 1 | 0 | 4 | 2 | 4 | 4 | 115 | 18 | 84 | 22 | 74 | 15 | 32 | 17 | 26 | 2 | 0 | 1 | 6 |
326,633 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/fast_generation/models.py | circuit_synth.fast_generation.models.ModelResponse | from dataclasses import dataclass
from typing import Dict, List, Optional, Any
@dataclass
class ModelResponse:
"""Standard response format from AI models"""
content: str
model: str
tokens_used: int
latency_ms: float
success: bool
error: Optional[str] = None | @dataclass
class ModelResponse:
'''Standard response format from AI models'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.14 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0 | 7 | 2 | 6 | 1 | 7 | 2 | 6 | 0 | 0 | 0 | 0 |
326,634 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/fast_generation/models.py | circuit_synth.fast_generation.models.OpenRouterModel | import asyncio
from typing import Dict, List, Optional, Any
from .pin_finder import pin_finder, get_ai_pin_context, adk_pin_finder_tool
import os
class OpenRouterModel:
"""OpenRouter API client for Gemini-2.5-Flash"""
def __init__(self, api_key: str=None, model: str='google/gemini-2.5-flash'):
if not ... |
class OpenRouterModel:
'''OpenRouter API client for Gemini-2.5-Flash'''
def __init__(self, api_key: str=None, model: str='google/gemini-2.5-flash'):
pass
async def generate_circuit(self, prompt: str, context: Dict[str, Any]=None, max_tokens: int=4000) -> ModelResponse:
'''Generate circuit... | 5 | 4 | 46 | 7 | 36 | 3 | 4 | 0.08 | 0 | 9 | 1 | 0 | 4 | 2 | 4 | 4 | 190 | 33 | 146 | 27 | 135 | 12 | 60 | 20 | 54 | 5 | 0 | 2 | 17 |
326,635 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/fast_generation/patterns.py | circuit_synth.fast_generation.patterns.CircuitPatterns | from typing import Dict, List, Any, Optional
class CircuitPatterns:
"""Repository of verified circuit patterns"""
@staticmethod
def get_pattern(pattern_type: PatternType) -> PatternTemplate:
"""Get pattern template by type"""
patterns = {PatternType.ESP32_BASIC: CircuitPatterns._esp32_basi... |
class CircuitPatterns:
'''Repository of verified circuit patterns'''
@staticmethod
def get_pattern(pattern_type: PatternType) -> PatternTemplate:
'''Get pattern template by type'''
pass
@staticmethod
def list_patterns() -> List[Dict[str, Any]]:
'''List all available patterns... | 25 | 13 | 40 | 0 | 39 | 1 | 1 | 0.03 | 0 | 5 | 3 | 0 | 0 | 0 | 12 | 12 | 510 | 14 | 482 | 26 | 457 | 14 | 26 | 14 | 13 | 1 | 0 | 0 | 12 |
326,636 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/fast_generation/patterns.py | circuit_synth.fast_generation.patterns.ComponentSpec | from typing import Dict, List, Any, Optional
from dataclasses import dataclass
@dataclass
class ComponentSpec:
"""Specification for a circuit component"""
symbol: str
footprint: str
value: str
ref_prefix: str
description: str
required: bool = True
alternatives: List[str] = None | @dataclass
class ComponentSpec:
'''Specification for a circuit component'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0 | 8 | 3 | 7 | 8 | 8 | 3 | 7 | 0 | 0 | 0 | 0 |
326,637 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/fast_generation/patterns.py | circuit_synth.fast_generation.patterns.PatternTemplate | from typing import Dict, List, Any, Optional
from dataclasses import dataclass
@dataclass
class PatternTemplate:
"""Template for a circuit pattern"""
name: str
description: str
components: List[ComponentSpec]
connections: List[str]
power_rails: List[str]
design_notes: List[str]
estimate... | @dataclass
class PatternTemplate:
'''Template for a circuit pattern'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.63 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0 | 8 | 1 | 7 | 5 | 8 | 1 | 7 | 0 | 0 | 0 | 0 |
326,638 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/fast_generation/patterns.py | circuit_synth.fast_generation.patterns.PatternType | from enum import Enum
class PatternType(Enum):
"""Available circuit pattern types"""
ESP32_BASIC = 'esp32_basic'
ESP32_SENSOR = 'esp32_sensor'
STM32_BASIC = 'stm32_basic'
STM32_MOTOR = 'stm32_motor'
MOTOR_STEPPER = 'motor_stepper'
SENSOR_IMU = 'sensor_imu'
SENSOR_TEMP = 'sensor_temp'
... |
class PatternType(Enum):
'''Available circuit pattern types'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.09 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 12 | 0 | 11 | 11 | 10 | 1 | 11 | 11 | 10 | 0 | 4 | 0 | 0 |
326,639 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/fast_generation/pin_finder.py | circuit_synth.fast_generation.pin_finder.PinFinder | from typing import Dict, List, Optional, Tuple, Union
class PinFinder:
"""Find exact pin names for KiCad component symbols"""
def __init__(self):
self.cache = {}
def find_pins(self, symbol_name: str) -> Dict[str, any]:
"""
Find pin information for a KiCad symbol
Args:
... |
class PinFinder:
'''Find exact pin names for KiCad component symbols'''
def __init__(self):
pass
def find_pins(self, symbol_name: str) -> Dict[str, any]:
'''
Find pin information for a KiCad symbol
Args:
symbol_name: KiCad symbol name (e.g., "MCU_Espressif:ESP3... | 8 | 7 | 33 | 6 | 22 | 5 | 4 | 0.24 | 0 | 7 | 1 | 0 | 7 | 1 | 7 | 7 | 239 | 48 | 157 | 42 | 149 | 37 | 106 | 40 | 98 | 9 | 0 | 6 | 29 |
326,640 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/fast_generation/pin_finder.py | circuit_synth.fast_generation.pin_finder.PinFinderTool | class PinFinderTool:
"""Tool interface for Google ADK integration"""
name = 'find_pins'
description = 'Find exact pin names for KiCad component symbols'
def __call__(self, symbol_name: str) -> str:
"""Execute pin finding tool"""
return pin_finder.get_pin_info_for_ai(symbol_name)
de... | class PinFinderTool:
'''Tool interface for Google ADK integration'''
def __call__(self, symbol_name: str) -> str:
'''Execute pin finding tool'''
pass
def to_adk_tool(self):
'''Convert to Google ADK tool format'''
pass | 3 | 3 | 6 | 0 | 4 | 2 | 1 | 0.36 | 0 | 1 | 0 | 0 | 2 | 0 | 2 | 2 | 18 | 3 | 11 | 5 | 8 | 4 | 7 | 5 | 4 | 1 | 0 | 0 | 2 |
326,641 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/fast_generation/project_templates.py | circuit_synth.fast_generation.project_templates.ProjectTemplateGenerator | from pathlib import Path
from typing import Dict, List, Optional
class ProjectTemplateGenerator:
"""Generate hierarchical project structures for fast generation"""
def __init__(self):
self.templates = self._define_templates()
def _define_templates(self) -> Dict[str, Dict]:
"""Define proje... |
class ProjectTemplateGenerator:
'''Generate hierarchical project structures for fast generation'''
def __init__(self):
pass
def _define_templates(self) -> Dict[str, Dict]:
'''Define project templates with hierarchical structure'''
pass
def generate_project(self, template_name... | 14 | 3 | 54 | 8 | 42 | 7 | 1 | 0.18 | 0 | 4 | 1 | 0 | 13 | 1 | 13 | 13 | 717 | 115 | 546 | 22 | 532 | 97 | 39 | 22 | 25 | 3 | 0 | 1 | 15 |
326,642 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/fast_generation/project_templates.py | circuit_synth.fast_generation.project_templates.SubcircuitSpec | from typing import Dict, List, Optional
from dataclasses import dataclass
@dataclass
class SubcircuitSpec:
"""Specification for a subcircuit module"""
name: str
filename: str
function_name: str
description: str
nets_in: List[str]
nets_out: List[str]
components: List[str]
code_templa... | @dataclass
class SubcircuitSpec:
'''Specification for a subcircuit module'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.78 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0 | 9 | 1 | 8 | 7 | 9 | 1 | 8 | 0 | 0 | 0 | 0 |
326,643 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/atomic_integration.py | circuit_synth.kicad.atomic_integration.AtomicKiCadIntegration | import uuid
import logging
from .atomic_operations_exact import add_component_to_schematic_exact, remove_component_from_schematic_exact
from pathlib import Path
from typing import Dict, List, Optional, Tuple, Union
class AtomicKiCadIntegration:
"""
Production integration of atomic operations with circuit-synth... |
class AtomicKiCadIntegration:
'''
Production integration of atomic operations with circuit-synth pipeline.
Enables incremental KiCad project updates without full regeneration.
'''
def __init__(self, project_path: Union[str, Path]):
'''
Initialize atomic integration for a KiCad proj... | 7 | 7 | 34 | 4 | 22 | 8 | 3 | 0.37 | 0 | 6 | 0 | 0 | 6 | 2 | 6 | 6 | 215 | 32 | 134 | 39 | 113 | 49 | 62 | 23 | 55 | 5 | 0 | 2 | 16 |
326,644 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/canonical.py | circuit_synth.kicad.canonical.CanonicalCircuit | from typing import Any, Dict, List, Optional, Tuple
class CanonicalCircuit:
"""
Represents a complete circuit in canonical form.
A canonical circuit is an ordered list of connections that uniquely
identifies the circuit topology independent of component references
or net names.
"""
def __... |
class CanonicalCircuit:
'''
Represents a complete circuit in canonical form.
A canonical circuit is an ordered list of connections that uniquely
identifies the circuit topology independent of component references
or net names.
'''
def __init__(self, connections: List[CanonicalConnection]):... | 35 | 21 | 23 | 3 | 14 | 7 | 5 | 0.47 | 0 | 9 | 1 | 0 | 8 | 2 | 20 | 20 | 500 | 78 | 290 | 114 | 251 | 136 | 210 | 96 | 189 | 14 | 0 | 5 | 90 |
326,645 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/canonical.py | circuit_synth.kicad.canonical.CanonicalConnection | from dataclasses import dataclass
@dataclass
class CanonicalConnection:
"""
Represents a single connection in canonical form.
This is the fundamental unit of the canonical representation, describing
one pin of one component connected to one net.
Attributes:
component_index: Order of compo... | @dataclass
class CanonicalConnection:
'''
Represents a single connection in canonical form.
This is the fundamental unit of the canonical representation, describing
one pin of one component connected to one net.
Attributes:
component_index: Order of component in circuit (0-based)
pin... | 3 | 2 | 3 | 0 | 2 | 1 | 1 | 1.57 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 22 | 4 | 7 | 2 | 5 | 11 | 7 | 2 | 5 | 1 | 0 | 0 | 1 |
326,646 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/canonical.py | circuit_synth.kicad.canonical.CircuitMatcher | from typing import Any, Dict, List, Optional, Tuple
import logging
class CircuitMatcher:
"""
Matches components between two canonical circuits.
This class implements the matching algorithm that identifies corresponding
components between an old circuit (e.g., from KiCad) and a new circuit
(e.g., f... |
class CircuitMatcher:
'''
Matches components between two canonical circuits.
This class implements the matching algorithm that identifies corresponding
components between an old circuit (e.g., from KiCad) and a new circuit
(e.g., from Python), enabling synchronization while preserving manual work.
... | 6 | 6 | 47 | 7 | 27 | 13 | 5 | 0.52 | 0 | 5 | 1 | 0 | 5 | 1 | 5 | 5 | 248 | 41 | 138 | 54 | 113 | 72 | 80 | 35 | 74 | 7 | 0 | 3 | 25 |
326,647 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/config.py | circuit_synth.kicad.config.KiCadConfig | import os
class KiCadConfig:
"""Configuration manager for KiCad integration features."""
USE_MODERN_SCH_API = 'USE_MODERN_SCH_API'
@classmethod
def use_modern_sch_api(cls) -> bool:
"""
Check if modern kicad-sch-api should be used instead of legacy implementation.
Returns:
... |
class KiCadConfig:
'''Configuration manager for KiCad integration features.'''
@classmethod
def use_modern_sch_api(cls) -> bool:
'''
Check if modern kicad-sch-api should be used instead of legacy implementation.
Returns:
bool: True if modern API should be used, False for... | 7 | 4 | 10 | 1 | 2 | 6 | 2 | 1.67 | 0 | 2 | 0 | 0 | 0 | 0 | 3 | 3 | 40 | 8 | 12 | 9 | 5 | 20 | 9 | 6 | 5 | 2 | 0 | 0 | 5 |
326,648 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/clean_formatter.py | circuit_synth.kicad.core.clean_formatter.CleanSExprFormatter | from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union
class CleanSExprFormatter:
"""Clean S-expression formatter using rule-based approach."""
def __init__(self, use_tabs: bool=True):
"""Initialize formatter.
Args:
use_tabs: If True, use tabs for indentation (K... |
class CleanSExprFormatter:
'''Clean S-expression formatter using rule-based approach.'''
def __init__(self, use_tabs: bool=True):
'''Initialize formatter.
Args:
use_tabs: If True, use tabs for indentation (KiCad default), else use spaces
'''
pass
def format(sel... | 16 | 16 | 24 | 3 | 13 | 7 | 3 | 0.56 | 0 | 9 | 2 | 0 | 15 | 3 | 15 | 15 | 377 | 65 | 202 | 38 | 186 | 113 | 100 | 38 | 84 | 8 | 0 | 3 | 45 |
326,649 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/clean_formatter.py | circuit_synth.kicad.core.clean_formatter.FormatRule | from dataclasses import dataclass
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union
@dataclass
class FormatRule:
"""Formatting rule for S-expression elements."""
inline: bool = False
max_inline_elements: Optional[int] = None
quote_indices: Set[int] = None
custom_handler: Opt... | @dataclass
class FormatRule:
'''Formatting rule for S-expression elements.'''
def __post_init__(self):
pass | 3 | 1 | 3 | 0 | 3 | 0 | 2 | 0.63 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 11 | 2 | 8 | 6 | 6 | 5 | 8 | 6 | 6 | 2 | 0 | 1 | 2 |
326,650 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/clean_formatter.py | circuit_synth.kicad.core.clean_formatter.FormattingRules | from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union
class FormattingRules:
"""Registry of formatting rules for different S-expression tags."""
def __init__(self):
self.rules = {}
self._initialize_rules()
def _initialize_rules(self):
"""Initialize default form... |
class FormattingRules:
'''Registry of formatting rules for different S-expression tags.'''
def __init__(self):
pass
def _initialize_rules(self):
'''Initialize default formatting rules.'''
pass
def get_rule(self, tag: str) -> FormatRule:
'''Get formatting rule for a ta... | 11 | 10 | 34 | 5 | 20 | 8 | 4 | 0.41 | 0 | 4 | 1 | 0 | 10 | 1 | 10 | 10 | 347 | 62 | 203 | 37 | 192 | 84 | 172 | 37 | 161 | 11 | 0 | 5 | 44 |
326,651 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/s_expression.py | circuit_synth.kicad.core.s_expression.SExpressionParser | import uuid
from pathlib import Path
from .clean_formatter import CleanSExprFormatter
import sexpdata
from .symbol_cache import get_symbol_cache
from typing import Any, Dict, List, Optional, Tuple, Union
from ..core.types import Junction, Label, LabelType, Net, Point, Rectangle, Schematic, SchematicPin, SchematicSymbol... |
class SExpressionParser:
'''
S-expression parser for KiCad schematic files using sexpdata.
This parser handles reading and writing KiCad's S-expression format,
providing conversion between S-expressions and our internal data structures.
'''
def __init__(self):
'''Initialize the parser.... | 27 | 27 | 45 | 5 | 33 | 7 | 6 | 0.23 | 0 | 24 | 10 | 0 | 26 | 1 | 26 | 26 | 1,208 | 166 | 859 | 146 | 830 | 196 | 463 | 142 | 434 | 30 | 0 | 6 | 153 |
326,652 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/symbol_cache.py | circuit_synth.kicad.core.symbol_cache.SymbolDefinition | from .types import Point, SchematicPin
from typing import Any, Dict, List, Optional, Set, Tuple
from dataclasses import dataclass, field
@dataclass
class SymbolDefinition:
"""Definition of a symbol from KiCad library."""
lib_id: str
name: str
reference_prefix: str
description: str = ''
keywords... | @dataclass
class SymbolDefinition:
'''Definition of a symbol from KiCad library.'''
@property
def bounding_box(self) -> Tuple[float, float, float, float]:
'''Calculate bounding box from graphic elements and pins.'''
pass | 4 | 2 | 25 | 4 | 18 | 3 | 6 | 0.13 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 41 | 6 | 31 | 16 | 28 | 4 | 30 | 15 | 28 | 6 | 0 | 3 | 6 |
326,653 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/symbol_cache.py | circuit_synth.kicad.core.symbol_cache.SymbolLibraryCache | import os
from ...kicad.kicad_symbol_parser import parse_kicad_sym_file
import hashlib
from pathlib import Path
from .types import Point, SchematicPin
import json
from typing import Any, Dict, List, Optional, Set, Tuple
class SymbolLibraryCache:
"""
Cache for KiCad symbol libraries.
This class manages loa... |
class SymbolLibraryCache:
'''
Cache for KiCad symbol libraries.
This class manages loading and caching of symbol definitions from KiCad
symbol libraries, providing fast lookup and access to symbol data.
'''
def __init__(self, cache_dir: Optional[Path]=None):
'''
Initialize the ... | 29 | 28 | 35 | 5 | 23 | 7 | 5 | 0.31 | 0 | 15 | 3 | 0 | 27 | 10 | 27 | 27 | 994 | 175 | 629 | 185 | 590 | 198 | 451 | 164 | 416 | 16 | 0 | 6 | 137 |
326,654 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.BoundingBox | from dataclasses import dataclass, field
@dataclass
class BoundingBox:
"""Rectangular bounding box."""
x1: float
y1: float
x2: float
y2: float
def __post_init__(self):
"""Ensure x1,y1 is bottom-left and x2,y2 is top-right."""
self.x1, self.x2 = (min(self.x1, self.x2), max(self.... | @dataclass
class BoundingBox:
'''Rectangular bounding box.'''
def __post_init__(self):
'''Ensure x1,y1 is bottom-left and x2,y2 is top-right.'''
pass
def contains_point(self, x: float, y: float) -> bool:
'''Check if point is within bounding box.'''
pass
def intersects(... | 11 | 7 | 4 | 0 | 3 | 1 | 1 | 0.27 | 0 | 3 | 1 | 0 | 6 | 0 | 6 | 6 | 40 | 7 | 26 | 10 | 16 | 7 | 18 | 7 | 11 | 1 | 0 | 0 | 6 |
326,655 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.ConnectionEdge | from dataclasses import dataclass, field
@dataclass
class ConnectionEdge:
"""Edge in connection graph."""
wire: Wire
start_node: ConnectionNode
end_node: ConnectionNode | @dataclass
class ConnectionEdge:
'''Edge in connection graph.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 1 | 4 | 1 | 3 | 1 | 4 | 1 | 3 | 0 | 0 | 0 | 0 |
326,656 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.ConnectionNode | from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Tuple, Union
@dataclass
class ConnectionNode:
"""Node in connection graph."""
element: Any
element_type: ElementType
position: Point
connections: List['ConnectionEdge'] = field(default_factory=list) | @dataclass
class ConnectionNode:
'''Node in connection graph.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 1 | 5 | 2 | 4 | 2 | 5 | 2 | 4 | 0 | 0 | 0 | 0 |
326,657 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.ElementType | from enum import Enum
class ElementType(Enum):
"""Types of schematic elements."""
COMPONENT = 'symbol'
WIRE = 'wire'
LABEL = 'label'
GLOBAL_LABEL = 'global_label'
HIERARCHICAL_LABEL = 'hierarchical_label'
JUNCTION = 'junction'
NO_CONNECT = 'no_connect'
TEXT = 'text'
SHEET = 'she... |
class ElementType(Enum):
'''Types of schematic elements.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.09 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 13 | 1 | 11 | 11 | 10 | 1 | 11 | 11 | 10 | 0 | 4 | 0 | 0 |
326,658 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.Junction | import uuid
from dataclasses import dataclass, field
@dataclass
class Junction:
"""Junction point where wires meet."""
position: Point
diameter: float = 0.9144
uuid: str = field(default_factory=lambda: str(uuid.uuid4())) | @dataclass
class Junction:
'''Junction point where wires meet.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 1 | 4 | 3 | 3 | 2 | 4 | 3 | 3 | 0 | 0 | 0 | 0 |
326,659 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.Label | import uuid
from typing import Any, Dict, List, Optional, Tuple, Union
from dataclasses import dataclass, field
@dataclass
class Label:
"""Label in schematic."""
text: str
position: Point
label_type: LabelType = LabelType.LOCAL
orientation: int = 0
effects: Optional[Dict[str, Any]] = None
u... | @dataclass
class Label:
'''Label in schematic.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.29 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 1 | 7 | 5 | 6 | 2 | 7 | 5 | 6 | 0 | 0 | 0 | 0 |
326,660 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.LabelType | from enum import Enum
class LabelType(Enum):
"""Types of labels in schematics."""
LOCAL = 'label'
GLOBAL = 'global_label'
HIERARCHICAL = 'hierarchical_label' |
class LabelType(Enum):
'''Types of labels in schematics.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 6 | 1 | 4 | 4 | 3 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
326,661 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.Net | from typing import Any, Dict, List, Optional, Tuple, Union
from dataclasses import dataclass, field
@dataclass
class Net:
"""Electrical net connecting components."""
name: str
nodes: List[Tuple[str, str]] = field(default_factory=list)
def add_node(self, reference: str, pin: str):
"""Add a node... | @dataclass
class Net:
'''Electrical net connecting components.'''
def add_node(self, reference: str, pin: str):
'''Add a node to the net.'''
pass | 3 | 2 | 3 | 0 | 2 | 1 | 1 | 0.6 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 9 | 2 | 5 | 3 | 3 | 3 | 5 | 3 | 3 | 1 | 0 | 0 | 1 |
326,662 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.NetTrace | from typing import Any, Dict, List, Optional, Tuple, Union
from dataclasses import dataclass, field
@dataclass
class NetTrace:
"""Result of tracing a net."""
components: List[SchematicSymbol] = field(default_factory=list)
wires: List[Wire] = field(default_factory=list)
labels: List[Label] = field(defau... | @dataclass
class NetTrace:
'''Result of tracing a net.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.17 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 1 | 6 | 6 | 5 | 1 | 6 | 6 | 5 | 0 | 0 | 0 | 0 |
326,663 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.PlacementStrategy | from enum import Enum
class PlacementStrategy(Enum):
"""Component placement strategies."""
EDGE = 'edge'
GRID = 'grid'
CONTEXTUAL = 'contextual' |
class PlacementStrategy(Enum):
'''Component placement strategies.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 6 | 1 | 4 | 4 | 3 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
326,664 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.Point | from typing import Any, Dict, List, Optional, Tuple, Union
from dataclasses import dataclass, field
@dataclass
class Point:
"""2D point in schematic space."""
x: float
y: float
def __iter__(self):
"""Allow tuple unpacking."""
yield self.x
yield self.y
def __getitem__(self,... | @dataclass
class Point:
'''2D point in schematic space.'''
def __iter__(self):
'''Allow tuple unpacking.'''
pass
def __getitem__(self, index):
'''Allow indexing.'''
pass
def to_tuple(self) -> Tuple[float, float]:
'''Convert to tuple.'''
pass | 5 | 4 | 5 | 0 | 4 | 1 | 2 | 0.27 | 0 | 2 | 0 | 0 | 3 | 0 | 3 | 3 | 23 | 4 | 15 | 4 | 11 | 4 | 13 | 4 | 9 | 3 | 0 | 1 | 5 |
326,665 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.Rectangle | from typing import Any, Dict, List, Optional, Tuple, Union
from dataclasses import dataclass, field
import uuid
@dataclass
class Rectangle:
"""Rectangle graphic element in schematic."""
start: Point
end: Point
stroke_width: float = 0.127
stroke_type: str = 'solid'
fill_type: str = 'none'
st... | @dataclass
class Rectangle:
'''Rectangle graphic element in schematic.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 1 | 8 | 6 | 7 | 2 | 8 | 6 | 7 | 0 | 0 | 0 | 0 |
326,666 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.Schematic | from dataclasses import dataclass, field
import uuid
from typing import Any, Dict, List, Optional, Tuple, Union
@dataclass
class Schematic:
"""Complete schematic representation."""
version: str = '20250114'
generator: str = 'circuit_synth'
uuid: str = field(default_factory=lambda: str(uuid.uuid4()))
... | @dataclass
class Schematic:
'''Complete schematic representation.'''
def get_component(self, reference: str) -> Optional[SchematicSymbol]:
'''Get component by reference.'''
pass
def add_component(self, component: SchematicSymbol):
'''Add component to schematic.'''
pass
... | 10 | 9 | 4 | 0 | 3 | 1 | 2 | 0.24 | 0 | 9 | 6 | 0 | 8 | 0 | 8 | 8 | 62 | 11 | 41 | 28 | 32 | 10 | 41 | 28 | 32 | 3 | 0 | 2 | 12 |
326,667 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.SchematicPin | import uuid
from dataclasses import dataclass, field
@dataclass
class SchematicPin:
"""Pin definition for a component."""
number: str
name: str
type: str
position: Point
orientation: int = 0
length: float = 2.54
@property
def uuid(self) -> str:
"""Generate UUID for pin."""
... | @dataclass
class SchematicPin:
'''Pin definition for a component.'''
@property
def uuid(self) -> str:
'''Generate UUID for pin.'''
pass | 4 | 2 | 3 | 0 | 2 | 1 | 1 | 0.5 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 14 | 2 | 10 | 5 | 7 | 5 | 9 | 4 | 7 | 1 | 0 | 0 | 1 |
326,668 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.SchematicSymbol | from dataclasses import dataclass, field
import uuid
from typing import Any, Dict, List, Optional, Tuple, Union
@dataclass
class SchematicSymbol:
"""Component representation in schematic."""
reference: str
value: str
lib_id: str
position: Point
rotation: float = 0.0
footprint: Optional[str]... | @dataclass
class SchematicSymbol:
'''Component representation in schematic.'''
def get_bounding_box(self) -> BoundingBox:
'''Calculate bounding box for component.'''
pass | 3 | 2 | 10 | 0 | 8 | 3 | 1 | 0.21 | 0 | 2 | 1 | 0 | 1 | 0 | 1 | 1 | 29 | 2 | 24 | 14 | 22 | 5 | 19 | 14 | 17 | 1 | 0 | 0 | 1 |
326,669 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.SearchCriteria | from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Tuple, Union
@dataclass
class SearchCriteria:
"""Criteria for component search."""
reference_pattern: Optional[str] = None
value_pattern: Optional[str] = None
lib_id_pattern: Optional[str] = None
property_filters... | @dataclass
class SearchCriteria:
'''Criteria for component search.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.14 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 1 | 7 | 7 | 6 | 1 | 7 | 7 | 6 | 0 | 0 | 0 | 0 |
326,670 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.SearchResult | from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Tuple, Union
@dataclass
class SearchResult:
"""Result of a search operation."""
components: List[SchematicSymbol] = field(default_factory=list)
wires: List[Wire] = field(default_factory=list)
labels: List[Label] = fi... | @dataclass
class SearchResult:
'''Result of a search operation.'''
@property
def total_count(self) -> int:
'''Get total number of results.'''
pass
def get_all_elements(self) -> List[Any]:
'''Get all elements regardless of type.'''
pass | 5 | 3 | 6 | 0 | 5 | 1 | 1 | 0.2 | 0 | 2 | 0 | 0 | 2 | 0 | 2 | 2 | 21 | 3 | 15 | 8 | 11 | 3 | 9 | 7 | 6 | 1 | 0 | 0 | 2 |
326,671 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.Sheet | from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Tuple, Union
import uuid
@dataclass
class Sheet:
"""Hierarchical sheet in schematic."""
name: str
filename: str
position: Point
size: Tuple[float, float]
pins: List['SheetPin'] = field(default_factory=list)
... | @dataclass
class Sheet:
'''Hierarchical sheet in schematic.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.29 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 1 | 7 | 3 | 6 | 2 | 7 | 3 | 6 | 0 | 0 | 0 | 0 |
326,672 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.SheetPin | from dataclasses import dataclass, field
import uuid
@dataclass
class SheetPin:
"""Pin on a hierarchical sheet."""
name: str
position: Point
orientation: int
shape: str = 'input'
uuid: str = field(default_factory=lambda: str(uuid.uuid4())) | @dataclass
class SheetPin:
'''Pin on a hierarchical sheet.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 1 | 6 | 3 | 5 | 3 | 6 | 3 | 5 | 0 | 0 | 0 | 0 |
326,673 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.SymbolInstance | from dataclasses import dataclass, field
@dataclass
class SymbolInstance:
"""Instance information for a symbol in a specific project/path."""
project: str
path: str
reference: str
unit: int = 1 | @dataclass
class SymbolInstance:
'''Instance information for a symbol in a specific project/path.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 1 | 5 | 2 | 4 | 1 | 5 | 2 | 4 | 0 | 0 | 0 | 0 |
326,674 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.Text | from typing import Any, Dict, List, Optional, Tuple, Union
import uuid
from dataclasses import dataclass, field
@dataclass
class Text:
"""Text annotation in schematic."""
content: str
position: Point
orientation: int = 0
size: float = 1.27
effects: Optional[Dict[str, Any]] = None
uuid: str ... | @dataclass
class Text:
'''Text annotation in schematic.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.43 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 1 | 7 | 5 | 6 | 3 | 7 | 5 | 6 | 0 | 0 | 0 | 0 |
326,675 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.Wire | from typing import Any, Dict, List, Optional, Tuple, Union
from dataclasses import dataclass, field
import uuid
@dataclass
class Wire:
"""Wire connection in schematic."""
points: List[Point]
uuid: str = field(default_factory=lambda: str(uuid.uuid4()))
stroke_width: float = 0.0
stroke_type: str = 'd... | @dataclass
class Wire:
'''Wire connection in schematic.'''
def get_endpoints(self) -> Tuple[Point, Point]:
'''Get start and end points.'''
pass
def contains_point(self, point: Point, tolerance: float=0.01) -> bool:
'''Check if point lies on wire.'''
pass
def _point_on_... | 5 | 4 | 10 | 1 | 6 | 2 | 2 | 0.33 | 0 | 5 | 1 | 0 | 3 | 0 | 3 | 3 | 39 | 7 | 24 | 12 | 20 | 8 | 22 | 12 | 18 | 3 | 0 | 2 | 7 |
326,676 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.WireRoutingStyle | from enum import Enum
class WireRoutingStyle(Enum):
"""Wire routing algorithms."""
DIRECT = 'direct'
MANHATTAN = 'manhattan'
DIAGONAL = 'diagonal' |
class WireRoutingStyle(Enum):
'''Wire routing algorithms.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 6 | 1 | 4 | 4 | 3 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
326,677 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/core/types.py | circuit_synth.kicad.core.types.WireStyle | from enum import Enum
class WireStyle(Enum):
"""Wire update styles for component moves."""
MAINTAIN = 'maintain'
REDRAW = 'redraw'
STRETCH = 'stretch' |
class WireStyle(Enum):
'''Wire update styles for component moves.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 6 | 1 | 4 | 4 | 3 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
326,678 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/io.py | circuit_synth.kicad.io.KiCadFileIO | from typing import Optional, Union
from pathlib import Path
import shutil
class KiCadFileIO:
"""
Pure file I/O operations for KiCad files.
This class handles file system operations without any knowledge of KiCad format.
It provides clean separation between file handling and content manipulation.
"... |
class KiCadFileIO:
'''
Pure file I/O operations for KiCad files.
This class handles file system operations without any knowledge of KiCad format.
It provides clean separation between file handling and content manipulation.
'''
def __init__(self, encoding: str='utf-8', create_backups: bool=True... | 7 | 7 | 22 | 4 | 10 | 8 | 3 | 0.87 | 0 | 5 | 0 | 0 | 6 | 2 | 6 | 6 | 147 | 31 | 62 | 23 | 51 | 54 | 55 | 13 | 48 | 4 | 0 | 3 | 15 |
326,679 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/kicad_symbol_cache.py | circuit_synth.kicad.kicad_symbol_cache.SymbolLibCache | import hashlib
import json
from .kicad_symbol_parser import parse_kicad_sym_file
from pathlib import Path
from typing import Any, Dict, List, Optional
import time
import os
import re
class SymbolLibCache:
"""
Python fallback implementation of SymbolLibCache.
Restored from the original working implementatio... |
class SymbolLibCache:
'''
Python fallback implementation of SymbolLibCache.
Restored from the original working implementation.
'''
def __new__(cls):
pass
def __init__(self):
pass
@classmethod
def _get_cache_dir(cls) -> Path:
'''Get the cache directory for symbo... | 34 | 21 | 22 | 3 | 16 | 5 | 4 | 0.3 | 0 | 14 | 0 | 0 | 13 | 1 | 22 | 22 | 542 | 91 | 361 | 124 | 323 | 109 | 283 | 103 | 258 | 11 | 0 | 6 | 85 |
326,680 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/kicad_symbol_parser.py | circuit_synth.kicad.kicad_symbol_parser.ParseError | class ParseError(Exception):
pass | class ParseError(Exception):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
326,681 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/cache.py | circuit_synth.kicad.library_sourcing.cache.LibraryCache | from .models import ComponentSearchResult, LibrarySource, SearchQuery
import json
from pathlib import Path
from datetime import datetime, timedelta
from typing import Any, Dict, List, Optional
class LibraryCache:
"""File-based cache for component search results"""
def __init__(self, cache_dir: Optional[Path]=... |
class LibraryCache:
'''File-based cache for component search results'''
def __init__(self, cache_dir: Optional[Path]=None):
pass
def get(self, query: SearchQuery) -> Optional[List[ComponentSearchResult]]:
'''Get cached results for query'''
pass
def set(self, query: SearchQuer... | 9 | 8 | 20 | 3 | 15 | 2 | 3 | 0.15 | 0 | 9 | 3 | 0 | 8 | 2 | 8 | 8 | 166 | 31 | 120 | 35 | 111 | 18 | 60 | 30 | 51 | 5 | 0 | 3 | 20 |
326,682 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/command_integration.py | circuit_synth.kicad.library_sourcing.command_integration.EnhancedFootprintFinder | from .orchestrator import LibraryOrchestrator
from .models import ComponentSearchResult, SearchQuery
from typing import Any, Dict, List
class EnhancedFootprintFinder:
"""Enhanced footprint finder with fallback to API sources"""
def __init__(self):
self.orchestrator = LibraryOrchestrator()
async d... |
class EnhancedFootprintFinder:
'''Enhanced footprint finder with fallback to API sources'''
def __init__(self):
pass
async def find_footprints_with_fallback(self, search_term: str) -> Dict[str, Any]:
'''Find footprints with fallback to API sources'''
pass
async def _search_lo... | 4 | 3 | 14 | 2 | 10 | 2 | 2 | 0.27 | 0 | 5 | 2 | 0 | 3 | 1 | 3 | 3 | 48 | 10 | 30 | 13 | 26 | 8 | 22 | 13 | 18 | 4 | 0 | 2 | 7 |
326,683 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/command_integration.py | circuit_synth.kicad.library_sourcing.command_integration.EnhancedSymbolFinder | from .orchestrator import LibraryOrchestrator
from typing import Any, Dict, List
from .models import ComponentSearchResult, SearchQuery
class EnhancedSymbolFinder:
"""Enhanced symbol finder with fallback to API sources"""
def __init__(self):
self.orchestrator = LibraryOrchestrator()
async def fin... |
class EnhancedSymbolFinder:
'''Enhanced symbol finder with fallback to API sources'''
def __init__(self):
pass
async def find_symbols_with_fallback(self, search_term: str) -> Dict[str, Any]:
'''
Find symbols with fallback to API sources
Returns format compatible with exist... | 5 | 4 | 25 | 4 | 16 | 6 | 5 | 0.36 | 0 | 5 | 2 | 0 | 4 | 1 | 4 | 4 | 106 | 20 | 66 | 22 | 61 | 24 | 53 | 22 | 48 | 13 | 0 | 4 | 20 |
326,684 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/config.py | circuit_synth.kicad.library_sourcing.config.LibrarySourceConfig | import json
from pathlib import Path
from typing import Any, Dict, Optional
from .models import LibrarySource, SourceConfig
class LibrarySourceConfig:
"""Manages configuration for library sources"""
def __init__(self, config_dir: Optional[Path]=None):
self.config_dir = config_dir or Path.cwd() / '.cir... |
class LibrarySourceConfig:
'''Manages configuration for library sources'''
def __init__(self, config_dir: Optional[Path]=None):
pass
def _load_or_create_config(self) -> Dict[str, Any]:
'''Load existing config or create default'''
pass
def save_config(self, config: Dict[str, A... | 9 | 8 | 21 | 3 | 17 | 3 | 3 | 0.17 | 0 | 7 | 2 | 0 | 8 | 3 | 8 | 8 | 180 | 31 | 137 | 24 | 128 | 23 | 80 | 21 | 71 | 6 | 0 | 3 | 22 |
326,685 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/converter.py | circuit_synth.kicad.library_sourcing.converter.DigiKeyLibraryConverter | import subprocess
from typing import List, Optional
import shutil
from loguru import logger
from pathlib import Path
class DigiKeyLibraryConverter:
"""Converts DigiKey legacy .lib files to modern .kicad_sym format"""
def __init__(self, digikey_path: Optional[Path]=None):
self.digikey_path = digikey_pa... |
class DigiKeyLibraryConverter:
'''Converts DigiKey legacy .lib files to modern .kicad_sym format'''
def __init__(self, digikey_path: Optional[Path]=None):
pass
def _find_kicad_cli(self) -> Optional[str]:
'''Find kicad-cli executable'''
pass
def is_conversion_needed(self) -> b... | 8 | 7 | 17 | 4 | 12 | 2 | 3 | 0.14 | 0 | 5 | 0 | 0 | 7 | 5 | 7 | 7 | 129 | 33 | 84 | 23 | 76 | 12 | 63 | 22 | 55 | 6 | 0 | 2 | 21 |
326,686 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/models.py | circuit_synth.kicad.library_sourcing.models.ComponentSearchResult | from typing import Any, Dict, List, Optional
from datetime import datetime
from dataclasses import dataclass
@dataclass
class ComponentSearchResult:
"""Result from component search across sources"""
source: LibrarySource
symbol_library: Optional[str] = None
symbol_name: Optional[str] = None
footpri... | @dataclass
class ComponentSearchResult:
'''Result from component search across sources'''
def __post_init__(self):
pass
@property
def symbol_ref(self) -> Optional[str]:
'''Get KiCad symbol reference in LibraryName:SymbolName format'''
pass
@property
def footprint_ref(sel... | 9 | 4 | 5 | 0 | 4 | 1 | 2 | 0.28 | 0 | 2 | 0 | 0 | 4 | 0 | 4 | 4 | 60 | 10 | 40 | 26 | 32 | 11 | 37 | 23 | 32 | 4 | 0 | 1 | 9 |
326,687 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/models.py | circuit_synth.kicad.library_sourcing.models.LibrarySource | from enum import Enum
class LibrarySource(Enum):
"""Available library sources"""
LOCAL_KICAD = 'local_kicad'
DIGIKEY_GITHUB = 'digikey_github'
HTTP_LIBRARY = 'http_library'
SNAPEDA = 'snapeda'
DIGIKEY_API = 'digikey_api'
ULTRA_LIBRARIAN = 'ultra_librarian' |
class LibrarySource(Enum):
'''Available library sources'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.14 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 9 | 1 | 7 | 7 | 6 | 1 | 7 | 7 | 6 | 0 | 4 | 0 | 0 |
326,688 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/models.py | circuit_synth.kicad.library_sourcing.models.SearchQuery | from dataclasses import dataclass
from typing import Any, Dict, List, Optional
@dataclass
class SearchQuery:
"""Search query for component sourcing"""
query: str
component_type: Optional[str] = None
manufacturer: Optional[str] = None
part_number: Optional[str] = None
package: Optional[str] = No... | @dataclass
class SearchQuery:
'''Search query for component sourcing'''
def __post_init__(self):
pass | 3 | 1 | 9 | 0 | 9 | 0 | 2 | 0.3 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 30 | 5 | 20 | 11 | 18 | 6 | 14 | 11 | 12 | 2 | 0 | 1 | 2 |
326,689 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/models.py | circuit_synth.kicad.library_sourcing.models.SourceConfig | from dataclasses import dataclass
from typing import Any, Dict, List, Optional
@dataclass
class SourceConfig:
"""Configuration for a library source"""
source: LibrarySource
enabled: bool = True
priority: int = 1
api_key: Optional[str] = None
access_token: Optional[str] = None
base_url: Opti... | @dataclass
class SourceConfig:
'''Configuration for a library source'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.55 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 5 | 11 | 10 | 10 | 6 | 11 | 10 | 10 | 0 | 0 | 0 | 0 |
326,690 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/models.py | circuit_synth.kicad.library_sourcing.models.SourcePriority | from enum import Enum
class SourcePriority(Enum):
"""Priority levels for library sources"""
LOCAL = 1
DIGIKEY_GITHUB = 2
HTTP = 3
SNAPEDA = 4
DIGIKEY_API = 5
ULTRA = 6 |
class SourcePriority(Enum):
'''Priority levels for library sources'''
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 |
326,691 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/orchestrator.py | circuit_synth.kicad.library_sourcing.orchestrator.LibraryOrchestrator | from typing import Any, Dict, List, Optional
from .sources.digikey_github_modern import DigiKeyGitHubModernSource
import asyncio
from .sources import BaseLibrarySource, DigiKeyGitHubSource, DigiKeySource, HTTPLibrarySource, LocalKiCadSource, SnapEDASource
from loguru import logger
from .models import ComponentSearchRes... |
class LibraryOrchestrator:
'''
Orchestrates component sourcing across multiple KiCad library sources
Implements hybrid approach:
1. Local KiCad libraries (fastest, most reliable)
2. KiCad HTTP libraries (component metadata)
3. Third-party APIs (validation, sourcing, alternatives)
'''
d... | 9 | 8 | 24 | 4 | 15 | 5 | 3 | 0.41 | 0 | 19 | 12 | 0 | 8 | 3 | 8 | 8 | 206 | 40 | 122 | 40 | 105 | 50 | 80 | 31 | 71 | 6 | 0 | 2 | 23 |
326,692 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/sources/base.py | circuit_synth.kicad.library_sourcing.sources.base.BaseLibrarySource | from typing import List, Optional
from ..models import ComponentSearchResult, SearchQuery
from abc import ABC, abstractmethod
class BaseLibrarySource(ABC):
"""Base class for all library sources"""
def __init__(self):
self.last_check: Optional[float] = None
self._available: Optional[bool] = Non... |
class BaseLibrarySource(ABC):
'''Base class for all library sources'''
def __init__(self):
pass
@abstractmethod
async def search(self, query: SearchQuery) -> List[ComponentSearchResult]:
'''Search for components matching the query'''
pass
@abstractmethod
def is_availabl... | 8 | 5 | 5 | 0 | 4 | 1 | 1 | 0.29 | 1 | 6 | 2 | 6 | 5 | 2 | 5 | 25 | 32 | 5 | 21 | 10 | 13 | 6 | 15 | 8 | 9 | 2 | 4 | 1 | 6 |
326,693 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/sources/digikey.py | circuit_synth.kicad.library_sourcing.sources.digikey.DigiKeySource | from .base import BaseLibrarySource
from typing import List, Optional
import aiohttp
import time
from ..models import ComponentSearchResult, LibrarySource, SearchQuery
class DigiKeySource(BaseLibrarySource):
"""Source for DigiKey component API with KiCad library integration"""
def __init__(self, api_key: Opti... |
class DigiKeySource(BaseLibrarySource):
'''Source for DigiKey component API with KiCad library integration'''
def __init__(self, api_key: Optional[str]=None, client_id: Optional[str]=None):
pass
async def search(self, query: SearchQuery) -> List[ComponentSearchResult]:
'''Search DigiKey f... | 9 | 8 | 22 | 4 | 16 | 2 | 3 | 0.14 | 1 | 10 | 3 | 0 | 8 | 5 | 8 | 33 | 185 | 39 | 128 | 41 | 119 | 18 | 85 | 32 | 76 | 5 | 5 | 4 | 27 |
326,694 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/sources/digikey_github.py | circuit_synth.kicad.library_sourcing.sources.digikey_github.DigiKeyGitHubSource | from .base import BaseLibrarySource
import re
from pathlib import Path
import time
from typing import Dict, List, Optional
from ..models import ComponentSearchResult, LibrarySource, SearchQuery
class DigiKeyGitHubSource(BaseLibrarySource):
"""Source for DigiKey's open source KiCad library on GitHub"""
def __i... |
class DigiKeyGitHubSource(BaseLibrarySource):
'''Source for DigiKey's open source KiCad library on GitHub'''
def __init__(self, library_path: Optional[Path]=None):
pass
async def search(self, query: SearchQuery) -> List[ComponentSearchResult]:
'''Search DigiKey GitHub library'''
p... | 12 | 11 | 22 | 4 | 15 | 3 | 4 | 0.2 | 1 | 9 | 3 | 0 | 11 | 4 | 11 | 36 | 254 | 58 | 165 | 57 | 150 | 33 | 114 | 49 | 101 | 10 | 5 | 4 | 47 |
326,695 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/sources/digikey_github_modern.py | circuit_synth.kicad.library_sourcing.sources.digikey_github_modern.DigiKeyGitHubModernSource | from ..converter import DigiKeyLibraryConverter
from .base import BaseLibrarySource
import time
from ..models import ComponentSearchResult, LibrarySource, SearchQuery
import re
from typing import Dict, List, Optional
from pathlib import Path
class DigiKeyGitHubModernSource(BaseLibrarySource):
"""Source for DigiKey... |
class DigiKeyGitHubModernSource(BaseLibrarySource):
'''Source for DigiKey's GitHub library using converted .kicad_sym files'''
def __init__(self, library_path: Optional[Path]=None):
pass
def _ensure_converted(self):
'''Ensure DigiKey library is converted to modern format'''
pass
... | 13 | 12 | 22 | 4 | 15 | 3 | 4 | 0.19 | 1 | 9 | 4 | 0 | 12 | 4 | 12 | 37 | 272 | 64 | 176 | 63 | 160 | 33 | 129 | 55 | 115 | 7 | 5 | 4 | 50 |
326,696 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/sources/http_library.py | circuit_synth.kicad.library_sourcing.sources.http_library.HTTPLibrarySource | from typing import Any, Dict, List, Optional
from pathlib import Path
import aiohttp
import json
import time
from ..models import ComponentSearchResult, LibrarySource, SearchQuery
from .base import BaseLibrarySource
class HTTPLibrarySource(BaseLibrarySource):
"""Source for KiCad HTTP libraries (.kicad_httplib)"""
... |
class HTTPLibrarySource(BaseLibrarySource):
'''Source for KiCad HTTP libraries (.kicad_httplib)'''
def __init__(self):
pass
def _load_http_configs(self) -> List[Dict[str, Any]]:
'''Load HTTP library configurations from .kicad_httplib files'''
pass
def _parse_httplib_config(se... | 9 | 8 | 23 | 4 | 15 | 4 | 4 | 0.26 | 1 | 11 | 3 | 0 | 8 | 2 | 8 | 33 | 191 | 37 | 122 | 48 | 109 | 32 | 90 | 36 | 81 | 7 | 5 | 5 | 30 |
326,697 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/sources/local_kicad.py | circuit_synth.kicad.library_sourcing.sources.local_kicad.LocalKiCadSource | from ..models import ComponentSearchResult, LibrarySource, SearchQuery
import subprocess
from typing import List, Optional
import re
from .base import BaseLibrarySource
import time
from pathlib import Path
class LocalKiCadSource(BaseLibrarySource):
"""Source for local KiCad installation libraries"""
def __ini... |
class LocalKiCadSource(BaseLibrarySource):
'''Source for local KiCad installation libraries'''
def __init__(self):
pass
def _find_symbol_paths(self) -> List[Path]:
'''Find KiCad symbol library paths'''
pass
def _find_footprint_paths(self) -> List[Path]:
'''Find KiCad ... | 10 | 9 | 22 | 4 | 15 | 3 | 4 | 0.22 | 1 | 9 | 3 | 0 | 9 | 3 | 9 | 34 | 211 | 42 | 139 | 60 | 127 | 31 | 92 | 54 | 82 | 7 | 5 | 6 | 37 |
326,698 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/library_sourcing/sources/snapeda.py | circuit_synth.kicad.library_sourcing.sources.snapeda.SnapEDASource | from .base import BaseLibrarySource
from typing import List, Optional
import aiohttp
import time
from ..models import ComponentSearchResult, LibrarySource, SearchQuery
class SnapEDASource(BaseLibrarySource):
"""Source for SnapEDA component library API"""
def __init__(self, api_key: Optional[str]=None):
... |
class SnapEDASource(BaseLibrarySource):
'''Source for SnapEDA component library API'''
def __init__(self, api_key: Optional[str]=None):
pass
async def search(self, query: SearchQuery) -> List[ComponentSearchResult]:
'''Search SnapEDA for components'''
pass
def _parse_snapeda_... | 6 | 5 | 21 | 3 | 16 | 2 | 3 | 0.15 | 1 | 10 | 3 | 0 | 5 | 3 | 5 | 30 | 114 | 22 | 82 | 27 | 76 | 12 | 54 | 21 | 48 | 9 | 5 | 4 | 16 |
326,699 | circuit-synth/circuit-synth | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/src/circuit_synth/kicad/netlist_exporter.py | circuit_synth.kicad.netlist_exporter.PinType | from enum import Enum
class PinType(Enum):
"""
Enumeration of pin types used in Circuit-Synth.
Maps between Circuit-Synth pin types and KiCad pin types.
"""
INPUT = 'input'
OUTPUT = 'output'
BIDIRECTIONAL = 'bidirectional'
POWER_IN = 'power_in'
POWER_OUT = 'power_out'
PASSIVE = ... |
class PinType(Enum):
'''
Enumeration of pin types used in Circuit-Synth.
Maps between Circuit-Synth pin types and KiCad pin types.
'''
@classmethod
def to_kicad(cls, circuit_synth_type: str) -> str:
'''
Convert a Circuit-Synth pin type to KiCad pin type.
Args:
... | 3 | 2 | 30 | 5 | 14 | 11 | 2 | 0.63 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 50 | 46 | 7 | 24 | 12 | 21 | 15 | 15 | 11 | 13 | 2 | 4 | 1 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.