-
Notifications
You must be signed in to change notification settings - Fork 32
🐛 Add internal scheduler UI in dynamic-scheduler #8410
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
Merged
GitHK
merged 16 commits into
ITISFoundation:master
from
GitHK:pr-osparc-migrate-dy-scheduler-part3
Sep 24, 2025
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
a7fbab8
seprated tests into different folders
1d44f57
added base structure
ef563b0
refactor helpers position and added default index
8e8b9b2
refactor position of utils
de19002
refactor ui tests
104e2e9
changed import
33b592e
tests are finally working as expected
891c0b2
left only essential reset
c763594
reverted change
77ed410
moved parametrization to fixture
52cb93c
added proper error
b0048d9
Merge remote-tracking branch 'upstream/master' into pr-osparc-migrate…
e9db919
removed comments
297dbf4
removed function
91ebd6f
Merge remote-tracking branch 'upstream/master' into pr-osparc-migrate…
9c4934d
Merge remote-tracking branch 'upstream/master' into pr-osparc-migrate…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GitHK marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
.../src/simcore_service_dynamic_scheduler/api/frontend/routes_internal_scheduler/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| from nicegui import APIRouter | ||
|
|
||
| from . import _index | ||
|
|
||
| router = APIRouter() | ||
|
|
||
| router.include_router(_index.router) | ||
|
|
||
| __all__: tuple[str, ...] = ("router",) |
8 changes: 8 additions & 0 deletions
8
...er/src/simcore_service_dynamic_scheduler/api/frontend/routes_internal_scheduler/_index.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| from nicegui import APIRouter, ui | ||
|
|
||
| router = APIRouter() | ||
|
|
||
|
|
||
| @router.page("/") | ||
| async def index(): | ||
| ui.label("PLACEHOLDER for internal scheduler UI") |
6 changes: 6 additions & 0 deletions
6
services/dynamic-scheduler/tests/unit/api_frontend/_routes_internal_scheduler/conftest.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import pytest | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def use_internal_scheduler() -> bool: | ||
| return True |
26 changes: 26 additions & 0 deletions
26
...ices/dynamic-scheduler/tests/unit/api_frontend/_routes_internal_scheduler/test__index_.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # pylint:disable=redefined-outer-name | ||
| # pylint:disable=unused-argument | ||
|
|
||
| from helpers import assert_contains_text | ||
| from playwright.async_api import Page | ||
| from simcore_service_dynamic_scheduler.api.frontend._utils import get_settings | ||
|
|
||
| pytest_simcore_core_services_selection = [ | ||
| "postgres", | ||
| "rabbit", | ||
| "redis", | ||
| ] | ||
|
|
||
| pytest_simcore_ops_services_selection = [ | ||
| "redis-commander", | ||
| ] | ||
|
|
||
|
|
||
| async def test_placeholder_index( | ||
| app_runner: None, async_page: Page, server_host_port: str | ||
| ): | ||
| await async_page.goto( | ||
| f"{server_host_port}{get_settings().DYNAMIC_SCHEDULER_UI_MOUNT_PATH}" | ||
| ) | ||
|
|
||
| await assert_contains_text(async_page, "PLACEHOLDER for internal scheduler UI") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
services/dynamic-scheduler/tests/unit/api_frontend/routes_external_scheduler/conftest.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # pylint:disable=redefined-outer-name | ||
|
|
||
| from typing import Final | ||
| from unittest.mock import AsyncMock | ||
|
|
||
| import pytest | ||
| from pytest_mock import MockerFixture | ||
|
|
||
| _MODULE: Final["str"] = ( | ||
| "simcore_service_dynamic_scheduler.api.frontend.routes_external_scheduler._service" | ||
| ) | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def use_internal_scheduler() -> bool: | ||
| return False | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def mock_stop_dynamic_service(mocker: MockerFixture) -> AsyncMock: | ||
| async_mock = AsyncMock() | ||
| mocker.patch(f"{_MODULE}.stop_dynamic_service", async_mock) | ||
| return async_mock | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def mock_remove_tracked_service(mocker: MockerFixture) -> AsyncMock: | ||
| async_mock = AsyncMock() | ||
| mocker.patch(f"{_MODULE}.remove_tracked_service", async_mock) | ||
| return async_mock |
GitHK marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,7 +38,7 @@ | |
| ] | ||
|
|
||
| pytest_simcore_ops_services_selection = [ | ||
| # "redis-commander", | ||
| "redis-commander", | ||
| ] | ||
|
|
||
|
|
||
|
|
||
GitHK marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,7 @@ | |
| ] | ||
|
|
||
| pytest_simcore_ops_services_selection = [ | ||
| # "redis-commander", | ||
| "redis-commander", | ||
| ] | ||
|
|
||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.