graflo.architecture.evolution.aspects.join¶
A lift is a join: the manifest gains what an aspect's vocabulary has and it lacks.
Every aspect plans through :func:join. An element of the vocabulary the
manifest lacks is added; one it already has is kept, and gains only the parts
it is missing; one that contradicts it is a conflict, and every conflict is
reported in one :class:~graflo.architecture.evolution.aspects.base.LiftError.
What contradicts, and why it is not joined:
- an identity: it decides which records are one entity, so another one re-keys stored data;
- an IRI on a type, an edge or a property: another one names another concept;
- a property's type,
reservedormerge: another one changes how stored values are read or written; - an edge's
directed.
A property or IRI that is absent is not a contradiction, and neither are the manifest's own further properties, secondary identities and descriptions. Because nothing is overwritten, a join is idempotent and does not depend on the order manifests are composed and lifted in.
Attributes¶
__all__ = ['join']
module-attribute
¶
Classes¶
Functions:¶
join(core, *, vertices=(), vertex_fields=None, edges=(), relation_fields=None)
¶
The ops that join core with a vocabulary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
core
|
CoreSchema
|
the manifest's schema, as the earlier aspects of the same lift left it. |
required |
vertices
|
Sequence[Vertex]
|
vocabulary types, joined by name. |
()
|
vertex_fields
|
Mapping[str, Sequence[Field]] | None
|
vocabulary properties for types core must declare. |
None
|
edges
|
Sequence[Edge]
|
vocabulary edges, joined by |
()
|
relation_fields
|
Mapping[str, Sequence[Field]] | None
|
vocabulary properties for every edge of each relation, which core must declare. |
None
|
Returns:
| Type | Description |
|---|---|
list[ManifestOp]
|
Ops in application order; empty when core already holds it all. |
Raises:
| Type | Description |
|---|---|
LiftError
|
a type or relation the fields name is missing, or the vocabulary contradicts core; every contradiction is listed. |
Source code in graflo/architecture/evolution/aspects/join.py
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 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | |