Skip to content

Conversation

@jdebacker
Copy link
Member

This PR seeks to address Issue #1047 and reduce the number of pytest warnings.

@codecov-commenter
Copy link

codecov-commenter commented Sep 28, 2025

Codecov Report

❌ Patch coverage is 30.00000% with 70 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.02%. Comparing base (61de262) to head (4d3b8b0).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
ogcore/SS.py 31.25% 55 Missing ⚠️
ogcore/TPI.py 0.00% 15 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1061      +/-   ##
==========================================
+ Coverage   72.70%   73.02%   +0.32%     
==========================================
  Files          21       21              
  Lines        5111     5105       -6     
==========================================
+ Hits         3716     3728      +12     
+ Misses       1395     1377      -18     
Flag Coverage Δ
unittests 73.02% <30.00%> (+0.32%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
ogcore/constants.py 100.00% <100.00%> (ø)
ogcore/parameter_plots.py 78.26% <100.00%> (-0.09%) ⬇️
ogcore/parameter_tables.py 86.07% <100.00%> (ø)
ogcore/TPI.py 34.49% <0.00%> (-1.17%) ⬇️
ogcore/SS.py 79.54% <31.25%> (+6.12%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jdebacker jdebacker marked this pull request as ready for review October 3, 2025 02:24
jdebacker and others added 2 commits October 3, 2025 10:01
- Add timeout (600s) and error handling to TPI.py client.gather() with fallback to serial computation
- Increase SS.py client.gather() timeout from 300s to 600s for consistency
- Update SS.py to use logging.warning instead of print for better consistency
- Adjust LocalCluster timeouts in test_TPI.py fixture:
  - Increase memory_limit from 2GB to 3GB
  - Increase communication timeout from 300s to 900s
  - Increase heartbeat_interval from 10s to 30s
  - Increase death_timeout from 60s to 120s

These changes address issues with long-running computationally intensive
tasks where communication can break down due to overly aggressive timeouts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
The previous commit incorrectly used client.gather(timeout=) which is not
a valid parameter. This commit fixes the implementation to use the correct
approach:
- Use distributed.wait() with timeout to wait for futures to complete
- Check if any futures did not complete (not_done) and raise TimeoutError
- Only call client.gather() after confirming all futures are done
- Maintain the same error handling and fallback to serial computation

This properly implements timeout handling for long-running dask computations
in both TPI.py and SS.py.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@rickecon
Copy link
Member

rickecon commented Oct 6, 2025

@jdebacker. I have reviewed the code of this PR and approved it. Is it ready to merge?

@jdebacker
Copy link
Member Author

@rickecon Changing to WIP -- still resolving some local tests (dask timing out in some TPI full runs) and looking to improve performance.

@jdebacker jdebacker changed the title Fix test warnings [WIP] Fix test warnings Oct 6, 2025
@jdebacker jdebacker changed the title [WIP] Fix test warnings Fix test warnings Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants