Skip to content

DeepcopyDataflowAnalysis: make sure disabled calls do not cause issues#697

Draft
MichaelSt98 wants to merge 1 commit into
mainfrom
nams_deepcopydataflow_disabled_calls
Draft

DeepcopyDataflowAnalysis: make sure disabled calls do not cause issues#697
MichaelSt98 wants to merge 1 commit into
mainfrom
nams_deepcopydataflow_disabled_calls

Conversation

@MichaelSt98
Copy link
Copy Markdown
Collaborator

Description

This pull request adds support for disabling certain calls from being processed during the data offload deepcopy analysis, based on configurable pattern matching. The main changes introduce a mechanism to skip analysis for calls (such as error handler replacements) that match user-specified patterns, and include a new test to validate this behavior.

Dataflow Analysis Configuration

  • The DeepcopyDataflowAnalysis class now accepts a disabled_calls argument, allowing users to specify call name patterns (using wildcards) that should be ignored during analysis. The logic for checking if a call is disabled is encapsulated in the new is_disabled_call method, which uses fnmatch for pattern matching.

  • The DataOffloadDeepcopyAnalysis transformation class is updated to extract disabled call patterns from the transformation item configuration and pass them to the dataflow analysis. [1] [2]

Test Enhancements

  • A new test fixture, deepcopy_abort_code, is added to provide source code and setup for testing the disabled call functionality.

  • A new test, test_offload_deepcopy_analysis_ignores_unresolved_abor1_replacement, is added to verify that calls matching the disabled pattern (e.g., ABOR1*) are ignored by the analysis, ensuring that replacement error handler calls are not processed.

Dependency and Import Updates

  • The fnmatch module is imported to support pattern-based matching of call names.
  • The test imports are updated to include RemoveCodeTransformation.

Contributor Declaration

By opening this pull request, I affirm the following:

  • All authors agree to the Contributor License Agreement.
  • The code follows the project's coding standards.
  • I have performed self-review and added comments where needed.
  • I have added or updated tests to verify that my changes are effective and functional.
  • I have run all existing tests and confirmed they pass.

@MichaelSt98 MichaelSt98 requested review from awnawab and mlange05 June 3, 2026 13:21
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

Documentation for this branch can be viewed at https://sites.ecmwf.int/docs/loki/697/index.html

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

❌ Patch coverage is 94.73684% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.21%. Comparing base (3f7f59f) to head (30aae07).
⚠️ Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
...i/transformations/data_offload/offload_deepcopy.py 92.30% 1 Missing ⚠️
...ations/data_offload/tests/test_offload_deepcopy.py 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #697      +/-   ##
==========================================
- Coverage   96.41%   94.21%   -2.21%     
==========================================
  Files         284      288       +4     
  Lines       47492    47662     +170     
==========================================
- Hits        45791    44904     -887     
- Misses       1701     2758    +1057     
Flag Coverage Δ
lint_rules 96.40% <ø> (ø)
loki 94.18% <94.73%> (-2.23%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MichaelSt98 MichaelSt98 marked this pull request as draft June 3, 2026 14:51
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.

1 participant