handle optional dependencies in tests#1038
Merged
Merged
Conversation
Oisin-M
reviewed
Jun 24, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #1038 +/- ##
===========================================
- Coverage 82.44% 82.41% -0.04%
===========================================
Files 237 237
Lines 16698 16722 +24
Branches 808 813 +5
===========================================
+ Hits 13767 13781 +14
- Misses 2694 2699 +5
- Partials 237 242 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
colonesej
force-pushed
the
fix/optional_deps_tests
branch
from
June 24, 2026 15:03
bd93d52 to
90f6998
Compare
Co-authored-by: Oisin-M <60450429+Oisin-M@users.noreply.github.com>
Oisin-M
approved these changes
Jun 24, 2026
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.
This pull request improves test robustness and reliability by adding conditional skips to tests that depend on optional modules such as
geopandasandpyodc. It introduces new flags in the testing utilities to check for the presence of these dependencies and updates relevant tests to skip execution gracefully if the required modules are missing, preventing unnecessary test failures.Test robustness and conditional skipping:
NO_ODCandNO_GEOPANDASflags inearthkit.data.utils.testingto check for the presence ofpyodcandgeopandasmodules, respectively.pyodcis not installed, usingNO_ODCandpytest.skip. [1] [2] [3] [4] [5]geopandasis not installed, usingNO_GEOPANDASandpytest.mark.skipiforpytest.skip. [1] [2] [3] [4] [5] [6] [7]These changes ensure that tests requiring optional dependencies do not fail unnecessarily, improving the reliability of the test suite across different environments.
Contributor Declaration
By opening this pull request, I affirm the following: