Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferjiangkells committed Jul 24, 2024
1 parent 9961eb9 commit 4b75a79
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ venv.bak/
*.zip
src/miade/model_builders/output/
!src/miade/data/*
.DS_Store

#testing
tests/data/
Expand Down
8 changes: 6 additions & 2 deletions src/miade/annotators.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,9 @@ def _load_problems_lookup_data(self) -> None:
raise RuntimeError(f"No lookup data configured: {data_path} does not exist!")

self.negated_lookup = load_lookup_data(data_path + "negated.csv", is_package_data=is_package_data, as_dict=True)
self.historic_lookup = load_lookup_data(data_path + "historic.csv", is_package_data=is_package_data, as_dict=True)
self.historic_lookup = load_lookup_data(
data_path + "historic.csv", is_package_data=is_package_data, as_dict=True
)
self.suspected_lookup = load_lookup_data(
data_path + "suspected.csv", is_package_data=is_package_data, as_dict=True
)
Expand Down Expand Up @@ -773,7 +775,9 @@ def _load_med_allergy_lookup_data(self) -> None:
if not os.path.isdir(data_path):
raise RuntimeError(f"No lookup data configured: {data_path} does not exist!")

self.valid_meds = load_lookup_data(data_path + "valid_meds.csv", is_package_data=is_package_data, no_header=True)
self.valid_meds = load_lookup_data(
data_path + "valid_meds.csv", is_package_data=is_package_data, no_header=True
)
self.reactions_subset_lookup = load_lookup_data(
data_path + "reactions_subset.csv", is_package_data=is_package_data, as_dict=True
)
Expand Down
1 change: 1 addition & 0 deletions tests/test_annotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ def test_vtm_med_conversions(test_meds_algy_medcat_model, test_vtm_concepts):
route=None,
)


def test_annotator_config(test_meds_algy_medcat_model, test_problems_medcat_model, test_config):
# check that all loads ok if pass in explicit path
test_config.lookup_data_path = "./src/miade/data/"
Expand Down

0 comments on commit 4b75a79

Please sign in to comment.