errorcorrectionzoo/eczoo_data

Generate all ancestors of a given code

Closed this issue · 7 comments

The EC zoo data is set of structured YML files, with each file corresponding to a code family. Inside each file are "parent" links to other codes. Given a particular file (labeled by a particular "code_id"), generate a table (i.e., ancestor family tree) of all of the code's parents, along with their "physical" and "logical" parameters.

Ideally, I'd like to have a script that runs in bash so I can just pull the eczoo_data repo and run the script. The script would take one argument, the code_id corresponding to the code whose ancestors I want to determine. The script should spit out a table, where each row is an ancestor, its physical, and its logical parameters.

Many codes have multiple parents, the generating the list of all parents should probably be done recursively. I don't have strong preferences as to which order the ancestors are presented in the table.

@valbert4 I would like to take a stab at this issue. Could you assign it to me?

@valbert4 I Have a bash script solution for the issue, can you assign it to me?

FYI (I just found this out.) Being assigned to this issue will happen for the first person (or team) to make a contribution which resolves this issue. Until then, it's fair game! In the meantime, you can work on it without being assigned, and open a PR when you're ready. If it solves the issue, we'll assign you, and close the issue so you can be rewarded!

Thanks for your committ, @Sri-Harsha-T, you are almost there!

@valbert4, I have addressed the changes in PR #303, can you please confirm if it works accordingly, or are there some more modifications required?

Congrats @Sri-Harsha-T, very nice work! I'm curious how you got the second iteration to work so much faster.

@valbert4 , I think it works faster in the second iteration because it checks if a given ancestor already exists in the ancestor tree table and avoids recursion and repetition. Thanks for accepting my solution!