-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Make warnings error in tests (#1192)
Change `pytest` configuration to change warnings into errors in the tests. Fix code that emites warning. <!-- Generated by sourcery-ai[bot]: start summary --> ## Summary by Sourcery Convert warnings to errors in tests by updating the `pytest` configuration and refactor code to handle warnings appropriately. Enhance the `sentry_sdk` usage by replacing `push_scope` with `new_scope`. Improve data handling in `batch_backend.py` and update tests to align with these changes. Bug Fixes: - Fix the `test_no_update` test to correctly handle URL errors by using `urllib.error.URLError`. - Correct the `test_ignore_file_exists_old_date` test to assert the correct release version and URL. Enhancements: - Update the `sentry_sdk` usage to replace `push_scope` with `new_scope` for better scope management. - Improve the `CheckVersionThread` initialization by updating the default URL to a more relevant one. - Enhance the `get_data_to_write` method in `batch_backend.py` to handle empty data frames more efficiently. - Refactor the `decode_zstd1` and `decode_zstd0` functions to use `np.frombuffer` instead of `np.fromstring` for better performance and compatibility. Tests: - Modify tests to treat warnings as errors by updating the `pytest` configuration. - Update tests to reflect changes in the `sentry_sdk` scope management. <!-- Generated by sourcery-ai[bot]: end summary --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Enhanced handling of color information in ROI parameters, allowing for greater flexibility with color keys. - Improved compatibility with newer versions of `napari` by adjusting colormap settings. - **Bug Fixes** - Ensured default color values are returned correctly when no regions of interest are present. - **Documentation** - Updated type annotations for better clarity and usability. - **Tests** - Enhanced test cases related to color handling and ROI parameters to improve robustness. - Added version checks for `napari` to ensure correct behavior based on library version. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
- Loading branch information
1 parent
a7ab81f
commit 48f82c1
Showing
16 changed files
with
105 additions
and
62 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.