Skip to content
Snippets Groups Projects
Commit 90623fc6 authored by vlorentz's avatar vlorentz
Browse files

origin_contributors: Fix deanonymization and tests

They were broken by the addition of the 'years' column in the previous commit
parent 20a76683
No related branches found
No related tags found
No related merge requests found
......@@ -272,8 +272,8 @@ class DeanonymizeOriginContributors(luigi.Task):
# TODO: remove that cast once we dropped Python 3.7 support
csv_reader = csv.reader(cast(Iterable[str], input_fd))
header = next(csv_reader)
assert header == ["origin_id", "contributor_id"], header
for (origin_id, person_id_str) in tqdm.tqdm(
assert header == ["origin_id", "contributor_id", "years"], header
for (origin_id, person_id_str, years) in tqdm.tqdm(
csv_reader, unit_scale=True, desc="Reading set of contributor ids"
):
if person_id_str == "null":
......
......@@ -29,12 +29,12 @@ from .test_topology import TOPO_ORDER_BACKWARD as TOPOLOGICAL_ORDER
# FIXME: do not hardcode ids here; they should be dynamically loaded
# from the test graph
ORIGIN_CONTRIBUTORS = """\
origin_id,contributor_id
2,0
2,2
0,0
0,1
0,2
origin_id,contributor_id,years
2,0,2005 2009
2,2,2005
0,0,2005 2009
0,1,2005
0,2,2005
""".replace(
"\n", "\r\n"
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment