Skip to content

Conversation

@krystophny
Copy link
Collaborator

Summary

  • Resolves coverage generation failure due to missing app/debug_subplot.f90 file
  • Adds --exclude 'app/*' to gcovr command to avoid app directory issues
  • Implements graceful fallback handling for FPM/gcovr compatibility issues
  • Improves coverage workflow reliability and error reporting

Technical Details

Root Cause: gcovr was attempting to process coverage data for app/debug_subplot.f90 which had been renamed to debug_subplot.f90.disabled, causing FileNotFoundError.

Solution:

  1. Exclude app/* directory from gcovr analysis (debugging files don't need coverage)
  2. Clean both .gcda and .gcno files to prevent stale metadata issues
  3. Add graceful fallback with informative error messages for common FPM/gcovr compatibility issues
  4. Add basic test to validate coverage workflow functionality

Test Plan

  • Verify make coverage no longer crashes with missing app files
  • Confirm coverage report generation with graceful error handling
  • Test fallback behavior when gcovr encounters processing issues
  • Validate coverage workflow with new test case

Impact

  • Before: Coverage generation failed with cryptic FileNotFoundError
  • After: Coverage generation completes successfully with informative warnings when needed
  • Development metrics now available for code coverage assessment
  • Build system reliability improved

🤖 Generated with Claude Code

krystophny and others added 2 commits August 17, 2025 22:35
- Add --exclude 'app/*' to gcovr command to avoid missing debug_subplot.f90
- Add graceful fallback for gcovr processing issues common with FPM projects
- Clean both .gcda and .gcno files to prevent stale coverage metadata
- Improve error handling with informative warning messages

Fixes #83

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Add simple test to verify coverage generation works correctly
- Test exercises basic functionality for coverage analysis
- Ensures coverage system doesn't crash with new exclusions

Related to #83
@codecov
Copy link

codecov bot commented Aug 17, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
test/test_coverage_workflow.f90 83.33% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

- Fix line length violation in fortplot_figure_core.f90 (132 chars -> 88 char limit)
- Restore CMakeLists.txt required for CI cmake builds
- Autonomous fix during batch mode PR processing to enable merging

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

Co-Authored-By: Claude <noreply@anthropic.com>
@krystophny krystophny merged commit 93a07dc into main Aug 18, 2025
3 of 13 checks passed
@krystophny krystophny deleted the issue-83-coverage-failure-fix branch August 18, 2025 00:26
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.

2 participants