Skip to content

Fixes in BaseParser::upload_xref_object_graphs()

Created by: mkszuba

Description

BaseParser::upload_xref_object_graphs() can insert duplicate dependent xrefs on subsequent reruns of parsers using it on the same input, and inserted empty strings rather than NULLs as descriptions of dependent xrefs unless explicitly overridden by arguments.

Use case

BaseParser::upload_xref_object_graphs() is used by (at least) UniProtParser.

Benefits

Calls to upload_xref_object_graphs() should now be replay-safe. Fewer empty strings.

Possible Drawbacks

Parser output will likely change a lot, mostly due to the empty-space-to-null transition - which will make validation challenging.

Testing

Have you added/modified unit tests to test the changes? No.

If so, do the tests pass/fail? N/A

Have you run the entire test suite and no regression was detected? I have run xref_parser.t, which AFAIK is the only part of the test suite dealing with xref parsers. All tests still pass. Moreover, I have run the new UniProtParser (with a small subset of input extracted from the middle of current Swiss-Prot file) before and after the change to compare results and they have changed as expected.

Merge request reports