MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / _make_library

Method _make_library

SLiCAP/schematic/window.py:542–556  ·  view source on GitHub ↗

Construct a symbol library (system symbols, optionally overlaid by a schematic's frozen .symbols) without publishing it as the active library. Pass overlay_path=None to get the live, un-frozen definitions.

(self, overlay_path=None)

Source from the content-addressed store, hash-verified

540 self._scene.start_placement(name, svg)
541
542 def _make_library(self, overlay_path=None) -> SymbolLibrary:
543 """Construct a symbol library (system symbols, optionally overlaid by a
544 schematic&#x27;s frozen <name>.symbols) without publishing it as the active
545 library. Pass overlay_path=None to get the live, un-frozen definitions."""
546 lib = SymbolLibrary(_SYMBOLS_SVG)
547 if self._config == "full":
548 # Load all additional SVGs from the system symbols directory.
549 lib.add_user_library(_SYMBOLS_DIR, exclude_stems={"Symbols"})
550 # User symbol libraries in the project's lib/ (always loaded regardless
551 # of config); generated block symbols are excluded — they load on placement.
552 libdir = project.subdir("lib")
553 lib.add_user_library(libdir, exclude_stems={p.stem for p in libdir.glob("*.lib")})
554 if overlay_path is not None:
555 lib.add_bundle(overlay_path)
556 return lib
557
558 def _build_library(self, overlay_path=None):
559 """(Re)build the active symbol library: system symbols, optionally

Callers 2

_on_reload_symbolsMethod · 0.95
_build_libraryMethod · 0.95

Calls 3

add_user_libraryMethod · 0.95
add_bundleMethod · 0.95
SymbolLibraryClass · 0.85

Tested by

no test coverage detected