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

Implement default submission template #338

Merged
merged 21 commits into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
6 changes: 4 additions & 2 deletions pysqa/queueadapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) Jan Janssen

import os
from typing import List, Optional
from typing import List, Optional, Tuple, Union

import pandas

Expand Down Expand Up @@ -326,7 +326,9 @@ def check_queue_parameters(
run_time_max: Optional[int] = None,
memory_max: Optional[int] = None,
active_queue: Optional[dict] = None,
) -> List:
) -> Tuple[
Union[float, int, None], Union[float, int, None], Union[float, int, None]
]:
Comment on lines +318 to +320
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Approve signature change and update docstring.

The method signature update improves type safety and code readability by providing a more specific return type annotation. This change is beneficial for maintainability and helps catch potential type-related errors early.

However, the method's docstring still mentions returning a List, which is now inconsistent with the new Tuple return type.

Please update the docstring to reflect the new return type. For example:

"""
...
Returns:
    Tuple[Union[float, int, None], Union[float, int, None], Union[float, int, None]]: A tuple containing the checked parameters (cores, run_time_max, memory_max).
"""

Also, ensure that the method implementation returns a tuple that matches this new type annotation.

"""
Check the parameters of a queue.

Expand Down
Loading
Loading