GEOPY-2815: address report of updated code linters#904
Open
domfournier wants to merge 9 commits into
Open
Conversation
updates: - [github.com/python-poetry/poetry: 2.1.3 → 2.4.0](python-poetry/poetry@2.1.3...2.4.0) - [github.com/hadialqattan/pycln: v2.5.0 → v2.6.0](hadialqattan/pycln@v2.5.0...v2.6.0) - [github.com/astral-sh/ruff-pre-commit: v0.12.5 → v0.15.12](astral-sh/ruff-pre-commit@v0.12.5...v0.15.12) - [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.20.2](pre-commit/mirrors-mypy@v1.15.0...v1.20.2) - [github.com/codespell-project/codespell: v2.4.1 → v2.4.2](codespell-project/codespell@v2.4.1...v2.4.2) - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](pre-commit/pre-commit-hooks@v5.0.0...v6.0.0)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the test suite and a couple of enums to address failures/warnings introduced by updated linting rules (primarily around regex string handling), and modernizes enum usage to StrEnum.
Changes:
- Convert many
pytest.raises(..., match=...)/pytest.warns(..., match=...)patterns to raw strings (r"...") to satisfy updated linter expectations around regex strings. - Switch
DependencyTypeandGroupTypeEnumfrom(str, Enum)toStrEnumfor clearer string/enum semantics. - Minor formatting adjustments in a few tests (e.g., multi-line
pytest.warnsblocks).
Reviewed changes
Copilot reviewed 57 out of 57 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/workspace_test.py | Use raw-string regex patterns in warning/exception assertions. |
| tests/workspace_context_test.py | Use raw-string regex patterns in warning/exception assertions. |
| tests/validators_test.py | Use raw-string regex patterns in exception assertions. |
| tests/utils_test.py | Use raw-string regex patterns in exception assertions. |
| tests/ui_json/uijson_test.py | Use raw-string regex patterns in exception assertions. |
| tests/ui_json/forms_test.py | Use raw-string regex patterns and minor formatting for readability. |
| tests/surveys/survey_tipper_test.py | Use raw-string regex patterns in exception assertions. |
| tests/surveys/survey_mt_test.py | Use raw-string regex patterns in exception assertions. |
| tests/surveys/survey_ground_tem_test.py | Use raw-string regex patterns in exception assertions. |
| tests/surveys/survey_fem_test.py | Use raw-string regex patterns in exception assertions. |
| tests/surveys/survey_dcip_test.py | Use raw-string regex patterns in exception assertions. |
| tests/surveys/survey_airborne_tem_test.py | Use raw-string regex patterns in exception assertions. |
| tests/surveys/airborne_app_con_test.py | Use raw-string regex patterns in exception assertions. |
| tests/shared_utils_test.py | Use raw-string regex patterns in exception assertions. |
| tests/safe_load_dataset_test.py | Use raw-string regex patterns in exception assertions. |
| tests/objects/vp_mesh_test.py | Use raw-string regex patterns in exception assertions. |
| tests/objects/text_object_test.py | Use raw-string regex patterns in exception assertions (and adjusts match specificity). |
| tests/objects/surface_data_test.py | Use raw-string regex patterns + minor formatting for pytest.warns. |
| tests/objects/point_data_test.py | Use raw-string regex patterns in warning/exception assertions. |
| tests/objects/octree_test.py | Use raw-string regex patterns in exception assertions. |
| tests/objects/grid_object_test.py | Use raw-string regex patterns in exception assertions. |
| tests/objects/grid_2d_test.py | Use raw-string regex patterns in exception assertions. |
| tests/objects/geo_image_test.py | Use raw-string regex patterns + minor formatting for multi-line assertions. |
| tests/objects/drillhole_v4_0_test.py | Use raw-string regex patterns in warning/exception assertions. |
| tests/objects/drillhole_data_test.py | Use raw-string regex patterns in warning/exception assertions. |
| tests/objects/drape_model_test.py | Use raw-string regex patterns in exception assertions. |
| tests/objects/curve_data_test.py | Use raw-string regex patterns in warning/exception assertions. |
| tests/objects/block_model_test.py | Use raw-string regex patterns in warning/exception assertions. |
| tests/metadata_test.py | Use raw-string regex patterns in exception assertions. |
| tests/merge/merger_test.py | Use raw-string regex patterns in exception assertions. |
| tests/merge/merger_surface_test.py | Use raw-string regex patterns in exception assertions. |
| tests/merge/merger_drape_model_test.py | Use raw-string regex patterns in exception assertions. |
| tests/merge/merger_curve_test.py | Use raw-string regex patterns in exception assertions. |
| tests/interpretation_section_test.py | Use raw-string regex patterns in exception assertions. |
| tests/input_file_utils_test.py | Use raw-string regex patterns in exception assertions. |
| tests/input_file_test.py | Use raw-string regex patterns in warning/exception assertions. |
| tests/groups/ui_json_group_test.py | Use raw-string regex patterns in exception assertions. |
| tests/groups/remove_root_test.py | Use raw-string regex patterns in exception assertions. |
| tests/groups/property_group_test.py | Use raw-string regex patterns + minor formatting for a multi-line assertion. |
| tests/groups/group_test.py | Use raw-string regex patterns in exception assertions. |
| tests/entity_attributes_test.py | Use raw-string regex patterns in exception assertions. |
| tests/data/visual_parameters_test.py | Use raw-string regex patterns in exception assertions. |
| tests/data/texture_data_test.py | Use raw-string regex patterns in exception assertions. |
| tests/data/text_data_test.py | Use raw-string regex patterns in exception assertions. |
| tests/data/reference_data_test.py | Use raw-string regex patterns + minor formatting for a multi-line assertion. |
| tests/data/data_instantiation_test.py | Use raw-string regex patterns in exception assertions. |
| tests/data/coulour_test.py | Use raw-string regex patterns in exception assertions. |
| tests/data/color_map_test.py | Use raw-string regex patterns in exception assertions. |
| tests/data/boolean_test.py | Use raw-string regex patterns + minor formatting for a multi-line assertion. |
| tests/data/add_filename_data_test.py | Use raw-string regex patterns in warning/exception assertions. |
| tests/cut_by_extent_test.py | Use raw-string regex patterns in exception assertions. |
| tests/copy_extent_cell_data_test.py | Use raw-string regex patterns in exception assertions. |
| tests/copy_entity_test.py | Use raw-string regex patterns in warning/exception assertions. |
| tests/coordinate_system_test.py | Use raw-string regex patterns in exception assertions. |
| tests/conversion_base_test.py | Use raw-string regex patterns + minor formatting for a multi-line assertion. |
| geoh5py/ui_json/forms.py | Change DependencyType to inherit from StrEnum. |
| geoh5py/groups/property_group_type.py | Change GroupTypeEnum to inherit from StrEnum. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/GA_4.8 #904 +/- ##
===============================================
Coverage 91.16% 91.16%
===============================================
Files 114 114
Lines 10595 10595
Branches 1964 1964
===============================================
Hits 9659 9659
Misses 493 493
Partials 443 443
🚀 New features to boost your workflow:
|
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.
GEOPY-2815 - address report of updated code linters