Skip to content

Commit

Permalink
imporve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hanars committed Jul 26, 2023
1 parent da6f005 commit ec236a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
run: |
export DATASETS_DIR=./hail_search/fixtures
coverage run --source="./hail_search" --omit="./hail_search/__main__.py","./hail_search/test_utils.py" -m pytest hail_search/
coverage report --fail-under=98
coverage report --fail-under=99
nodejs:
runs-on: ubuntu-latest
Expand Down
9 changes: 3 additions & 6 deletions hail_search/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ def search_hail_backend(request):
data_types = list(sample_data.keys())
single_data_type = data_types[0] if len(data_types) == 1 else None

if single_data_type:
sample_data = sample_data[single_data_type]
data_type = single_data_type
query_cls = QUERY_CLASS_MAP[single_data_type]
else:
raise NotImplementedError
sample_data = sample_data[single_data_type]
data_type = single_data_type
query_cls = QUERY_CLASS_MAP[single_data_type]

query = query_cls(data_type, sample_data=sample_data, **request)
return query.search()

0 comments on commit ec236a1

Please sign in to comment.