graflo.cli.canonical¶
graflo canonical-check -- a canonical map against the manifest it maps.
A canonical map is authored against one schema long before it is merged
against another, and until now the only thing that would check it was a full
graflo merge: two manifests, an op, and a refusal naming one entry at a
time. A map of hundreds of entries is not authored that way.
This verb is that check on its own. With one manifest it classifies every entry
directly; with both it runs the merge preview, which puts each declaration
through the rules merge uses without merging, so one bad entry does not
hide the rest. --trim writes the map narrowed to what the manifest actually
declares -- an authoring step with a diff, rather than something merge does
silently at the far end of a pipeline.
Attributes¶
EXIT_DANGLING = 1
module-attribute
¶
__all__ = ['canonical_check']
module-attribute
¶
Classes¶
Functions:¶
canonical_check(map_path, left_path, right_path, scope, trim_path, as_json, exit_zero)
¶
Check the canonical map at MAP_PATH against the manifest(s) it maps.
Source code in graflo/cli/canonical.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |