Skip to content

Commit ce967d9

Browse files
authored
Reorganize parts libraries (#492)
Adds sub-package structure to the parts library. Refactors pyproject.toml to auto-discover packages and include package data by extension. Breaks some of them into vendor_parts (implementations of abstract_parts, including the JLC library) and circuits (which are solely composed of abstract parts). A follow-on PR will break up electronics_model (separating out electronics_interfaces) and abstract_parts (moving stuff into circuits) Related: #479
1 parent b690c01 commit ce967d9

290 files changed

Lines changed: 2160 additions & 2298 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

edg/BoardTop.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
from typing_extensions import override
22

3+
from .abstract_parts import *
4+
from .vendor_parts import *
5+
from .vendor_parts.jlc import *
6+
from .circuits import *
37
from .parts import *
48

59

edg/__init__.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
# A metapackage for all the packages needed for electronics design with EDG
1+
# Some common operations are directly exported
2+
from .BoardTop import BoardTop, SimpleBoardTop, JlcBoardTop
3+
4+
from .BoardCompiler import compile_board, compile_board_inplace
25

6+
# For backwards compatibility, this re-exports internal packages and parts libraries to allow `from edg import *`.
7+
# This may go away in the future.
38
from .core import *
49
from .electronics_model import *
510
from .abstract_parts import *
11+
from .vendor_parts import *
12+
from .vendor_parts.jlc import *
13+
from .circuits import *
614
from .parts import *
7-
from .jlcparts import *
8-
9-
from .BoardTop import BoardTop, SimpleBoardTop, JlcBoardTop
10-
11-
from .BoardCompiler import compile_board, compile_board_inplace
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
from typing import Dict, Optional, Tuple
12
from typing_extensions import override
23

34
from ..abstract_parts import *
4-
from typing import Dict, Optional, Tuple
55

66

77
class CharlieplexedLedMatrix(Light, GeneratorBlock, SvgPcbTemplateBlock):

edg/circuits/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# A library of common circuits, composed entirely of abstract parts (no specialized parts / chips)
2+
from .PowerConditioning import (
3+
SingleDiodePowerMerge,
4+
DiodePowerMerge,
5+
PriorityPowerOr,
6+
SoftPowerGate,
7+
SoftPowerSwitch,
8+
PmosReverseProtection,
9+
PmosChargerReverseProtection,
10+
)
11+
12+
from .BootstrapVoltageAdder import BootstrapVoltageAdder
13+
14+
from .LedMatrix import CharlieplexedLedMatrix
15+
from .SwitchMatrix import SwitchMatrix
16+
from .ResistiveSensor import ConnectorResistiveSensor
File renamed without changes.

0 commit comments

Comments
 (0)