Skip to content

add SpeedTest #51

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 2 commits into
base: master
Choose a base branch
from

Conversation

rubalsxngh
Copy link

This pull request addresses the Advanced Task to create GUI based SpeedTest, outlined in Issue Number: #50

Task Accomplished:

  • Implemented a simple visual interface using the tkinter library under scripts/speedtest
  • Displayed the download, upload speeds and Ping in a GUI window.
  • Included a button to trigger the speed test.
  • Organize the functionality into a class named SpeedTester.
  • The class should encapsulate the speed test logic and GUI components.
  • Instantiate the class and run the GUI application.

@IQExotic, could you please review these changes and provide your feedback? Thank you!

Copy link

@IQExotic IQExotic left a comment

Choose a reason for hiding this comment

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

Sure, here's some feedback...

  • Code Organization: Your code is well-organized and follows a logical structure. The comments are really helpful and provide a good understanding of what each part of the code does.

  • Redundant Code: There are lines of code that can be removed. The lines where you set the check_speed_button and quit_button to NORMAL state are repeated twice. You only need to set them once.

  • Error Handling: There is no error handling in the check_speed function. If the speedtest fails for any reason (e.g., no internet connection), the program will crash. Consider adding a try-except block to handle potential exceptions.

  • UI Feedback: When the speedtest is running, there's no feedback to the user. Consider adding a label or changing the text of the button to indicate that the speedtest is in progress.

  • Image Paths: The paths to the images are hardcoded. If the images are not in the specified location, the program will crash. Like already mentioned, Consider adding error handling for this.

  • Code Comments: While your comments are generally helpful, the comment for the resize_image function could be more descriptive.

Besides that your Code looks really good! Good Job!

@rubalsxngh
Copy link
Author

rubalsxngh commented Jan 11, 2024

Hello @IQExotic , thanks for the feedback.

I've implemented the suggested changes and completed the tasks as discussed:

  • Resolved redundant code and set button states appropriately.
  • Added comprehensive error handling for potential SpeedTest and image loading issues.
  • Enhanced UI feedback to provide a more responsive indication of the SpeedTest process.
  • Updated comments on resize image function for better clarity and understanding.

Please take a moment to review, if everything aligns with your expectations.

Copy link

@IQExotic IQExotic left a comment

Choose a reason for hiding this comment

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

This looks good! The only thing I would have done differently is add an alternative option to launch if the image is not found, instead of printing an error. But this works too! If you are happy with this, so am I. Let me know if you want further instructions on this project.

@rubalsxngh
Copy link
Author

@IQExotic , Thanks for the review. I'll add an alternative option to launch, if the image not found. Moreover, I am open to receiving additional instructions for the project.

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.

2 participants