Skip to content

Improve run.py of regression #4417

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Septa2112
Copy link
Contributor

  1. Fix script interruption on case failure
  2. improve statistics logic
  3. enable select specific issue ids

1. Fix script interruption on case failure
2. improve statistics logic
3. enable select specific issue ids
@Septa2112 Septa2112 marked this pull request as ready for review June 26, 2025 06:54
Copy link
Collaborator

@lum1n0us lum1n0us left a comment

Choose a reason for hiding this comment

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

Just some minor comments. Let me know if I should merge it directly or wait for the following modifications.


selected_ids = None
if args.issues:
selected_ids = [int(x) for x in args.issues.split(",") if x.strip().isdigit()]
Copy link
Collaborator

Choose a reason for hiding this comment

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

If I recall correctly, --type=list can do the trick. But might still need to convert str to int.

issue_ids_should_test if issue_ids_should_test else "no more"

format_issue_ids_should_test = (
" ".join("#" + str(x) for x in issue_ids_should_test)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a hint, usually, using f-strings has better performance than string concatenation.

else "no more"
)
format_json_only_ids = (
" ".join("#" + str(x) for x in json_only_ids) if json_only_ids else "no more"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a hint, usually, using f-strings has better performance than string concatenation.

print(f"==== Test results ====")
print(f" Total: {total}")
print(f" Total: {total}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

you might want to add one more space before Total: and let all three lines aligned at : and remove the space before {total}

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.

3 participants