comicbox.readinglists.combine.groups ¶
Which rows of several lists are the same issue.
Every row is a node (input index, row index) carrying its entry_keys. A key is qualified by how many earlier rows of its own input carry it, so the first occurrence of a repeated issue lines up with the first in another list and the second with the second. The cover-year key is counted among rows of the same signature (discriminators): rows of two volumes are not repeats of one issue.
Two rows of different inputs that share a qualified key are linked, and links join groups transitively: a ComicVine id joining A and B and a Metron id joining B and C put all three together. Links are applied strongest first, ids in ranked_id_sources order, then names with a start year, then names with a volume number, then names with a cover year, and within one strength by input rank and row. A volume-number link is refused when the joined group would hold two years: Z-Men (1963) and Z-Men (1991) may both be volume 1. A link that would put two rows of one input in one group is refused, so a name match never takes a row an id match wanted, nor a cover-year match one a name match wanted, and nothing is cut apart afterwards.
The cover-year key links a row to its candidates: rows of other inputs with the same key and occurrence whose signatures do not conflict with its own. An exact candidate has the same signature, a loose one another. Every exact pair is linked, so a list combines with itself unchanged. A loose pair is linked only when neither row has an exact candidate in the other’s input, each is the other’s only loose candidate there, and neither has two candidates that conflict over all the other inputs: a row that cannot tell which volume it is stays its own entry. No group formed through cover-year links holds two rows whose signatures conflict.
GroupIdConflict dataclass ¶
Two values for one source in one group; group is a group id.
Source code in comicbox/readinglists/combine/groups.py
87 88 89 90 91 92 93 94 95 96 | |
Grouping dataclass ¶
The groups of rows that are the same issue.
Group ids number the groups by first appearance, reading the inputs in rank order. members holds each group’s nodes in rank order, at most one per input. sequences holds each input’s group ids in row order.
Source code in comicbox/readinglists/combine/groups.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |
group_rows(inputs) ¶
Group the rows of lists, in rank order, that are the same issue.
Source code in comicbox/readinglists/combine/groups.py
345 346 347 | |