Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ ignore = [
"tests/**/*.py" = ["S101", "T201"] # use of assert
"**/__init__.py" = ["D104"]


[tool.ruff.lint.mccabe]
# Flag errors (`C901`) whenever the complexity level exceeds 15.
max-complexity = 15
Expand Down
2 changes: 1 addition & 1 deletion src/cdm_data_loader_utils/parsers/gene_association_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def run(
if register:
register_table(spark, output_path, table_name=table_name, permanent=permanent)

except Exception as e:
except Exception:
logger.exception("Pipeline failed")
sys.exit(1)
finally:
Expand Down
11 changes: 11 additions & 0 deletions src/cdm_data_loader_utils/parsers/shared_identifiers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from cdm_data_loader_utils.parsers.xml_utils import get_text


def parse_identifiers_generic(entry, xpath, prefix, ns):
result = []
for node in entry.findall(xpath, ns):
text = get_text(node)
if not text:
continue
result.append({"identifier": f"{prefix}:{text}", "source": prefix, "description": f"{prefix} accession"})
return result
Loading
Loading