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

Class DocumentProperties

SLiCAP/schematic/schematic_data.py:22–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20
21@dataclass
22class DocumentProperties:
23 title: str = ""
24 author: str = ""
25 created: str = "" # ISO date, set once on New
26 last_modified: str = "" # ISO date, auto-updated on every Save
27 page_size: str = "A4" # standard name or "Custom"
28 page_width_mm: float = 210.0
29 page_height_mm: float = 297.0
30 # ── hierarchy ──────────────────────────────────────────────────────────────
31 # When True, Save writes this schematic as a SLiCAP subcircuit (.lib) in
32 # addition to its .slicap_sch source. subcircuit_ports is the user-chosen
33 # node order; subcircuit_params are the overridable .subckt parameters.
34 is_subcircuit: bool = False
35 subcircuit_ports: list = field(default_factory=list) # ordered port names
36 subcircuit_params: list = field(default_factory=list) # list of [name, default]
37
38 @staticmethod
39 def new() -> "DocumentProperties":
40 return DocumentProperties(created=_date.today().isoformat())
41
42
43@dataclass

Callers 2

newMethod · 0.85
from_jsonMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected