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

Remove channels from the Application Tester #7742

Merged
merged 7 commits into from
Dec 1, 2023
Merged

Conversation

drew2a
Copy link
Contributor

@drew2a drew2a commented Dec 1, 2023

This PR makes changes that fix the Application Tester's work.

Also, it contains a small Application Tester refactoring (e.g., colored console output and actions definitions).

Fixes #7739
Fixes #7740

A part of #7669

@drew2a drew2a marked this pull request as ready for review December 1, 2023 15:15
@drew2a drew2a requested review from a team, kozlovsky and qstokkink and removed request for a team December 1, 2023 15:15
- Remove import statement for `pathlib.Path`
- Remove unused imports for `explore_channel_action`, `manage_channel_action`, `scroll_discovered_action`, and `subscribe_unsubscribe_action`

This commit refactors the main script by removing unnecessary imports and unused code. It removes the import statement for `pathlib.Path` as it is not used in the script. Additionally, it removes the unused imports for `explore_channel_action`, `manage_channel_action`, `scroll_discovered_action`, and `subscribe_unsubscribe_action`. These changes improve the readability and maintainability of the codebase.
- Remove unused methods `set_channel_download`, `get_channel_download`, `set_add_to_channel`, and `get_add_to_channel` from `DownloadConfig` class
- Refactor code in `DownloadManager` class to remove the usage of the removed methods
- Update logic in `DownloadsEndpoint` class to skip hidden downloads without checking for channel downloads
This commit updates the formatting and colors of the logger in the `logger.py` file. The log colors for 'DEBUG' and 'INFO' levels have been set to white. This improves the readability and visual appeal of log messages.
- Removed unnecessary buttons from the page navigation in Tribler's application tester.
- Removed unnecessary code for updating download progress information for ChannelTorrents in the DownloadsPage widget.
The code changes refactor the action selection logic in the `perform_random_action` method of `executor.py`. Instead of using a series of if-else statements, a dictionary called `actions` is introduced to map action names to their corresponding classes or lambda functions. This improves readability and maintainability of the code.

The commit message summarizes the significant changes made to improve the action selection logic in executor.py.
This commit adds a new test case to ensure that the `torrent_finished` notification is called when the torrent finishes. The test verifies that the notification is correctly called with the expected parameters, including the infohash, name, and hidden status of the download.

The added test case helps ensure that the `on_torrent_finished_alert` method behaves as expected and triggers the appropriate notification when a torrent finishes downloading.
The code changes refactor the instantiation of actions in the `perform_random_action` method of `executor.py`. Instead of using lambda functions, the actions are now instantiated directly. This improves code readability and maintainability.
@drew2a drew2a merged commit 6f554e4 into Tribler:main Dec 1, 2023
16 checks passed
@drew2a drew2a deleted the fix/7739 branch December 1, 2023 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: 'MetadataStore' object has no attribute 'ChannelMetadata' Application Tester is broken
3 participants