Skip to content

Commit

Permalink
Fix unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
bebatut committed Jan 29, 2025
1 parent 3f01474 commit 5d38284
Show file tree
Hide file tree
Showing 4 changed files with 618 additions and 681 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lint_and_unittest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ jobs:
run: python -m pip install -r requirements.txt
- name: Run unittests
run: |
cd sources
PYTHONPATH=bin python -m unittest discover -s bin/tests
4 changes: 3 additions & 1 deletion sources/bin/extract_galaxy_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ def add_projects(self, wf: dict) -> None:
f"https://{ self.source.lower() }.eu/projects/{project['id']}",
{"Accept": "application/json"},
)
self.projects.append(wfhub_project["data"]["attributes"]["title"])
if "attributes" in wfhub_project["data"] and "title" in wfhub_project["data"]["attributes"]:
self.projects.append(wfhub_project["data"]["attributes"]["title"])

def test_tags(self, tags: dict) -> bool:
"""
Expand Down Expand Up @@ -190,6 +191,7 @@ def add_workflows_from_workflowhub(self, prefix: str = "") -> None:
)
print(f"Workflows from WorkflowHub: {len(wfhub_wfs['data'])}")
data = wfhub_wfs["data"]
print(data)
if self.test:
data = data[:10]
for wf in data:
Expand Down
Loading

0 comments on commit 5d38284

Please sign in to comment.