New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: tidy up graph analyzing #595
chore: tidy up graph analyzing #595
Conversation
@@ -30,19 +30,18 @@ def analyse_circles_in_data(xml_filepath: Path, tracer_output_file: str, save_tr | |||
max_stack_depth=3, | |||
) | |||
tracer.start() | |||
tree = etree.parse(xml_filepath) | |||
root = tree.getroot() | |||
root = parse_and_clean_xml_file(xml_filepath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function transforms the special tags <annotation>
, <region>
, and <link>
to their technically correct form <resource restype="Annotation">
, <resource restype="Region">
, and <resource restype="LinkObj">
. This is necessary, otherwise these special tags aren't considered when analyzing the links
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I just improved the flow of information: It's not necessary for _create_info_from_xml_for_graph_from_one_resource()
to return subject_id
. This can be extracted on the caller side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now, _create_info_from_xml_for_graph_from_one_resource()
doesn't return the subject_id any more. So, the tests become easier, because they don't have to test this unnecessary thing any more.
No description provided.