Skip to content

Commit

Permalink
feat: integrate empty tag removal in workbook.create
Browse files Browse the repository at this point in the history
Incorporate the `delete_empty_tags` functionality into `workbook.create`
to prevent errors caused by processing empty XML tags.
  • Loading branch information
clnsmth authored Aug 31, 2024
1 parent 574970e commit 6847f91
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/spinneret/workbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from uuid import uuid4
from lxml import etree
import pandas as pd
from spinneret.utilities import delete_empty_tags


def create(
Expand Down Expand Up @@ -54,6 +55,7 @@ def create(
when revisiting an annotation at a later date.
"""
eml = etree.parse(eml_file)
eml = delete_empty_tags(eml)
package_id = eml.xpath("./@packageId")[0]
url = base_url + package_id
res = []
Expand Down

0 comments on commit 6847f91

Please sign in to comment.