Coverage for src/loman/consts.py: 100%
31 statements
« prev ^ index » next coverage.py v7.16.0, created at 2026-09-07 00:32 +0000
« prev ^ index » next coverage.py v7.16.0, created at 2026-09-07 00:32 +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"
32 STORE = "store"
35class EdgeAttributes:
36 """Constants for edge attribute names in the computation graph."""
38 PARAM = "param"
41class SystemTags:
42 """System-level tags used internally by loman."""
44 SERIALIZE = "__serialize__"
45 EXPANSION = "__expansion__"
48class NodeTransformations:
49 """Node transformation types for visualization."""
51 CONTRACT = "contract"
52 COLLAPSE = "collapse"
53 EXPAND = "expand"