cellgraph 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cellgraph/__init__.py +142 -0
- cellgraph/analysis.py +1013 -0
- cellgraph/core.py +87 -0
- cellgraph/diagnostics.py +26 -0
- cellgraph/effects.py +127 -0
- cellgraph/grammar.py +144 -0
- cellgraph/keys.py +420 -0
- cellgraph/languages.py +96 -0
- cellgraph/plan.py +34 -0
- cellgraph/py.typed +0 -0
- cellgraph/python.py +672 -0
- cellgraph/vocabulary.py +263 -0
- cellgraph-0.1.0.dist-info/METADATA +63 -0
- cellgraph-0.1.0.dist-info/RECORD +16 -0
- cellgraph-0.1.0.dist-info/WHEEL +4 -0
- cellgraph-0.1.0.dist-info/licenses/LICENSE +201 -0
cellgraph/__init__.py
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"""cellgraph: the cell graph of a notebook or script, with a host-supplied vocabulary.
|
|
2
|
+
|
|
3
|
+
A cell is source with a leading ``# @key value`` block. ``analyze`` reads each
|
|
4
|
+
cell's names and annotations, applies the annotations' effects, wires the DAG,
|
|
5
|
+
and keys every cell; ``Analysis.execution_key`` and ``Analysis.plan`` answer the
|
|
6
|
+
two questions a host asks before running one.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from cellgraph.analysis import (
|
|
10
|
+
DIGEST_CELLGRAPH_1,
|
|
11
|
+
DIGEST_LEGACY_1,
|
|
12
|
+
NORMALIZE_CELLGRAPH_1,
|
|
13
|
+
NORMALIZE_LEGACY_1,
|
|
14
|
+
Analysis,
|
|
15
|
+
Cell,
|
|
16
|
+
CellAnalysis,
|
|
17
|
+
Dag,
|
|
18
|
+
DagEdge,
|
|
19
|
+
GroupConfig,
|
|
20
|
+
NotPlannableError,
|
|
21
|
+
SweepProducer,
|
|
22
|
+
VariantGroupResolution,
|
|
23
|
+
analyze,
|
|
24
|
+
)
|
|
25
|
+
from cellgraph.diagnostics import Diagnostic, Severity
|
|
26
|
+
from cellgraph.effects import (
|
|
27
|
+
After,
|
|
28
|
+
Binds,
|
|
29
|
+
Defines,
|
|
30
|
+
Effect,
|
|
31
|
+
FanOut,
|
|
32
|
+
Input,
|
|
33
|
+
Keeps,
|
|
34
|
+
Member,
|
|
35
|
+
NoCache,
|
|
36
|
+
Reads,
|
|
37
|
+
Seeds,
|
|
38
|
+
)
|
|
39
|
+
from cellgraph.grammar import GRAMMAR, Directive, Grammar
|
|
40
|
+
from cellgraph.keys import (
|
|
41
|
+
PARTS_SCHEMA,
|
|
42
|
+
HostKeyed,
|
|
43
|
+
Keyed,
|
|
44
|
+
OutputRef,
|
|
45
|
+
Provenance,
|
|
46
|
+
Published,
|
|
47
|
+
Resolved,
|
|
48
|
+
Run,
|
|
49
|
+
Unavailable,
|
|
50
|
+
canonical_json,
|
|
51
|
+
compute_provenance_hash,
|
|
52
|
+
derive_subkey,
|
|
53
|
+
)
|
|
54
|
+
from cellgraph.languages import (
|
|
55
|
+
Analyzed,
|
|
56
|
+
LanguageAnalyzer,
|
|
57
|
+
UnknownLanguageError,
|
|
58
|
+
directive_keys,
|
|
59
|
+
get_language_analyzer,
|
|
60
|
+
register_language_analyzer,
|
|
61
|
+
strip_lines,
|
|
62
|
+
)
|
|
63
|
+
from cellgraph.python import PythonAnalyzer
|
|
64
|
+
from cellgraph.vocabulary import (
|
|
65
|
+
Annotation,
|
|
66
|
+
AnnotationError,
|
|
67
|
+
Parser,
|
|
68
|
+
Partial,
|
|
69
|
+
ValidationContext,
|
|
70
|
+
Vocabulary,
|
|
71
|
+
flag,
|
|
72
|
+
is_stacked,
|
|
73
|
+
mark_stacked,
|
|
74
|
+
scalar,
|
|
75
|
+
stacked,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
register_language_analyzer("python", PythonAnalyzer())
|
|
79
|
+
|
|
80
|
+
__all__ = [
|
|
81
|
+
"DIGEST_CELLGRAPH_1",
|
|
82
|
+
"DIGEST_LEGACY_1",
|
|
83
|
+
"GRAMMAR",
|
|
84
|
+
"NORMALIZE_CELLGRAPH_1",
|
|
85
|
+
"NORMALIZE_LEGACY_1",
|
|
86
|
+
"PARTS_SCHEMA",
|
|
87
|
+
"After",
|
|
88
|
+
"Analysis",
|
|
89
|
+
"Analyzed",
|
|
90
|
+
"Annotation",
|
|
91
|
+
"AnnotationError",
|
|
92
|
+
"Binds",
|
|
93
|
+
"Cell",
|
|
94
|
+
"CellAnalysis",
|
|
95
|
+
"Dag",
|
|
96
|
+
"DagEdge",
|
|
97
|
+
"Defines",
|
|
98
|
+
"Diagnostic",
|
|
99
|
+
"Directive",
|
|
100
|
+
"Effect",
|
|
101
|
+
"FanOut",
|
|
102
|
+
"Grammar",
|
|
103
|
+
"GroupConfig",
|
|
104
|
+
"HostKeyed",
|
|
105
|
+
"Input",
|
|
106
|
+
"Keeps",
|
|
107
|
+
"Keyed",
|
|
108
|
+
"LanguageAnalyzer",
|
|
109
|
+
"Member",
|
|
110
|
+
"NoCache",
|
|
111
|
+
"NotPlannableError",
|
|
112
|
+
"OutputRef",
|
|
113
|
+
"Provenance",
|
|
114
|
+
"Published",
|
|
115
|
+
"Parser",
|
|
116
|
+
"Partial",
|
|
117
|
+
"PythonAnalyzer",
|
|
118
|
+
"Reads",
|
|
119
|
+
"Resolved",
|
|
120
|
+
"Run",
|
|
121
|
+
"Seeds",
|
|
122
|
+
"Severity",
|
|
123
|
+
"SweepProducer",
|
|
124
|
+
"Unavailable",
|
|
125
|
+
"UnknownLanguageError",
|
|
126
|
+
"ValidationContext",
|
|
127
|
+
"VariantGroupResolution",
|
|
128
|
+
"Vocabulary",
|
|
129
|
+
"analyze",
|
|
130
|
+
"canonical_json",
|
|
131
|
+
"compute_provenance_hash",
|
|
132
|
+
"derive_subkey",
|
|
133
|
+
"directive_keys",
|
|
134
|
+
"flag",
|
|
135
|
+
"get_language_analyzer",
|
|
136
|
+
"is_stacked",
|
|
137
|
+
"mark_stacked",
|
|
138
|
+
"register_language_analyzer",
|
|
139
|
+
"scalar",
|
|
140
|
+
"stacked",
|
|
141
|
+
"strip_lines",
|
|
142
|
+
]
|