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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,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 @@
if register:
register_table(spark, output_path, table_name=table_name, permanent=permanent)

except Exception as e:
except Exception:

Check warning on line 276 in src/cdm_data_loader_utils/parsers/gene_association_file.py

View check run for this annotation

Codecov / codecov/patch

src/cdm_data_loader_utils/parsers/gene_association_file.py#L276

Added line #L276 was not covered by tests
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

Check warning on line 9 in src/cdm_data_loader_utils/parsers/shared_identifiers.py

View check run for this annotation

Codecov / codecov/patch

src/cdm_data_loader_utils/parsers/shared_identifiers.py#L9

Added line #L9 was not covered by tests
result.append({"identifier": f"{prefix}:{text}", "source": prefix, "description": f"{prefix} accession"})
return result
Loading
Loading