Skip to content

Bug Report: Inconsistency in Handling Deleted Articles in MEDLINE Parser #166

@callebalik

Description

@callebalik

Relates to #165

Description

There inconsistency between the documentation and the implementation of the parse_medline_xml function in the MEDLINE parser. The docstring claims that deleted articles are processed and returned with delete: True, but the actual implementation does not handle deleted articles at all.

Current Behavior

The function's docstring states:

"Articles that have been deleted will be added with no information other than the field delete being True."

However, the actual implementation:

  • Only processes elements with the tag PubmedArticle.
  • Never processes Delete information.
  • Always sets delete: False in the returned article dictionaries via 'parse_article_info'.

Additionally, the parse_article_info documentation contradicts the parent function's claim by stating:

"The field delete is always False because this function parses articles that by definition are not deleted."

Expected Behavior

One of the following should occur:

  1. The parser should handle DeleteCitation elements and return them with delete: True as documented.
  2. The documentation should be corrected to reflect that deleted articles are not processed.

Steps to Reproduce

  1. Examine the code in medline_parser.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions