Skip to content

Commit

Permalink
Merge pull request #1371 from Sage-Bionetworks/fds-1721-pylint-schema…
Browse files Browse the repository at this point in the history
…-utils

FDS-1721 pylint schema utils
  • Loading branch information
andrewelamb authored Feb 28, 2024
2 parents e64b82c + 86a9d11 commit cfd6b3a
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 106 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,7 @@ jobs:
run: |
# ran only on certain files for now
# add here when checked
poetry run pylint schematic/visualization/* schematic/configuration/*.py schematic/exceptions.py schematic/help.py schematic/loader.py schematic/version.py
# do all utils but schema_utils.py
poetry run pylint schematic/utils/cli_utils.py schematic/utils/curie_utils.py schematic/utils/df_utils.py
poetry run pylint schematic/utils/general.py schematic/utils/google_api_utils.py schematic/utils/io_utils.py
poetry run pylint schematic/utils/validate_rules_utils.py schematic/utils/validate_utils.py schematic/utils/viz_utils.py
poetry run pylint schematic/visualization/* schematic/configuration/*.py schematic/exceptions.py schematic/help.py schematic/loader.py schematic/version.py schematic/utils/*.py
#----------------------------------------------
# run test suite
Expand Down
4 changes: 3 additions & 1 deletion schematic/schemas/data_model_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ def run_rel_functions(
)

elif rel_func == parse_validation_rules:
return parse_validation_rules(attr_relationships[csv_header])
rules = attr_relationships[csv_header]
if isinstance(rules, dict) or isinstance(rules, list):
return parse_validation_rules(rules)

elif rel_func == get_label_from_display_name:
return get_label_from_display_name(
Expand Down
Loading

0 comments on commit cfd6b3a

Please sign in to comment.