Coverage for src/loman/consts.py: 100%
30 statements
« prev ^ index » next coverage.py v7.11.0, created at 2025-10-21 05:36 +0000
« prev ^ index » next coverage.py v7.11.0, created at 2025-10-21 05:36 +0000
1"""Constants and enumerations for the loman computation engine."""
3from enum import Enum
6class States(Enum):
7 """Possible states for a computation node."""
9 PLACEHOLDER = 0
10 UNINITIALIZED = 1
11 STALE = 2
12 COMPUTABLE = 3
13 UPTODATE = 4
14 ERROR = 5
15 PINNED = 6
18class NodeAttributes:
19 """Constants for node attribute names in the computation graph."""
21 VALUE = "value"
22 STATE = "state"
23 FUNC = "func"
24 GROUP = "group"
25 TAG = "tag"
26 STYLE = "style"
27 ARGS = "args"
28 KWDS = "kwds"
29 TIMING = "timing"
30 EXECUTOR = "executor"
31 CONVERTER = "converter"
34class EdgeAttributes:
35 """Constants for edge attribute names in the computation graph."""
37 PARAM = "param"
40class SystemTags:
41 """System-level tags used internally by loman."""
43 SERIALIZE = "__serialize__"
44 EXPANSION = "__expansion__"
47class NodeTransformations:
48 """Node transformation types for visualization."""
50 CONTRACT = "contract"
51 COLLAPSE = "collapse"
52 EXPAND = "expand"