Skip to content

Commit

Permalink
Merge branch 'main' into v0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
riklopfer committed Mar 21, 2023
2 parents d464281 + c632191 commit c4a8aaf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
pull_request:
branches: [ "main" ]
schedule:
- cron: "0 4 * * *"
- cron: "0 4 * * 0"


jobs:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
backoff
ratelimit
requests
requests-cache>=1.0.0a0
requests-cache>=1.0.0
urllib3
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
url="https://github.com/3mcloud/umls-rat",
include_package_data=True,
packages=find_packages(),
install_requires=["requests", "requests-cache>=1.0.0a0", "ratelimit", "backoff"],
install_requires=["requests", "requests-cache>=1.0.0", "ratelimit", "backoff"],
python_requires=">=3.7",
)
11 changes: 7 additions & 4 deletions tests/lookup/test_umls.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,12 @@ def test_term_search(api, kwargs, expected_names):

def simple_search(api, term: str) -> Dict:
search_result = lookup_umls.term_search(api, term)
if search_result:
return search_result["concepts"].pop(0)
assert search_result, f"Search result is empty: {search_result}"
assert search_result.get(
"concepts"
), f"Search result contains no concepts: {search_result}"

return search_result["concepts"].pop(0)


def test_search_idempotence(api):
Expand All @@ -185,5 +189,4 @@ def test_search_idempotence(api):

c1 = simple_search(api, "Room air")
c2 = simple_search(api, "Room Air")
c3 = simple_search(api, "Room air (substance)")
assert c1 == c2 == c3
assert c1 == c2

0 comments on commit c4a8aaf

Please sign in to comment.