Reverted the removal of force upgrade and improved some code#62
Merged
Reverted the removal of force upgrade and improved some code#62
Conversation
Contributor
Reviewer's Guide by SourceryThis pull request reverts the removal of the force upgrade option, improves code readability by refactoring the GUI layout to use Gtk.Box, enhances package upgrade data retrieval, and updates the application's version number. Sequence diagram for get_pkg_upgrade_data functionsequenceDiagram
participant Backend
participant Popen
participant CompletedProcess
Backend->Backend: get_pkg_upgrade(option)
Backend->Popen: Run pkg upgrade command
activate Popen
Popen-->Backend: Returns upgrade_verbose
deactivate Popen
Backend->Backend: update_pkg.splitlines()
Backend->Backend: get_packages_list_by_upgrade_type for UPGRADED, DOWNGRADED, INSTALLED, REINSTALLED, REMOVED
Backend->Backend: Calculate total_of_packages
Backend-->Backend: Returns pkg_dictionary
Updated class diagram for Data classclassDiagram
class Data{
+major_upgrade: bool
+kernel_upgrade: bool
+backup: bool
+new_abi: str
+home: str
+packages_dictionary: dict
+second_update: bool
+stop_pkg_refreshing: bool
+system_tray
+update_started: bool
+username: str
}
note for Data "total_packages attribute was removed"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey @ericbsd - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider using more descriptive variable names than
box1,box2, etc. - it will improve readability. - It looks like you're calculating the total number of packages in multiple places; can you consolidate this logic?
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟡 Complexity: 2 issues found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary by Sourcery
This pull request improves the update station by refactoring the GTK layout code, displaying the number of packages to be upgraded, downgraded, installed, reinstalled, and removed, and fetching package updates in one go.
Enhancements:
Gtk.Boxinstead ofGtk.VBoxandGtk.HBoxfor improved flexibility and maintainability.