Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
svittoz committed Feb 12, 2024
1 parent dd2aa9d commit c40038b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion eds_scikit/biology/utils/process_concepts.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from eds_scikit import datasets
from eds_scikit.biology.utils.process_units import Units
from eds_scikit.io import settings
from eds_scikit.utils.typing import DataFrame

default_standard_terminologies = settings.standard_terminologies
default_source_terminologies = settings.source_terminologies
Expand Down Expand Up @@ -74,7 +75,9 @@ def remove_concept_codes(
logger.error("concept_codes must be string or list")
raise TypeError

def get_concept_codes_table(self, terminologies=None, relationship_table=None):
def get_concept_codes_table(
self, terminologies: str = None, relationship_table: DataFrame = None
):

if not terminologies:
terminologies = self.concept_codes.keys()
Expand Down
8 changes: 8 additions & 0 deletions tests/test_biology.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ def concepts_sets(data):

assert set(concept_set.concept_codes) == set(concepts_sets[0].concept_codes)

relationship_table = prepare_biology_relationship_table(
data, [concept_set], get_all_terminologies=True
)
concept_set.get_concept_codes_table(relationship_table=relationship_table)

concept_set.add_target_unit("g")
concept_set.add_conversion("g", "mol", 180)

return concepts_sets


Expand Down

0 comments on commit c40038b

Please sign in to comment.