Skip to content

Commit

Permalink
Rename convert_query
Browse files Browse the repository at this point in the history
  • Loading branch information
IanCa committed Jun 17, 2024
1 parent cdec86d commit 4d94071
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hed/models/basic_search_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from hed.models.hed_tag import HedTag


def convert_query_to_form(search_query, schema):
def convert_query(search_query, schema):
"""Converts the given basic search query into a hed_string
Parameters:
Expand Down
6 changes: 3 additions & 3 deletions tests/models/test_basic_search_util.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
from hed import load_schema_version
from hed.models.basic_search_util import convert_query_to_form
from hed.models.basic_search_util import convert_query


class TestConvertQueryToForm(unittest.TestCase):
Expand All @@ -10,11 +10,11 @@ def test_basic_convert(self):
input = "@Event, Head-part*, Time-interval/1"
expected_output = "@Event, Item/Biological-item/Anatomical-item/Body-part/Head-part*, Property/Data-property/Data-value/Spatiotemporal-value/Temporal-value/Time-interval/1"

actual_output = convert_query_to_form(input, self.schema)
actual_output = convert_query(input, self.schema)
self.assertEqual(expected_output, actual_output)

input = "@Head-part*, Event, Time-interval/1"
expected_output = "@Item/Biological-item/Anatomical-item/Body-part/Head-part*, Event, Property/Data-property/Data-value/Spatiotemporal-value/Temporal-value/Time-interval/1"

actual_output = convert_query_to_form(input, self.schema)
actual_output = convert_query(input, self.schema)
self.assertEqual(expected_output, actual_output)

0 comments on commit 4d94071

Please sign in to comment.