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

Refactor: Change issues from unknown to uncategorized #925

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

MarceloRobert
Copy link
Collaborator

  • Renames Unknown issues to Uncategorized issues
  • Changes the behavior of the filters to return a flag for if it has uncategorized issues, instead of considering them as a normal issue
  • Refactors TreeDetailsView and TreeDetailsSummaryView to use pydantic models directly

How to test

Go to a tree or hardware details page where there are builds/boots/tests with uncategorized issues
Filter them through the issues list and through the filter modal
Check if everything is being filtered as intended

Closes #910

@MarceloRobert MarceloRobert self-assigned this Feb 13, 2025
@MarceloRobert MarceloRobert force-pushed the refactor/rename-unknown-issues branch from ec2a467 to 14041a3 Compare February 13, 2025 16:54
@@ -283,7 +284,11 @@ def __init__(self, data: Dict, process_body=False) -> None:
self.filterTestPath = ""
self.filterBootPath = ""
self.filterBuildValid = set()
self.filterIssues = {"build": set(), "boot": set(), "test": set()}
self.filterIssues: Dict[PossibleTabs, Set[str, Optional[int]]] = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is Set[str, Optional[int]] a valid type? I couldn't find anything to support this annotation. You might have forgot a Union here, I'm not sure

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I forgot a thing here but it's not an Union, it's a Tuple


return Response(response)
return Response(valid_response.model_dump(), status=HTTPStatus.OK)
Copy link
Contributor

Choose a reason for hiding this comment

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

Renames unknown issues to Uncategorized issues

Changes the behavior of the filters to return a flag for if it has uncategorized issues, instead of considering them as a normal issue

Refactors TreeDetailsView and TreeDetailsSummaryView to use pydantic models directly

Closes #910
@MarceloRobert MarceloRobert force-pushed the refactor/rename-unknown-issues branch from 14041a3 to 0241a71 Compare February 14, 2025 14:24
Copy link
Collaborator

@Francisco2002 Francisco2002 left a comment

Choose a reason for hiding this comment

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

Nice job!! Just a comment

@@ -283,7 +299,11 @@ def __init__(self, data: Dict, process_body=False) -> None:
self.filterTestPath = ""
self.filterBootPath = ""
self.filterBuildValid = set()
self.filterIssues = {"build": set(), "boot": set(), "test": set()}
self.filterIssues: dict[PossibleTabs, set[tuple[str, Optional[int]]]] = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
self.filterIssues: dict[PossibleTabs, set[tuple[str, Optional[int]]]] = {
self.filterIssues: dict[PossibleTabs, set[Tuple[str, Optional[int]]]] = {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is being used to start following #930

Copy link
Contributor

@murilx murilx Feb 14, 2025

Choose a reason for hiding this comment

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

Nice call. Since this ticket is not a priority we shouldn't change what we've already done but I think we should stop to use the deprecated typing for new code

@@ -1,5 +1,7 @@
from typing import Dict
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

@murilx murilx left a comment

Choose a reason for hiding this comment

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

Worked well on my tests

@MarceloRobert MarceloRobert merged commit 4c116cc into main Feb 14, 2025
5 checks passed
@MarceloRobert MarceloRobert mentioned this pull request Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor "Unknown" issues to "Uncategorized"
3 participants