Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate operations from the Notification API #472

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
1c14ca9
Add NotificationClient to GalaxyClient
heisner-tillman Jun 6, 2023
668c696
Create NotificationClient including get_notification_status operation
heisner-tillman Jun 6, 2023
defc72c
Create testfile for NotificationClient with test for get_notification…
heisner-tillman Jun 6, 2023
a68a6b9
Update the template_galaxy.yml and template_galaxy.ini to enable noti…
heisner-tillman Jun 6, 2023
8612361
Rewrite docstring of the get_notification_status method to improve do…
heisner-tillman Jun 7, 2023
b824c47
Refactor test for get_notification_status operation
heisner-tillman Jun 7, 2023
ecf20b5
Refactor get_notification_status operation for easier use
heisner-tillman Jun 7, 2023
70a1f85
Refactor test for get_notification_status operation for a more compre…
heisner-tillman Jun 7, 2023
fbe8824
Refactor get_notifications_status operation
heisner-tillman Jun 27, 2023
44e8ed7
Refactor test for get_notifications_status
heisner-tillman Jun 27, 2023
f834911
Remove unused type hints
heisner-tillman Jun 27, 2023
68cd163
Add get_notification_preferences operation
heisner-tillman Jun 27, 2023
9e87955
Add update_notification_preferences operation
heisner-tillman Jun 27, 2023
d4ec7a7
Add test for get_notification_preferences and update_notification_pre…
heisner-tillman Jun 27, 2023
0c83487
Add broadcast_notification operation
heisner-tillman Jun 27, 2023
3b27f12
Add send_notification operation
heisner-tillman Jun 27, 2023
4e375a0
Add helper functions for testing
heisner-tillman Jun 27, 2023
6e99167
Add test for send_notification, broadcast_notification and get_notifi…
heisner-tillman Jun 27, 2023
9fd14bd
Fix typing hint
heisner-tillman Jun 27, 2023
10ca1b9
Add get_user_notifications operation
heisner-tillman Jun 27, 2023
66b42ad
Add test for get_user_notifications operation
heisner-tillman Jun 27, 2023
26de12b
Add show_notification operation
heisner-tillman Jun 27, 2023
75f43cf
Add test for show_notification operation
heisner-tillman Jun 27, 2023
66c56a3
Add update_user_notification and update_user_notifications operation
heisner-tillman Jun 27, 2023
719e23a
Add 204 as accepted reponse in put request
heisner-tillman Jun 27, 2023
ad46de0
Add test for update_user_notification and update_user_notifications o…
heisner-tillman Jun 27, 2023
0db0c83
Add get_broadcasted and update_broadcasted_notification operations
heisner-tillman Jun 27, 2023
701b886
Add test for get_broadcasted and update_broadcasted_notification oper…
heisner-tillman Jun 27, 2023
d3c4f24
Add test for get_broadcasted operation
heisner-tillman Jun 27, 2023
ee675ca
Add get_all_broadcasted operations
heisner-tillman Jun 27, 2023
e8740db
Add test for get_all_broadcasted operations
heisner-tillman Jun 27, 2023
fd80ed9
Add delete_notification and delete_notifications operation
heisner-tillman Jun 27, 2023
e2e5e34
Add test for delete_notification and delete_notifications operation
heisner-tillman Jun 27, 2023
2e0bfd0
Add docstring to indicate what galaxy version is required to run the …
heisner-tillman Jun 30, 2023
5edbecf
Remove wrong parameter in docstring
heisner-tillman Aug 12, 2023
f71d7a6
Refactor type assignment in tests and docstring in NotficationClient
heisner-tillman Aug 26, 2023
db96185
Remove enable_notication_sytem flag from ini
heisner-tillman Aug 29, 2023
1db36dc
Add typing-extensions to install requirements.
heisner-tillman Aug 29, 2023
05d69a2
Added version guard to test and adjusted .yaml file to enable notific…
heisner-tillman Aug 30, 2023
1b2b8e0
Move duplicated annotation
heisner-tillman Oct 6, 2023
b0fadda
Doc fixes
nsoranzo Oct 6, 2023
de08aa2
Refactor put request to return None on 204 response
heisner-tillman Oct 17, 2023
7a83ae7
Remove typing-extensions as it is not longer needed
heisner-tillman Oct 17, 2023
26663e8
debug test
bernt-matthias Oct 25, 2024
7d03c6f
disable celery for tests
bernt-matthias Oct 25, 2024
d9dcad8
Revert "disable celery for tests"
bernt-matthias Oct 28, 2024
31ed6ba
implement tasks API and adapt notification tests
bernt-matthias Oct 28, 2024
a1e9cfd
sending notifications is task based only sinde 24.1
bernt-matthias Oct 28, 2024
c8c934b
fix import order
bernt-matthias Oct 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bioblend/_tests/GalaxyTestBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
@test_util.skip_unless_galaxy()
class GalaxyTestBase(unittest.TestCase):
gi: GalaxyInstance
config: Dict[str, Any]

@classmethod
def setUpClass(cls):
galaxy_key = os.environ["BIOBLEND_GALAXY_API_KEY"]
galaxy_url = os.environ["BIOBLEND_GALAXY_URL"]
cls.gi = GalaxyInstance(url=galaxy_url, key=galaxy_key)
cls.config = cls.gi.config.get_config()

def _test_dataset(self, history_id: str, contents: str = "1\t2\t3", **kwargs: Any) -> str:
tool_output = self.gi.tools.paste_content(contents, history_id, **kwargs)
Expand Down
599 changes: 599 additions & 0 deletions bioblend/_tests/TestGalaxyNotifications.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions bioblend/_tests/template_galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ galaxy:
enable_quotas: true
cleanup_job: onsuccess
enable_celery_tasks: true
enable_notification_system: true
4 changes: 4 additions & 0 deletions bioblend/galaxy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
invocations,
jobs,
libraries,
notifications,
quotas,
roles,
tasks,
tool_data,
tool_dependencies,
tools,
Expand Down Expand Up @@ -109,6 +111,8 @@ def __init__(
self.tool_data = tool_data.ToolDataClient(self)
self.folders = folders.FoldersClient(self)
self.tool_dependencies = tool_dependencies.ToolDependenciesClient(self)
self.notifications = notifications.NotificationClient(self)
self.tasks = tasks.TasksClient(self)

def __repr__(self) -> str:
"""
Expand Down
Loading
Loading