Skip to content

Commit

Permalink
fix live tests: update rsd api endpoint and repository url filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
fdiblen committed Oct 16, 2024
1 parent c01093b commit b3e706b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions livetests/test_howfairis_on_rsd_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


def get_urls(n=None):
software_api_url = "https://www.research-software.nl/api/software?isPublished=true"
software_api_url = "https://research-software-directory.org/api/v1/repository_url"
try:
response = requests.get(software_api_url)
# If the response was successful, no Exception will be raised
Expand All @@ -21,9 +21,9 @@ def get_urls(n=None):
return False

urls = []
for d in response.json():
for key, values in d["repositoryURLs"].items():
urls.extend(values)
for _repo in response.json():
if _repo["url"].startswith(("https://github.com", "https://gitlab.com")):
urls.append(_repo["url"])
if n is None:
return random.shuffle(urls)
else:
Expand Down

0 comments on commit b3e706b

Please sign in to comment.