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,800
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/pcb/kicad_cli.py
circuit_synth.pcb.kicad_cli.KiCadCLICommandError
class KiCadCLICommandError(KiCadCLIError): """Raised when a kicad-cli command fails.""" def __init__(self, message: str, return_code: int, stdout: str, stderr: str): super().__init__(message) self.return_code = return_code self.stdout = stdout self.stderr = stderr
class KiCadCLICommandError(KiCadCLIError): '''Raised when a kicad-cli command fails.''' def __init__(self, message: str, return_code: int, stdout: str, stderr: str): pass
2
1
5
0
5
0
1
0.17
1
3
0
0
1
3
1
11
8
1
6
5
4
1
6
5
4
1
4
0
1
326,801
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/pcb/kicad_cli.py
circuit_synth.pcb.kicad_cli.KiCadCLIError
class KiCadCLIError(Exception): """Base exception for KiCad CLI errors.""" pass
class KiCadCLIError(Exception): '''Base exception for KiCad CLI errors.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
2
0
0
0
10
4
1
2
1
1
1
2
1
1
0
3
0
0
326,802
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/pcb/kicad_cli.py
circuit_synth.pcb.kicad_cli.KiCadCLINotFoundError
class KiCadCLINotFoundError(KiCadCLIError): """Raised when kicad-cli executable cannot be found.""" pass
class KiCadCLINotFoundError(KiCadCLIError): '''Raised when kicad-cli executable cannot be found.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
10
4
1
2
1
1
1
2
1
1
0
4
0
0
326,803
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/pcb/pcb_board.py
circuit_synth.pcb.pcb_board.PCBBoard
from .pcb_parser import PCBParser from typing import Any, Dict, List, Optional, Tuple, Union from pathlib import Path from .footprint_library import FootprintInfo, get_footprint_cache from collections import defaultdict import uuid as uuid_module from .types import Arc, Footprint, Line, Net, Pad, Point, Property, Recta...
class PCBBoard: ''' High-level API for creating and manipulating KiCad PCB files. Provides simple methods for common PCB operations like adding, moving, and removing footprints. ''' def __init__(self, filepath: Optional[Union[str, Path]]=None): ''' Initialize a PCB board. ...
68
67
40
5
25
10
5
0.4
0
38
24
0
66
3
66
66
2,736
418
1,669
436
1,475
669
948
326
857
51
0
9
330
326,804
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/pcb/pcb_formatter.py
circuit_synth.pcb.pcb_formatter.PCBFormatter
from typing import Any, List, Union import sexpdata class PCBFormatter: """Custom formatter for PCB S-expressions that handles symbols correctly.""" def __init__(self): self.indent_level = 0 self.indent_str = ' ' def format(self, sexp: Any) -> str: """Format an S-expression to a ...
class PCBFormatter: '''Custom formatter for PCB S-expressions that handles symbols correctly.''' def __init__(self): pass def format(self, sexp: Any) -> str: '''Format an S-expression to a string.''' pass def _format_list(self, lst: List) -> str: '''Format a list S-ex...
5
4
50
4
40
7
6
0.17
0
7
0
0
4
2
4
4
204
18
160
18
155
28
58
18
53
8
0
3
23
326,805
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/pcb/pcb_parser.py
circuit_synth.pcb.pcb_parser.PCBParser
from .types import Arc, Footprint, Layer, Line, Net, Pad, Point, Property, Rectangle, Text, Track, Via, Zone from typing import Any, Dict, List, Optional, Tuple, Union from .pcb_formatter import PCBFormatter from pathlib import Path import sexpdata import uuid class PCBParser: """ Parser for KiCad PCB files. ...
class PCBParser: ''' Parser for KiCad PCB files. Handles reading and writing .kicad_pcb files using S-expressions. ''' def __init__(self): '''Initialize the parser.''' pass def parse_file(self, filepath: Union[str, Path]) -> Dict[str, Any]: ''' Parse a KiCad PC...
37
37
33
5
22
5
7
0.25
0
23
13
0
36
3
36
36
1,228
235
797
261
760
201
668
257
631
29
0
5
246
326,806
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/pcb/placement/base.py
circuit_synth.pcb.placement.base.ComponentWrapper
from ..types import Footprint, Pad, Point from .courtyard_collision import CourtyardCollisionDetector from .bbox import BoundingBox class ComponentWrapper: """Wrapper around footprint with placement-specific methods.""" def __init__(self, *args, **kwargs): """ Initialize ComponentWrapper. ...
class ComponentWrapper: '''Wrapper around footprint with placement-specific methods.''' def __init__(self, *args, **kwargs): ''' Initialize ComponentWrapper. Can be initialized in multiple ways: 1. With a Footprint object: ComponentWrapper(footprint) 2. With positional ...
22
14
17
1
12
4
3
0.29
0
8
4
0
13
4
13
13
248
29
170
55
147
49
110
46
95
18
0
3
42
326,807
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/pcb/placement/base.py
circuit_synth.pcb.placement.base.PlacementAlgorithm
from typing import Dict, List, Optional, Tuple from abc import ABC, abstractmethod from ..types import Footprint, Pad, Point class PlacementAlgorithm(ABC): """Abstract base class for placement algorithms.""" @abstractmethod def place(self, components: List[ComponentWrapper], connections: List[Tuple[str, s...
class PlacementAlgorithm(ABC): '''Abstract base class for placement algorithms.''' @abstractmethod def place(self, components: List[ComponentWrapper], connections: List[Tuple[str, str]], board_width: float=100.0, board_height: float=100.0, **kwargs) -> Dict[str, Point]: ''' Place components...
3
2
22
2
9
11
1
1.09
1
4
2
6
1
0
1
21
26
3
11
10
1
12
3
2
1
1
4
0
1
326,808
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/pcb/placement/bbox.py
circuit_synth.pcb.placement.bbox.BoundingBox
from typing import Optional, Tuple from dataclasses import dataclass @dataclass class BoundingBox: """Represents a 2D bounding box.""" min_x: float min_y: float max_x: float max_y: float def area(self) -> float: """Calculate the area of the bounding box.""" return (self.max_x -...
null
14
12
5
0
4
1
1
0.26
0
3
0
0
10
0
11
11
73
14
47
15
34
12
31
14
19
2
0
1
12
326,809
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/pcb/placement/connection_centric.py
circuit_synth.pcb.placement.connection_centric.ConnectionCentricPlacement
from .courtyard_collision_improved import CourtyardCollisionDetector from typing import Dict, List, Optional, Set, Tuple import math from ..types import Point from .base import ComponentWrapper, PlacementAlgorithm class ConnectionCentricPlacement(PlacementAlgorithm): """ Places components based on connection c...
class ConnectionCentricPlacement(PlacementAlgorithm): ''' Places components based on connection count. Components with the most connections are placed first, and subsequent components are placed to minimize connection length. ''' def __init__(self, min_spacing: float=2.0, use_courtyard: bool=T...
11
11
34
4
24
6
4
0.28
1
10
4
0
10
5
10
31
359
51
241
106
190
68
135
66
124
8
5
4
42
326,810
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/pcb/placement/connection_centric.py
circuit_synth.pcb.placement.connection_centric.ConnectionInfo
from typing import Dict, List, Optional, Set, Tuple from dataclasses import dataclass @dataclass class ConnectionInfo: """Information about a component's connections.""" total: int connected_components: List[str] subcircuit: str
@dataclass class ConnectionInfo: '''Information about a component's connections.''' 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,811
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/pcb/placement/connectivity_driven.py
circuit_synth.pcb.placement.connectivity_driven.ConnectivityDrivenPlacer
import math from .base import ComponentWrapper, PlacementAlgorithm from collections import defaultdict from ..types import Point from typing import Dict, List, Optional, Set, Tuple class ConnectivityDrivenPlacer(PlacementAlgorithm): """ Places components based on connectivity patterns. This algorithm: ...
class ConnectivityDrivenPlacer(PlacementAlgorithm): ''' Places components based on connectivity patterns. This algorithm: 1. Analyzes connectivity to find highly connected component clusters 2. Prioritizes placement of critical nets (power, ground, high-speed) 3. Minimizes total connection leng...
15
14
36
5
25
6
5
0.26
1
11
2
0
13
5
13
34
525
90
346
165
268
90
208
102
193
12
5
7
71
326,812
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/pcb/placement/courtyard_collision.py
circuit_synth.pcb.placement.courtyard_collision.CourtyardCollisionDetector
from ..types import Footprint, Line, Point, Rectangle from typing import List, Optional, Tuple, Union import math class CourtyardCollisionDetector: """ Collision detector that uses actual courtyard geometry from footprints. Supports: - Rectangular courtyards (from fp_rect elements) - Polygonal cou...
class CourtyardCollisionDetector: ''' Collision detector that uses actual courtyard geometry from footprints. Supports: - Rectangular courtyards (from fp_rect elements) - Polygonal courtyards (from connected fp_line segments) - Rotation of footprints - Configurable spacing between courtyard...
17
17
34
5
20
10
4
0.51
0
10
4
0
16
1
16
16
573
96
321
126
278
164
211
101
193
9
0
3
67
326,813
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/pcb/placement/courtyard_collision.py
circuit_synth.pcb.placement.courtyard_collision.Polygon
import math from typing import List, Optional, Tuple, Union from dataclasses import dataclass @dataclass class Polygon: """A 2D polygon represented by its vertices.""" vertices: List[Tuple[float, float]] def __init__(self, vertices: List[Tuple[float, float]]): """Initialize polygon, ensuring verti...
@dataclass class Polygon: '''A 2D polygon represented by its vertices.''' def __init__(self, vertices: List[Tuple[float, float]]): '''Initialize polygon, ensuring vertices are in counter-clockwise order.''' pass def _calculate_signed_area(self) -> float: '''Calculate signed area of...
7
6
11
1
9
2
3
0.2
0
5
0
0
5
0
5
5
65
11
45
25
39
9
45
25
39
7
0
5
15
326,814
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/pcb/placement/courtyard_collision_improved.py
circuit_synth.pcb.placement.courtyard_collision_improved.CourtyardCollisionDetector
from typing import List, Optional, Set, Tuple, Union from ..types import Footprint, Line, Point, Rectangle import math class CourtyardCollisionDetector: """ Improved collision detector with proper polygon-polygon intersection testing. Features: - True polygon-polygon intersection using SAT - Prope...
class CourtyardCollisionDetector: ''' Improved collision detector with proper polygon-polygon intersection testing. Features: - True polygon-polygon intersection using SAT - Proper handling of KiCad's inverted Y axis - Support for expanded polygons (spacing) - Efficient broad-phase collisio...
11
11
33
6
20
8
4
0.46
0
7
3
0
10
2
10
10
349
70
197
91
174
90
156
81
143
9
0
4
43
326,815
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/pcb/placement/courtyard_collision_improved.py
circuit_synth.pcb.placement.courtyard_collision_improved.Polygon
from typing import List, Optional, Set, Tuple, Union import math from dataclasses import dataclass @dataclass class Polygon: """A 2D polygon represented by its vertices.""" vertices: List[Tuple[float, float]] def __init__(self, vertices: List[Tuple[float, float]]): """Initialize polygon, ensuring ...
@dataclass class Polygon: '''A 2D polygon represented by its vertices.''' def __init__(self, vertices: List[Tuple[float, float]]): '''Initialize polygon, ensuring vertices are in counter-clockwise order.''' pass def _calculate_signed_area(self) -> float: '''Calculate signed area of...
12
11
17
2
11
4
3
0.33
0
6
1
0
10
0
10
10
180
31
113
67
102
37
111
67
100
7
0
5
30
326,816
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/pcb/placement/courtyard_collision_improved.py
circuit_synth.pcb.placement.courtyard_collision_improved.Vector2D
from dataclasses import dataclass @dataclass class Vector2D: """2D vector for geometric calculations.""" x: float y: float def __sub__(self, other: 'Vector2D') -> 'Vector2D': return Vector2D(self.x - other.x, self.y - other.y) def dot(self, other: 'Vector2D') -> float: return self...
@dataclass class Vector2D: '''2D vector for geometric calculations.''' def __sub__(self, other: 'Vector2D') -> 'Vector2D': pass def dot(self, other: 'Vector2D') -> float: pass def perp_dot(self, other: 'Vector2D') -> float: '''Perpendicular dot product (2D cross product).''' ...
5
2
2
0
2
0
1
0.22
0
1
0
0
3
0
3
3
15
4
9
4
5
2
9
4
5
1
0
0
3
326,817
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/pcb/placement/force_directed.py
circuit_synth.pcb.placement.force_directed.Edge
from dataclasses import dataclass @dataclass class Edge: """Represents a connection between components.""" source: str target: str weight: float = 1.0
@dataclass class Edge: '''Represents a connection between components.''' pass
2
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
6
1
4
2
3
4
4
2
3
0
0
0
0
326,818
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/pcb/placement/force_directed.py
circuit_synth.pcb.placement.force_directed.ForceDirectedPlacer
import math from typing import Dict, List, Optional, Set, Tuple from ..types import Footprint, Point from .base import ComponentWrapper, PlacementAlgorithm class ForceDirectedPlacer(PlacementAlgorithm): """ Force-directed placement algorithm for PCB components. This algorithm simulates physical forces bet...
class ForceDirectedPlacer(PlacementAlgorithm): ''' Force-directed placement algorithm for PCB components. This algorithm simulates physical forces between components: - Connected components attract each other (spring forces) - All components repel each other (electrostatic forces) - Components ...
12
12
24
3
14
6
3
0.47
1
12
5
0
11
11
11
32
281
50
159
84
131
74
131
68
119
6
5
3
37
326,819
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/pcb/placement/force_directed.py
circuit_synth.pcb.placement.force_directed.Node
from .base import ComponentWrapper, PlacementAlgorithm from dataclasses import dataclass @dataclass class Node: """Represents a component in the force-directed graph.""" component: ComponentWrapper x: float y: float vx: float = 0.0 vy: float = 0.0 fx: float = 0.0 fy: float = 0.0 loc...
@dataclass class Node: '''Represents a component in the force-directed graph.''' @property def reference(self) -> str: pass
4
1
2
0
2
0
1
0.42
0
1
0
0
1
0
1
1
15
2
12
8
9
5
11
7
9
1
0
0
1
326,820
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/pcb/placement/force_directed_placement_fixed.py
circuit_synth.pcb.placement.force_directed_placement_fixed.Force
from dataclasses import dataclass import math @dataclass class Force: """2D force vector.""" fx: float fy: float def __add__(self, other: 'Force') -> 'Force': return Force(self.fx + other.fx, self.fy + other.fy) def __mul__(self, scalar: float) -> 'Force': return Force(self.fx * s...
@dataclass class Force: '''2D force vector.''' def __add__(self, other: 'Force') -> 'Force': pass def __mul__(self, scalar: float) -> 'Force': pass def magnitude(self) -> float: pass
5
1
2
0
2
0
1
0.11
0
1
0
0
3
0
3
3
14
4
9
4
5
1
9
4
5
1
0
0
3
326,821
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/pcb/placement/force_directed_placement_fixed.py
circuit_synth.pcb.placement.force_directed_placement_fixed.ForceDirectedPlacement
from .courtyard_collision_improved import CourtyardCollisionDetector import math from ..types import Footprint, Point from .bbox import BoundingBox from typing import Dict, List, Optional, Set, Tuple from .base import ComponentWrapper, PlacementAlgorithm class ForceDirectedPlacement(PlacementAlgorithm): """ Fo...
null
20
19
37
6
24
7
5
0.32
1
15
7
0
19
10
19
40
728
133
459
208
383
146
325
154
302
12
5
5
94
326,822
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/pcb/placement/force_directed_placement_fixed.py
circuit_synth.pcb.placement.force_directed_placement_fixed.SubcircuitGroup
from dataclasses import dataclass from .bbox import BoundingBox from ..types import Footprint, Point from typing import Dict, List, Optional, Set, Tuple @dataclass class SubcircuitGroup: """Group of components belonging to the same subcircuit.""" path: str components: List[Footprint] center: Point ...
@dataclass class SubcircuitGroup: '''Group of components belonging to the same subcircuit.''' pass
2
1
0
0
0
0
0
0.33
0
0
0
0
0
0
0
0
8
1
6
1
5
2
6
1
5
0
0
0
0
326,823
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/pcb/placement/grouping.py
circuit_synth.pcb.placement.grouping.ComponentGroup
from typing import Dict, List from .bbox import BoundingBox from .base import ComponentWrapper class ComponentGroup(list): """Group of components at the same hierarchical level.""" def __init__(self, components: List[ComponentWrapper]=None): super().__init__(components or []) self._hierarchica...
null
15
9
7
1
4
2
2
0.42
1
6
2
0
9
1
9
42
79
15
45
26
30
19
39
21
29
4
2
2
16
326,824
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/pcb/placement/hierarchical_placement.py
circuit_synth.pcb.placement.hierarchical_placement.HierarchicalPlacer
from typing import Dict, List, Optional, Tuple from ..types import Footprint, Point from .base import ComponentWrapper, PlacementAlgorithm from .bbox import BoundingBox from .grouping import ComponentGroup, group_by_hierarchy, group_groups class HierarchicalPlacer(PlacementAlgorithm): """ Implements hierarchic...
class HierarchicalPlacer(PlacementAlgorithm): ''' Implements hierarchical placement of PCB components. Components are grouped by their hierarchical path and packed using a greedy algorithm that places larger components first. ''' def __init__(self, component_spacing: float=0.5, group_spacing: ...
17
17
24
3
14
7
3
0.49
1
8
5
1
16
3
16
37
402
69
232
95
198
113
170
78
153
14
5
6
55
326,825
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/pcb/placement/hierarchical_placement_v2.py
circuit_synth.pcb.placement.hierarchical_placement_v2.HierarchicalPlacerV2
from typing import Dict, List, Optional, Tuple from .courtyard_collision import CourtyardCollisionDetector, Polygon from .base import ComponentWrapper, PlacementAlgorithm from .grouping import ComponentGroup, group_by_hierarchy, group_groups from .bbox import BoundingBox from ..types import Footprint, Point class Hier...
class HierarchicalPlacerV2(PlacementAlgorithm): ''' Implements hierarchical placement of PCB components with courtyard collision detection. Components are grouped by their hierarchical path and packed using a greedy algorithm that places larger components first. Uses actual courtyard geometry for a...
17
17
23
3
15
6
3
0.43
1
10
7
0
16
7
16
37
399
67
244
96
205
104
157
74
140
9
5
4
48
326,826
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/pcb/placement/spiral_hierarchical_placement.py
circuit_synth.pcb.placement.spiral_hierarchical_placement.SpiralHierarchicalPlacer
from typing import Dict, List, Optional, Tuple import math from ..types import Footprint, Point from .base import ComponentWrapper, PlacementAlgorithm from .hierarchical_placement import HierarchicalPlacer class SpiralHierarchicalPlacer(HierarchicalPlacer): """ Improved hierarchical placement using spiral sear...
class SpiralHierarchicalPlacer(HierarchicalPlacer): ''' Improved hierarchical placement using spiral search for optimal positions. This algorithm: 1. Groups components by hierarchy (like the original) 2. Uses connection information to calculate ideal positions 3. Searches in a spiral pattern fr...
10
10
29
4
16
9
4
0.62
1
6
2
0
9
4
9
46
278
44
149
61
120
92
112
42
102
9
6
3
34
326,827
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/pcb/placement/spiral_placement.py
circuit_synth.pcb.placement.spiral_placement.PlacementResult
from dataclasses import dataclass @dataclass class PlacementResult: """Result of a placement operation.""" success: bool x: float = 0.0 y: float = 0.0 rotation: float = 0.0
@dataclass class PlacementResult: '''Result of a placement operation.''' pass
2
1
0
0
0
0
0
0.2
0
0
0
0
0
0
0
0
7
1
5
4
4
1
5
4
4
0
0
0
0
326,828
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/pcb/placement/spiral_placement.py
circuit_synth.pcb.placement.spiral_placement.SpiralPlacer
from typing import Any, Dict, List, Optional import math class SpiralPlacer: """ Spiral search pattern for finding valid component positions. Simplified implementation without dependencies on removed kicad_api.pcb modules. """ def __init__(self, center_x: float=0.0, center_y: float=0.0): ...
class SpiralPlacer: ''' Spiral search pattern for finding valid component positions. Simplified implementation without dependencies on removed kicad_api.pcb modules. ''' def __init__(self, center_x: float=0.0, center_y: float=0.0): pass def find_placement(self, component: Any, existin...
4
3
14
2
8
4
2
0.65
0
7
1
0
3
2
3
3
52
11
26
20
20
17
24
18
20
3
0
2
7
326,829
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/pcb/placement/spiral_placement_v2.py
circuit_synth.pcb.placement.spiral_placement_v2.BoundingBox
from typing import Dict, List, NamedTuple, Optional, Set, Tuple class BoundingBox(NamedTuple): x: float y: float width: float height: float
class BoundingBox(NamedTuple): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
5
0
5
1
4
0
5
1
4
0
1
0
0
326,830
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/pcb/placement/spiral_placement_v2.py
circuit_synth.pcb.placement.spiral_placement_v2.ConnectionInfo
from typing import Dict, List, NamedTuple, Optional, Set, Tuple from dataclasses import dataclass @dataclass class ConnectionInfo: """Information about component connections.""" component_ref: str connected_refs: Set[str] connection_count: int
@dataclass class ConnectionInfo: '''Information about component connections.''' 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,831
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/pcb/placement/spiral_placement_v2.py
circuit_synth.pcb.placement.spiral_placement_v2.PlacementResult
from dataclasses import dataclass @dataclass class PlacementResult: """Result of a placement operation.""" success: bool message: str = ''
@dataclass class PlacementResult: '''Result of a placement operation.''' pass
2
1
0
0
0
0
0
0.33
0
0
0
0
0
0
0
0
5
1
3
2
2
1
3
2
2
0
0
0
0
326,832
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/pcb/placement/spiral_placement_v2.py
circuit_synth.pcb.placement.spiral_placement_v2.SpiralPlacementAlgorithmV2
from circuit_synth.pcb.types import Footprint, Point from typing import Dict, List, NamedTuple, Optional, Set, Tuple class SpiralPlacementAlgorithmV2: """ Placement algorithm using spiral search patterns with courtyard collision detection. This algorithm: 1. Places components based on their connection...
class SpiralPlacementAlgorithmV2: ''' Placement algorithm using spiral search patterns with courtyard collision detection. This algorithm: 1. Places components based on their connections 2. Uses a spiral search pattern to find valid positions 3. Keeps connected components close together 4. ...
7
7
40
5
26
9
3
0.38
0
10
5
0
6
6
6
6
255
38
158
57
131
60
77
37
70
6
0
2
19
326,833
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/pcb/ratsnest_generator.py
circuit_synth.pcb.ratsnest_generator.PadInfo
from typing import Any, Dict, List, Optional, Set, Tuple from dataclasses import dataclass @dataclass class PadInfo: """Information about a pad for ratsnest calculations.""" reference: str pad_number: str net_number: int net_name: str position: Tuple[float, float] layer: str
@dataclass class PadInfo: '''Information about a pad for ratsnest calculations.''' pass
2
1
0
0
0
0
0
0.14
0
0
0
0
0
0
0
0
9
1
7
1
6
1
7
1
6
0
0
0
0
326,834
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/pcb/ratsnest_generator.py
circuit_synth.pcb.ratsnest_generator.RatsnestConnection
from dataclasses import dataclass @dataclass class RatsnestConnection: """Represents a ratsnest connection between two pads.""" from_pad: PadInfo to_pad: PadInfo length: float net_number: int net_name: str
@dataclass class RatsnestConnection: '''Represents a ratsnest connection between two pads.''' pass
2
1
0
0
0
0
0
0.17
0
0
0
0
0
0
0
0
8
1
6
1
5
1
6
1
5
0
0
0
0
326,835
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/pcb/ratsnest_generator.py
circuit_synth.pcb.ratsnest_generator.RatsnestGenerator
from typing import Any, Dict, List, Optional, Set, Tuple import math from collections import defaultdict class RatsnestGenerator: """ Generates ratsnest connections for PCB designs. The ratsnest shows unrouted connections between pads that belong to the same net, helping designers understand the requi...
class RatsnestGenerator: ''' Generates ratsnest connections for PCB designs. The ratsnest shows unrouted connections between pads that belong to the same net, helping designers understand the required routing topology. ''' def __init__(self): '''Initialize the ratsnest generator.''' ...
11
11
35
7
21
8
4
0.41
0
10
2
0
10
2
10
10
366
77
206
91
178
85
144
75
132
10
0
4
41
326,836
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/pcb/routing/dsn_exporter.py
circuit_synth.pcb.routing.dsn_exporter.DSNComponent
from typing import Any, Dict, List, Optional, Set, Tuple from dataclasses import dataclass @dataclass class DSNComponent: """Represents a component in DSN format.""" name: str footprint_name: str x: float y: float rotation: float side: str pads: List[DSNPad]
@dataclass class DSNComponent: '''Represents a component in DSN format.''' pass
2
1
0
0
0
0
0
0.5
0
0
0
0
0
0
0
0
10
1
8
1
7
4
8
1
7
0
0
0
0
326,837
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/pcb/routing/dsn_exporter.py
circuit_synth.pcb.routing.dsn_exporter.DSNExporter
from pathlib import Path from ..types import Arc, Footprint, Layer, Line, Net, Pad, Point import math from typing import Any, Dict, List, Optional, Set, Tuple from ..pcb_board import PCBBoard class DSNExporter: """ Exports KiCad PCB files to Specctra DSN format for auto-routing. """ LAYER_MAP = {'F.Cu'...
class DSNExporter: ''' Exports KiCad PCB files to Specctra DSN format for auto-routing. ''' def __init__(self, pcb_board: PCBBoard): ''' Initialize the DSN exporter. Args: pcb_board: The PCBBoard instance to export ''' pass def export(self, outp...
17
17
39
5
28
7
5
0.27
0
11
5
0
16
5
16
16
662
98
456
107
435
125
307
102
290
15
0
6
82
326,838
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/pcb/routing/dsn_exporter.py
circuit_synth.pcb.routing.dsn_exporter.DSNLayer
from dataclasses import dataclass @dataclass class DSNLayer: """Represents a layer in DSN format.""" name: str type: str direction: str
@dataclass class DSNLayer: '''Represents a layer in DSN format.''' pass
2
1
0
0
0
0
0
0.75
0
0
0
0
0
0
0
0
6
1
4
1
3
3
4
1
3
0
0
0
0
326,839
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/pcb/routing/dsn_exporter.py
circuit_synth.pcb.routing.dsn_exporter.DSNPad
from typing import Any, Dict, List, Optional, Set, Tuple from dataclasses import dataclass @dataclass class DSNPad: """Represents a pad in DSN format.""" name: str number: str x: float y: float shape: str size: Tuple[float, float] rotation: float = 0.0 drill: Optional[float] = None
@dataclass class DSNPad: '''Represents a pad in DSN format.''' pass
2
1
0
0
0
0
0
0.44
0
0
0
0
0
0
0
0
11
1
9
3
8
4
9
3
8
0
0
0
0
326,840
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/pcb/routing/freerouting_docker.py
circuit_synth.pcb.routing.freerouting_docker.FreeroutingDocker
from pathlib import Path import subprocess from typing import Optional, Tuple import os class FreeroutingDocker: """Runs Freerouting using Docker container""" DOCKER_IMAGE = 'ghcr.io/freerouting/freerouting:nightly' def __init__(self): """Initialize Docker-based Freerouting runner""" self....
class FreeroutingDocker: '''Runs Freerouting using Docker container''' def __init__(self): '''Initialize Docker-based Freerouting runner''' pass def _check_docker(self) -> bool: '''Check if Docker is available''' pass def route(self, dsn_file: str, output_file: Option...
4
4
56
6
42
10
8
0.24
0
8
0
0
3
1
3
3
176
22
128
28
118
31
84
20
80
21
0
7
25
326,841
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/pcb/routing/freerouting_runner.py
circuit_synth.pcb.routing.freerouting_runner.FreeroutingConfig
from dataclasses import dataclass, field from typing import Any, Callable, Dict, Optional, Tuple @dataclass class FreeroutingConfig: """Configuration options for Freerouting""" java_path: str = 'java' freerouting_jar: Optional[str] = None effort: RoutingEffort = RoutingEffort.MEDIUM optimization_pa...
@dataclass class FreeroutingConfig: '''Configuration options for Freerouting''' pass
2
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
20
4
11
11
10
11
11
11
10
0
0
0
0
326,842
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/pcb/routing/freerouting_runner.py
circuit_synth.pcb.routing.freerouting_runner.FreeroutingRunner
from typing import Any, Callable, Dict, Optional, Tuple import threading from pathlib import Path import subprocess import os import time import re class FreeroutingRunner: """Manages Freerouting subprocess execution""" DEFAULT_JAR_LOCATIONS = ['./freerouting.jar', './Freerouting.jar', '~/freerouting/freerouti...
class FreeroutingRunner: '''Manages Freerouting subprocess execution''' def __init__(self, config: Optional[FreeroutingConfig]=None): ''' Initialize Freerouting runner Args: config: Configuration options (uses defaults if None) ''' pass def _find_freero...
10
10
29
4
19
6
5
0.35
0
15
2
0
9
6
9
9
288
46
183
35
171
64
139
31
129
17
0
4
48
326,843
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/pcb/routing/freerouting_runner.py
circuit_synth.pcb.routing.freerouting_runner.RoutingEffort
from enum import Enum class RoutingEffort(Enum): """Routing effort levels for Freerouting""" FAST = 'fast' MEDIUM = 'medium' HIGH = 'high'
class RoutingEffort(Enum): '''Routing effort levels for Freerouting''' 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,844
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/pcb/routing/ses_importer.py
circuit_synth.pcb.routing.ses_importer.RoutingSession
from dataclasses import dataclass, field from typing import Any, Dict, List, Optional, Tuple @dataclass class RoutingSession: """Contains all routing data from a SES file.""" wires: List[Wire] = field(default_factory=list) vias: List[SESVia] = field(default_factory=list) resolution: float = 1.0 uni...
@dataclass class RoutingSession: '''Contains all routing data from a SES file.''' def add_wire(self, wire: Wire): '''Add a wire to the session.''' pass def add_via(self, via: SESVia): '''Add a via to the session.''' pass
4
3
3
0
2
1
1
0.33
0
2
2
0
2
0
2
2
15
3
9
7
6
3
9
7
6
1
0
0
2
326,845
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/pcb/routing/ses_importer.py
circuit_synth.pcb.routing.ses_importer.SESImporter
from ..pcb_parser import PCBParser from ..types import Point, Track, Via import re from typing import Any, Dict, List, Optional, Tuple from pathlib import Path class SESImporter: """Imports SES routing data into KiCad PCB files.""" LAYER_MAP = {'F.Cu': 'F.Cu', 'B.Cu': 'B.Cu', 'In1.Cu': 'In1.Cu', 'In2.Cu': 'In2...
class SESImporter: '''Imports SES routing data into KiCad PCB files.''' def __init__(self, pcb_file: str, ses_file: str): ''' Initialize the SES importer. Args: pcb_file: Path to the original KiCad PCB file ses_file: Path to the SES file with routing data ...
7
7
27
5
15
8
3
0.45
0
11
7
0
6
5
6
6
193
36
112
36
105
50
79
36
72
6
0
2
20
326,846
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/pcb/routing/ses_importer.py
circuit_synth.pcb.routing.ses_importer.SESParser
from pathlib import Path import re class SESParser: """Parser for Specctra Session (SES) files.""" def __init__(self, ses_file: str): """ Initialize the SES parser. Args: ses_file: Path to the SES file """ self.ses_file = Path(ses_file) self.content...
class SESParser: '''Parser for Specctra Session (SES) files.''' def __init__(self, ses_file: str): ''' Initialize the SES parser. Args: ses_file: Path to the SES file ''' pass def parse(self) -> RoutingSession: ''' Parse the SES file and...
8
8
38
5
27
7
5
0.25
0
7
3
0
7
5
7
7
276
44
187
52
179
47
143
51
135
21
0
4
37
326,847
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/pcb/routing/ses_importer.py
circuit_synth.pcb.routing.ses_importer.SESVia
from typing import Any, Dict, List, Optional, Tuple from dataclasses import dataclass, field @dataclass class SESVia: """Represents a via from SES file.""" net_name: str position: Tuple[float, float] padstack: str layers: List[str] = field(default_factory=list)
@dataclass class SESVia: '''Represents a via from SES file.''' 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,848
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/pcb/routing/ses_importer.py
circuit_synth.pcb.routing.ses_importer.Wire
from typing import Any, Dict, List, Optional, Tuple from dataclasses import dataclass, field @dataclass class Wire: """Represents a routed wire segment.""" net_name: str layer: str width: float points: List[Tuple[float, float]] wire_type: str = 'route'
@dataclass class Wire: '''Represents a routed wire segment.''' pass
2
1
0
0
0
0
0
0.33
0
0
0
0
0
0
0
0
8
1
6
2
5
2
6
2
5
0
0
0
0
326,849
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/pcb/types.py
circuit_synth.pcb.types.Arc
from dataclasses import dataclass, field @dataclass class Arc: """Graphical arc on PCB.""" start: Point mid: Point end: Point layer: str width: float = 0.1 type: str = 'solid' uuid: str = ''
@dataclass class Arc: '''Graphical arc on PCB.''' pass
2
1
0
0
0
0
0
0.13
0
0
0
0
0
0
0
0
10
1
8
4
7
1
8
4
7
0
0
0
0
326,850
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/pcb/types.py
circuit_synth.pcb.types.Footprint
from dataclasses import dataclass, field from typing import Any, Dict, List, Optional, Tuple, Union @dataclass class Footprint: """PCB footprint (component physical representation).""" library: str name: str position: Point rotation: float = 0.0 layer: str = 'F.Cu' reference: str = '' v...
@dataclass class Footprint: '''PCB footprint (component physical representation).''' def get_library_id(self) -> str: '''Get the full library ID (library:name).''' pass def get_property(self, name: str) -> Optional[Property]: '''Get a property by name.''' pass def set_...
5
4
6
0
5
1
2
0.45
0
3
2
0
3
0
3
3
61
9
42
29
38
19
39
29
35
3
0
2
6
326,851
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/pcb/types.py
circuit_synth.pcb.types.Layer
from enum import Enum class Layer(Enum): """PCB layer definitions.""" F_Cu = 'F.Cu' B_Cu = 'B.Cu' F_Adhes = 'F.Adhes' B_Adhes = 'B.Adhes' F_Paste = 'F.Paste' B_Paste = 'B.Paste' F_SilkS = 'F.SilkS' B_SilkS = 'B.SilkS' F_Mask = 'F.Mask' B_Mask = 'B.Mask' Dwgs_User = 'Dwgs...
class Layer(Enum): '''PCB layer definitions.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
49
23
1
21
21
20
21
21
21
20
0
4
0
0
326,852
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/pcb/types.py
circuit_synth.pcb.types.Line
from dataclasses import dataclass, field @dataclass class Line: """Graphical line on PCB.""" start: Point end: Point layer: str width: float = 0.1 type: str = 'solid' uuid: str = ''
@dataclass class Line: '''Graphical line on PCB.''' pass
2
1
0
0
0
0
0
0.14
0
0
0
0
0
0
0
0
9
1
7
4
6
1
7
4
6
0
0
0
0
326,853
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/pcb/types.py
circuit_synth.pcb.types.Net
from dataclasses import dataclass, field @dataclass class Net: """PCB net definition.""" number: int name: str
@dataclass class Net: '''PCB net definition.''' pass
2
1
0
0
0
0
0
0.33
0
0
0
0
0
0
0
0
5
1
3
1
2
1
3
1
2
0
0
0
0
326,854
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/pcb/types.py
circuit_synth.pcb.types.Pad
from typing import Any, Dict, List, Optional, Tuple, Union from dataclasses import dataclass, field @dataclass class Pad: """PCB pad definition.""" number: str type: str shape: str position: Point size: Tuple[float, float] rotation: float = 0.0 layers: List[str] = field(default_factory=...
@dataclass class Pad: '''PCB pad definition.''' pass
2
1
0
0
0
0
0
0.5
0
0
0
0
0
0
0
0
22
1
20
11
19
10
16
11
15
0
0
0
0
326,855
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/pcb/types.py
circuit_synth.pcb.types.Point
from dataclasses import dataclass, field @dataclass class Point: """2D point in PCB coordinates.""" x: float y: float def __repr__(self): return f'Point({self.x}, {self.y})'
@dataclass class Point: '''2D point in PCB coordinates.''' def __repr__(self): pass
3
1
2
0
2
0
1
0.2
0
0
0
0
1
0
1
1
8
2
5
2
3
1
5
2
3
1
0
0
1
326,856
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/pcb/types.py
circuit_synth.pcb.types.Property
from dataclasses import dataclass, field from typing import Any, Dict, List, Optional, Tuple, Union @dataclass class Property: """Footprint property (Reference, Value, etc.).""" name: str value: str position: Point layer: str size: Tuple[float, float] = (1.0, 1.0) thickness: float = 0.15 ...
@dataclass class Property: '''Footprint property (Reference, Value, etc.).''' pass
2
1
0
0
0
0
0
0.22
0
0
0
0
0
0
0
0
11
1
9
5
8
2
9
5
8
0
0
0
0
326,857
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/pcb/types.py
circuit_synth.pcb.types.Rectangle
from dataclasses import dataclass, field @dataclass class Rectangle: """PCB rectangle graphic definition.""" start: Point end: Point layer: str width: float = 0.05 fill: bool = False uuid: str = ''
@dataclass class Rectangle: '''PCB rectangle graphic definition.''' pass
2
1
0
0
0
0
0
0.14
0
0
0
0
0
0
0
0
9
1
7
4
6
1
7
4
6
0
0
0
0
326,858
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/pcb/types.py
circuit_synth.pcb.types.Text
from typing import Any, Dict, List, Optional, Tuple, Union from dataclasses import dataclass, field @dataclass class Text: """Text on PCB.""" text: str position: Point layer: str size: Tuple[float, float] = (1.0, 1.0) thickness: float = 0.15 effects: Dict[str, Any] = field(default_factory=d...
@dataclass class Text: '''Text on PCB.''' pass
2
1
0
0
0
0
0
0.13
0
0
0
0
0
0
0
0
10
1
8
5
7
1
8
5
7
0
0
0
0
326,859
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/pcb/types.py
circuit_synth.pcb.types.Track
from typing import Any, Dict, List, Optional, Tuple, Union from dataclasses import dataclass, field @dataclass class Track: """PCB track (trace) definition.""" start: Point end: Point width: float layer: str net: Optional[int] = None net_name: Optional[str] = None uuid: str = ''
@dataclass class Track: '''PCB track (trace) definition.''' pass
2
1
0
0
0
0
0
0.13
0
0
0
0
0
0
0
0
10
1
8
4
7
1
8
4
7
0
0
0
0
326,860
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/pcb/types.py
circuit_synth.pcb.types.Via
from typing import Any, Dict, List, Optional, Tuple, Union from dataclasses import dataclass, field @dataclass class Via: """PCB via definition.""" position: Point size: float drill: float layers: List[str] net: Optional[int] = None uuid: str = ''
@dataclass class Via: '''PCB via definition.''' pass
2
1
0
0
0
0
0
0.14
0
0
0
0
0
0
0
0
9
1
7
3
6
1
7
3
6
0
0
0
0
326,861
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/pcb/types.py
circuit_synth.pcb.types.Zone
from typing import Any, Dict, List, Optional, Tuple, Union from dataclasses import dataclass, field @dataclass class Zone: """PCB zone (copper pour area).""" layer: str net: Optional[int] = None net_name: Optional[str] = None priority: int = 0 connect_pads: str = 'yes' min_thickness: float ...
@dataclass class Zone: '''PCB zone (copper pour area).''' pass
2
1
0
0
0
0
0
0.22
0
0
0
0
0
0
0
0
20
1
18
17
17
4
18
17
17
0
0
0
0
326,862
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/pcb/validation.py
circuit_synth.pcb.validation.ValidationIssue
from .types import Footprint, Pad, Point, Track, Via, Zone from dataclasses import dataclass, field from typing import Any, Dict, List, Optional, Set, Tuple @dataclass class ValidationIssue: """Represents a single validation issue.""" severity: ValidationSeverity category: str message: str location...
@dataclass class ValidationIssue: '''Represents a single validation issue.''' def __str__(self) -> str: '''String representation of the issue.''' pass
3
2
11
0
10
1
3
0.13
0
1
0
0
1
0
1
1
20
2
16
6
14
2
10
6
8
3
0
0
3
326,863
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/pcb/validation.py
circuit_synth.pcb.validation.ValidationResult
from dataclasses import dataclass, field from typing import Any, Dict, List, Optional, Set, Tuple from .types import Footprint, Pad, Point, Track, Via, Zone @dataclass class ValidationResult: """Results of PCB validation.""" issues: List[ValidationIssue] = field(default_factory=list) @property def is_...
@dataclass class ValidationResult: '''Results of PCB validation.''' @property def is_valid(self) -> bool: '''Check if there are no errors.''' pass @property def error_count(self) -> int: '''Count of error-level issues.''' pass @property def warning_count(self)...
14
9
12
0
11
1
1
0.1
0
6
3
0
8
0
8
8
111
10
92
36
61
9
26
11
17
4
0
2
11
326,864
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/pcb/validation.py
circuit_synth.pcb.validation.ValidationSeverity
from enum import Enum class ValidationSeverity(Enum): """Severity levels for validation issues.""" ERROR = 'error' WARNING = 'warning' INFO = 'info'
class ValidationSeverity(Enum): '''Severity levels for validation issues.''' 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,865
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/quality_assurance/circuit_parser.py
circuit_synth.quality_assurance.circuit_parser.CircuitSynthParser
import ast from typing import Any, Dict, List, Optional from pathlib import Path class CircuitSynthParser: """Parser for circuit-synth Python files""" def __init__(self): self.components = {} self.nets = {} self.subcircuits = {} def parse_python_circuit(self, file_path: str) -> Di...
class CircuitSynthParser: '''Parser for circuit-synth Python files''' def __init__(self): pass def parse_python_circuit(self, file_path: str) -> Dict[str, Any]: ''' Parse a circuit-synth Python file to extract components and nets Args: file_path: Path to the Py...
13
10
27
4
18
5
4
0.33
0
8
1
0
6
3
6
6
218
43
132
38
119
43
91
35
78
7
0
3
39
326,866
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/quality_assurance/comprehensive_fmea_report_generator.py
circuit_synth.quality_assurance.comprehensive_fmea_report_generator.ComprehensiveFMEAReportGenerator
from datetime import datetime from typing import Dict, List, Optional, Tuple class ComprehensiveFMEAReportGenerator: """Generates comprehensive 50+ page FMEA reports""" def __init__(self, project_name: str, author: str='Circuit-Synth FMEA System'): self.project_name = project_name self.author ...
class ComprehensiveFMEAReportGenerator: '''Generates comprehensive 50+ page FMEA reports''' def __init__(self, project_name: str, author: str='Circuit-Synth FMEA System'): pass def _setup_comprehensive_styles(self): '''Setup comprehensive styles for detailed report''' pass de...
28
27
82
9
69
5
3
0.07
0
7
0
0
27
6
27
27
2,249
263
1,871
198
1,838
131
501
193
473
12
0
3
72
326,867
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/quality_assurance/enhanced_fmea_analyzer.py
circuit_synth.quality_assurance.enhanced_fmea_analyzer.EnhancedFMEAAnalyzer
from pathlib import Path from typing import Any, Dict, List, Optional, Tuple import json from .fmea_analyzer import ComponentType, FailureMode, UniversalFMEAAnalyzer class EnhancedFMEAAnalyzer(UniversalFMEAAnalyzer): """Enhanced FMEA analyzer that uses the comprehensive knowledge base""" def __init__(self): ...
class EnhancedFMEAAnalyzer(UniversalFMEAAnalyzer): '''Enhanced FMEA analyzer that uses the comprehensive knowledge base''' def __init__(self): pass def _load_knowledge_base(self) -> Dict: '''Load the comprehensive FMEA knowledge base''' pass def analyze_component(self, compon...
15
14
37
4
30
4
6
0.13
1
7
2
0
14
1
14
25
540
70
425
106
392
55
219
86
204
14
1
4
85
326,868
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/quality_assurance/fmea_analyzer.py
circuit_synth.quality_assurance.fmea_analyzer.ComponentType
from enum import Enum class ComponentType(Enum): """Standard component types for FMEA analysis""" CONNECTOR = 'connector' REGULATOR = 'regulator' MCU = 'mcu' CAPACITOR = 'capacitor' RESISTOR = 'resistor' INDUCTOR = 'inductor' DIODE = 'diode' LED = 'led' TRANSISTOR = 'transistor'...
class ComponentType(Enum): '''Standard component types for FMEA analysis''' pass
1
1
0
0
0
0
0
0.06
1
0
0
0
0
0
0
49
18
1
16
16
15
1
16
16
15
0
4
0
0
326,869
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/quality_assurance/fmea_analyzer.py
circuit_synth.quality_assurance.fmea_analyzer.FailureMode
from typing import Any, Dict, List, Optional, Tuple from dataclasses import dataclass, field @dataclass class FailureMode: """Represents a single failure mode in FMEA analysis""" component: str component_type: ComponentType failure_mode: str cause: str effect: str severity: int occurren...
@dataclass class FailureMode: '''Represents a single failure mode in FMEA analysis''' @property def rpn(self) -> int: '''Calculate Risk Priority Number''' pass def to_dict(self) -> Dict: '''Convert to dictionary for report generation''' pass
5
3
9
0
8
1
1
0.12
0
1
0
0
2
0
2
2
32
3
26
4
22
3
14
3
11
1
0
0
2
326,870
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/quality_assurance/fmea_analyzer.py
circuit_synth.quality_assurance.fmea_analyzer.UniversalFMEAAnalyzer
import json from typing import Any, Dict, List, Optional, Tuple from .fmea_report_generator import FMEAReportGenerator from pathlib import Path from .circuit_parser import extract_components_from_python class UniversalFMEAAnalyzer: """Universal FMEA analyzer for any circuit design""" FAILURE_MODES_DB = {Compon...
class UniversalFMEAAnalyzer: '''Universal FMEA analyzer for any circuit design''' def __init__(self, verbose: bool=True): pass def identify_component_type(self, component_info: Dict) -> ComponentType: '''Identify component type from symbol or reference''' pass def analyze_com...
12
11
29
3
23
3
5
0.11
0
10
3
1
11
3
11
11
377
43
301
54
281
34
127
44
115
25
0
3
54
326,871
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/quality_assurance/fmea_report_generator.py
circuit_synth.quality_assurance.fmea_report_generator.FMEAReportGenerator
from datetime import datetime from typing import Dict, List, Optional, Tuple class FMEAReportGenerator: """Generates professional PDF FMEA reports for circuit boards""" def __init__(self, project_name: str, author: str='Circuit-Synth FMEA Analyzer'): self.project_name = project_name self.autho...
class FMEAReportGenerator: '''Generates professional PDF FMEA reports for circuit boards''' def __init__(self, project_name: str, author: str='Circuit-Synth FMEA Analyzer'): pass def _setup_custom_styles(self): '''Setup custom styles for the PDF report''' pass def generate_fm...
12
11
47
6
36
6
3
0.16
0
5
0
0
11
4
11
11
531
77
399
74
382
62
159
70
146
8
0
3
32
326,872
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/simulation/analysis.py
circuit_synth.simulation.analysis.ACAnalysis
from dataclasses import dataclass @dataclass class ACAnalysis: """AC small-signal analysis configuration.""" start_frequency: float = 1.0 stop_frequency: float = 1000000.0 points_per_decade: int = 10 variation: str = 'dec' def get_total_points(self) -> int: """Calculate total number of...
@dataclass class ACAnalysis: '''AC small-signal analysis configuration.''' def get_total_points(self) -> int: '''Calculate total number of frequency points.''' pass
3
2
12
1
10
2
3
0.47
0
1
0
0
1
0
1
1
20
3
15
9
12
7
13
9
10
3
0
1
3
326,873
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/simulation/analysis.py
circuit_synth.simulation.analysis.CommonAnalyses
class CommonAnalyses: """Common analysis configurations.""" @staticmethod def dc_operating_point() -> DCAnalysis: """Simple DC operating point analysis.""" return DCAnalysis(operating_point=True) @staticmethod def dc_sweep(source: str, start: float, stop: float, points: int=100) ->...
class CommonAnalyses: '''Common analysis configurations.''' @staticmethod def dc_operating_point() -> DCAnalysis: '''Simple DC operating point analysis.''' pass @staticmethod def dc_sweep(source: str, start: float, stop: float, points: int=100) -> DCAnalysis: '''DC sweep anal...
11
6
7
0
6
1
1
0.2
0
6
3
0
0
0
5
5
46
5
35
19
18
7
13
8
7
1
0
0
5
326,874
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/simulation/analysis.py
circuit_synth.simulation.analysis.DCAnalysis
from typing import Dict, List, Optional, Tuple, Union from dataclasses import dataclass @dataclass class DCAnalysis: """DC operating point and sweep analysis configuration.""" operating_point: bool = True source: Optional[str] = None start: Optional[float] = None stop: Optional[float] = None st...
@dataclass class DCAnalysis: '''DC operating point and sweep analysis configuration.''' def is_sweep(self) -> bool: '''Check if this is a sweep analysis.''' pass
3
2
5
0
4
1
1
0.5
0
1
0
0
1
0
1
1
17
3
10
7
8
5
8
7
6
1
0
0
1
326,875
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/simulation/analysis.py
circuit_synth.simulation.analysis.TransientAnalysis
from dataclasses import dataclass from typing import Dict, List, Optional, Tuple, Union @dataclass class TransientAnalysis: """Transient (time-domain) analysis configuration.""" step_time: float = 1e-06 end_time: float = 0.001 start_time: float = 0.0 max_step: Optional[float] = None def get_nu...
@dataclass class TransientAnalysis: '''Transient (time-domain) analysis configuration.''' def get_num_points(self) -> int: '''Calculate number of time points.''' pass
3
2
3
0
2
1
1
0.86
0
1
0
0
1
0
1
1
11
2
7
6
5
6
7
6
5
1
0
0
1
326,876
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/simulation/converter.py
circuit_synth.simulation.converter.SpiceConverter
import re from typing import Any, Dict, List, Optional class SpiceConverter: """Converts circuit-synth circuits to PySpice format.""" def __init__(self, circuit_synth_circuit): self.circuit = circuit_synth_circuit self.spice_circuit = None self.voltage_sources = [] self.node_ma...
class SpiceConverter: '''Converts circuit-synth circuits to PySpice format.''' def __init__(self, circuit_synth_circuit): pass def convert(self) -> 'SpiceCircuit': '''Convert circuit-synth circuit to PySpice circuit.''' pass def _map_nodes(self): '''Create mapping fro...
19
18
21
2
15
4
4
0.27
0
5
0
0
18
4
18
18
396
59
269
74
250
72
187
74
168
10
0
5
64
326,877
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/simulation/manufacturer_models.py
circuit_synth.simulation.manufacturer_models.ManufacturerModels
from typing import Dict, Optional from .models import ModelLibrary, SpiceModel class ManufacturerModels(ModelLibrary): """ Extended model library with verified manufacturer SPICE models. These models are based on official datasheets and manufacturer-provided SPICE parameters. For critical applications...
class ManufacturerModels(ModelLibrary): ''' Extended model library with verified manufacturer SPICE models. These models are based on official datasheets and manufacturer-provided SPICE parameters. For critical applications, always verify against the latest manufacturer data. ''' def __ini...
8
7
42
2
37
16
2
0.46
1
3
1
0
7
0
7
14
310
23
259
10
251
118
41
10
33
7
1
1
13
326,878
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/simulation/models.py
circuit_synth.simulation.models.ModelLibrary
from typing import Dict, Optional class ModelLibrary: """SPICE model library for circuit-synth simulations.""" def __init__(self): self.models = {} self._load_default_models() def _load_default_models(self): """Load default SPICE models for common components.""" self.model...
class ModelLibrary: '''SPICE model library for circuit-synth simulations.''' def __init__(self): pass def _load_default_models(self): '''Load default SPICE models for common components.''' pass def get_model(self, name: str) -> Optional[SpiceModel]: '''Get a SPICE mod...
8
7
44
2
40
8
1
0.21
0
2
1
1
7
1
7
7
317
22
281
11
273
59
34
11
26
2
0
1
8
326,879
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/simulation/models.py
circuit_synth.simulation.models.SpiceModel
from dataclasses import dataclass from typing import Dict, Optional @dataclass class SpiceModel: """Container for SPICE model parameters.""" name: str model_type: str parameters: Dict[str, float] description: str = '' manufacturer: str = '' datasheet_url: str = ''
@dataclass class SpiceModel: '''Container for SPICE model parameters.''' pass
2
1
0
0
0
0
0
0.29
0
0
0
0
0
0
0
0
9
1
7
4
6
2
7
4
6
0
0
0
0
326,880
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/simulation/simulator.py
circuit_synth.simulation.simulator.CircuitSimulator
from typing import Dict, List, Optional, Tuple, Union class CircuitSimulator: """Main interface for SPICE simulation of circuit-synth designs.""" def __init__(self, circuit_synth_circuit): if not PYSPICE_AVAILABLE: raise ImportError('PySpice not available. Install with: pip install PySpice...
class CircuitSimulator: '''Main interface for SPICE simulation of circuit-synth designs.''' def __init__(self, circuit_synth_circuit): pass def _convert_to_spice(self): '''Convert circuit-synth circuit to PySpice format.''' pass def operating_point(self) -> SimulationResult: ...
10
9
10
1
7
1
2
0.13
0
8
2
0
9
2
9
9
98
22
67
30
52
9
53
26
42
3
0
1
19
326,881
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/simulation/simulator.py
circuit_synth.simulation.simulator.SimulationResult
from typing import Dict, List, Optional, Tuple, Union class SimulationResult: """Container for SPICE simulation results with analysis capabilities.""" def __init__(self, analysis_result, analysis_type: str): self.analysis = analysis_result self.analysis_type = analysis_type self._volta...
class SimulationResult: '''Container for SPICE simulation results with analysis capabilities.''' def __init__(self, analysis_result, analysis_type: str): pass def get_voltage(self, node: str) -> Union[float, List[float]]: '''Get voltage at a specific node.''' pass def get_cur...
6
5
18
1
15
2
5
0.13
0
7
0
0
5
4
5
5
96
9
77
21
70
10
69
20
62
7
0
4
26
326,882
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/simulation/visualization.py
circuit_synth.simulation.visualization.SimulationVisualizer
from typing import Dict, List, Optional, Tuple, Union from datetime import datetime import numpy as np import json class SimulationVisualizer: """Advanced visualization for simulation results.""" def __init__(self, simulation_result): """Initialize with a SimulationResult object.""" self.resul...
class SimulationVisualizer: '''Advanced visualization for simulation results.''' def __init__(self, simulation_result): '''Initialize with a SimulationResult object.''' pass def plot_time_domain(self, nodes: List[str], time_array: Optional[np.ndarray]=None, save_path: Optional[str]=None, ...
9
9
52
8
35
10
7
0.28
0
9
0
0
8
2
8
8
428
70
283
77
251
78
202
49
192
15
0
6
57
326,883
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/tools/debug_cli.py
circuit_synth.tools.debug_cli.DebugCLI
from circuit_synth.debugging import CircuitDebugger, DebugKnowledgeBase, DebugSession, MeasurementType, SymptomAnalyzer, TestGuidance, TestMeasurement import json from pathlib import Path from typing import Any, Dict, List, Optional class DebugCLI: """Command-line interface for circuit debugging""" def __init...
class DebugCLI: '''Command-line interface for circuit debugging''' def __init__(self): pass def start_session(self, board_name: str, board_version: str='1.0', symptoms: List[str]=None): '''Start a new debugging session''' pass def add_symptom(self, symptom: str): '''A...
12
11
16
2
13
1
3
0.12
0
11
5
0
11
4
11
11
190
35
139
40
125
16
123
37
111
9
0
3
37
326,884
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/tools/kicad_integration/kicad_to_python_sync.py
circuit_synth.tools.kicad_integration.kicad_to_python_sync.KiCadToPythonSyncer
from typing import Any, Dict, List, Optional, Tuple from circuit_synth.tools.utilities.kicad_parser import KiCadParser from pathlib import Path from circuit_synth.tools.utilities.python_code_generator import PythonCodeGenerator class KiCadToPythonSyncer: """Main synchronization class""" def __init__(self, kic...
class KiCadToPythonSyncer: '''Main synchronization class''' def __init__(self, kicad_project: str, python_file: str, preview_only: bool=True, create_backup: bool=True): pass def sync(self) -> bool: '''Perform the synchronization from KiCad to Python''' pass def _create_backup...
4
3
55
7
41
6
8
0.16
0
6
2
0
3
8
3
3
169
25
125
30
115
20
91
20
87
15
0
3
25
326,885
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/tools/kicad_integration/python_to_kicad_sync.py
circuit_synth.tools.kicad_integration.python_to_kicad_sync.PythonCircuitParser
import importlib.util import json import subprocess from typing import Any, Dict, List, Optional, Tuple import sys from pathlib import Path class PythonCircuitParser: """ Parses Python circuit definitions to extract Circuit-Synth compatible data. Supports both: 1. Direct Circuit objects defined in Pyt...
class PythonCircuitParser: ''' Parses Python circuit definitions to extract Circuit-Synth compatible data. Supports both: 1. Direct Circuit objects defined in Python 2. Python files that generate Circuit-Synth JSON when executed ''' def __init__(self, python_file_path: str): pass ...
5
4
22
3
16
3
4
0.28
0
8
1
0
4
1
4
4
99
16
65
17
60
18
50
15
45
6
0
3
14
326,886
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/tools/kicad_integration/python_to_kicad_sync.py
circuit_synth.tools.kicad_integration.python_to_kicad_sync.PythonToKiCadSyncer
from pathlib import Path import json import shutil from typing import Any, Dict, List, Optional, Tuple class PythonToKiCadSyncer: """ Main synchronization class that coordinates the Python to KiCad sync process. """ def __init__(self, python_file: str, kicad_project: str, options: SyncOptions): ...
class PythonToKiCadSyncer: ''' Main synchronization class that coordinates the Python to KiCad sync process. ''' def __init__(self, python_file: str, kicad_project: str, options: SyncOptions): pass def _validate_inputs(self): '''Validate input files and paths''' pass ...
8
7
21
4
14
4
3
0.29
0
8
2
0
7
6
7
7
157
34
96
25
88
28
67
23
59
5
0
2
18
326,887
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/tools/kicad_integration/python_to_kicad_sync.py
circuit_synth.tools.kicad_integration.python_to_kicad_sync.SyncOptions
from typing import Any, Dict, List, Optional, Tuple from dataclasses import dataclass @dataclass class SyncOptions: """Configuration options for Python to KiCad synchronization""" preview_only: bool = True create_backup: bool = True preserve_user_components: bool = True match_criteria: List[str] = ...
@dataclass class SyncOptions: '''Configuration options for Python to KiCad synchronization''' def __post_init__(self): pass
3
1
3
0
3
0
2
0.1
0
0
0
0
1
0
1
1
13
2
10
8
8
1
10
8
8
2
0
1
2
326,888
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/tools/utilities/kicad_netlist_parser.py
circuit_synth.tools.utilities.kicad_netlist_parser.KiCadNetlistParser
import re from pathlib import Path from typing import List, Tuple from circuit_synth.tools.utilities.models import Component, Net class KiCadNetlistParser: """Parse KiCad netlist files to extract real connections""" def __init__(self): pass def parse_netlist(self, netlist_path: Path) -> Tuple[Lis...
class KiCadNetlistParser: '''Parse KiCad netlist files to extract real connections''' def __init__(self): pass def parse_netlist(self, netlist_path: Path) -> Tuple[List[Component], List[Net]]: '''Parse a KiCad .net file to extract components and nets with real connections''' pass ...
5
4
30
6
21
4
4
0.18
0
5
2
0
4
0
4
4
125
27
84
32
79
15
61
30
56
6
0
3
16
326,889
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/tools/utilities/kicad_parser.py
circuit_synth.tools.utilities.kicad_parser.KiCadParser
import subprocess from typing import Dict, List, Optional, Tuple from circuit_synth.tools.utilities.models import Circuit, Component, Net from pathlib import Path import tempfile import re import json from circuit_synth.tools.utilities.kicad_netlist_parser import KiCadNetlistParser class KiCadParser: """Parse KiCa...
class KiCadParser: '''Parse KiCad files to extract components and generate netlists''' def __init__(self, kicad_project: str): pass def _find_root_schematic(self) -> Optional[Path]: '''Parse .kicad_pro file to find the root schematic file''' pass def generate_netlist(self) ->...
16
15
45
6
34
4
7
0.13
0
15
4
0
15
4
15
15
691
111
515
145
495
68
366
129
350
17
0
5
106
326,890
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/tools/utilities/llm_code_updater.py
circuit_synth.tools.utilities.llm_code_updater.LLMCodeUpdater
import re import os from circuit_synth.tools.utilities.models import Circuit, Component, Net from pathlib import Path from typing import Any, Dict, List, Optional class LLMCodeUpdater: """Update Python code using LLM assistance""" def __init__(self): """Initialize the LLM code updater""" self....
class LLMCodeUpdater: '''Update Python code using LLM assistance''' def __init__(self): '''Initialize the LLM code updater''' pass def _sanitize_variable_name(self, name: str) -> str: ''' Convert a net or signal name to a valid Python variable name. Rules: ...
13
13
43
6
32
6
6
0.2
0
8
2
0
12
1
12
12
529
89
380
84
353
75
284
67
269
12
0
5
76
326,891
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/tools/utilities/models.py
circuit_synth.tools.utilities.models.Circuit
from dataclasses import dataclass from typing import Any, Dict, List, Optional, Tuple @dataclass class Circuit: """Circuit representation with real netlist data""" name: str components: List[Component] nets: List[Net] schematic_file: str = '' is_hierarchical_sheet: bool = False hierarchical...
@dataclass class Circuit: '''Circuit representation with real netlist data''' def to_dict(self): pass
3
1
9
0
9
0
1
0.11
0
0
0
0
1
0
1
1
21
2
18
5
16
2
9
5
7
1
0
0
1
326,892
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/tools/utilities/models.py
circuit_synth.tools.utilities.models.Component
from dataclasses import dataclass @dataclass class Component: """Simple component representation""" reference: str lib_id: str value: str position: tuple = (0.0, 0.0) footprint: str = '' def to_dict(self): return {'reference': self.reference, 'lib_id': self.lib_id, 'value': self.va...
@dataclass class Component: '''Simple component representation''' def to_dict(self): pass
3
1
8
0
8
0
1
0.07
0
0
0
0
1
0
1
1
17
2
14
4
12
1
8
4
6
1
0
0
1
326,893
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/tools/utilities/models.py
circuit_synth.tools.utilities.models.Net
from typing import Any, Dict, List, Optional, Tuple from dataclasses import dataclass @dataclass class Net: """Net representation with actual pin connections""" name: str connections: List[Tuple[str, str]] def to_dict(self): return {'name': self.name, 'connections': self.connections}
@dataclass class Net: '''Net representation with actual pin connections''' def to_dict(self): pass
3
1
2
0
2
0
1
0.4
0
0
0
0
1
0
1
1
8
2
5
2
3
2
5
2
3
1
0
0
1
326,894
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/tools/utilities/python_code_generator.py
circuit_synth.tools.utilities.python_code_generator.PythonCodeGenerator
from typing import Any, Dict, List, Optional, Tuple from circuit_synth.tools.utilities.models import Circuit, Component, Net import re from pathlib import Path class PythonCodeGenerator: """Generate Python circuit code from parsed KiCad data""" def __init__(self, project_name: Optional[str]=None): """...
class PythonCodeGenerator: '''Generate Python circuit code from parsed KiCad data''' def __init__(self, project_name: Optional[str]=None): '''Initialize the Python code generator''' pass def _generate_project_call(self) -> str: '''Generate the circuit.generate_kicad_netlist() and ...
25
25
53
7
38
10
8
0.26
0
10
3
0
24
1
24
24
1,309
188
924
251
821
243
576
168
551
24
0
6
183
326,895
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/kicad_plugins/circuit_synth_bom_plugin.py
circuit_synth_bom_plugin.KiCadClaudeBridge
import os import subprocess class KiCadClaudeBridge: """Main Claude bridge for KiCad schematic design discussions and code generation.""" def __init__(self): self.is_connected = False self.claude_path = None self.node_env = None def find_claude_path(self): """Find Claude C...
class KiCadClaudeBridge: '''Main Claude bridge for KiCad schematic design discussions and code generation.''' def __init__(self): pass def find_claude_path(self): '''Find Claude CLI with proper Node.js environment.''' pass def connect(self): '''Test Claude connection ...
6
5
32
4
26
2
6
0.1
0
3
0
0
5
3
5
5
167
23
132
28
126
13
101
25
95
8
0
4
28
326,896
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/kicad_plugins/circuit_synth_pcb_bom_bridge.py
circuit_synth_pcb_bom_bridge.CircuitSynthPCBBOMBridge
from pathlib import Path import pcbnew import subprocess import tempfile import wx class CircuitSynthPCBBOMBridge(pcbnew.ActionPlugin): """ Circuit-Synth PCB-BOM Bridge Plugin for KiCad PCB Editor. Launches the working BOM plugin with PCB data. """ def defaults(self): """Set up plugin def...
class CircuitSynthPCBBOMBridge(pcbnew.ActionPlugin): ''' Circuit-Synth PCB-BOM Bridge Plugin for KiCad PCB Editor. Launches the working BOM plugin with PCB data. ''' def defaults(self): '''Set up plugin defaults.''' pass def Run(self): '''Execute the plugin.''' ...
3
3
51
10
37
6
5
0.2
1
5
0
0
2
4
2
2
110
22
74
20
70
15
60
18
56
8
1
2
9
326,897
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/docs/conf.py
conf.Mock
from unittest.mock import MagicMock class Mock(MagicMock): @classmethod def __getattr__(cls, name): return MagicMock()
class Mock(MagicMock): @classmethod def __getattr__(cls, name): pass
3
0
2
0
2
0
1
0
1
0
0
0
0
0
1
42
4
0
4
3
1
0
3
2
1
1
5
0
1
326,898
circuit-synth/circuit-synth
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/tools/analysis/dead-code-analysis.py
dead-code-analysis.DeadCodeAnalyzer
import re from typing import Dict, List, Set, Tuple from pathlib import Path class DeadCodeAnalyzer: """Analyzes function call logs to identify dead code.""" def __init__(self, src_dir: Path): self.src_dir = src_dir def analyze_calls(self, log_file: Path, instrumented_functions: Dict[str, int]) -...
class DeadCodeAnalyzer: '''Analyzes function call logs to identify dead code.''' def __init__(self, src_dir: Path): pass def analyze_calls(self, log_file: Path, instrumented_functions: Dict[str, int]) -> Dict: '''Analyze function calls and identify dead code.''' pass def _ext...
5
4
29
4
23
5
3
0.21
0
5
0
0
4
1
4
4
121
18
91
23
86
19
41
20
36
6
0
5
13
326,899
circuit-synth/circuit-synth
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/circuit-synth_circuit-synth/tools/analysis/dead-code-analysis.py
dead-code-analysis.FunctionInstrumenter
from typing import Dict, List, Set, Tuple from pathlib import Path import ast class FunctionInstrumenter: """Instruments Python functions with debug logging statements.""" def __init__(self, src_dir: Path): self.src_dir = src_dir self.instrumented_files = [] self.total_functions = 0 ...
class FunctionInstrumenter: '''Instruments Python functions with debug logging statements.''' def __init__(self, src_dir: Path): pass def instrument_all_files(self) -> Dict[str, int]: '''Instrument all Python files in the source directory.''' pass def _instrument_file(self, f...
6
5
32
6
22
5
8
0.22
0
9
0
0
5
3
5
5
168
33
113
42
107
25
111
40
105
25
0
5
38