eic / EICrecon

EIC Reconstruction - JANA based
https://eic.github.io/EICrecon
GNU Lesser General Public License v3.0
5 stars 26 forks source link

JEventProcessorPODIO: deprecate podio:output_include_collections parameter #1466

Closed veprbl closed 1 month ago

veprbl commented 2 months ago

This is a follow up on a resolution from #1323

What kind of change does this PR introduce?

Please check if this PR fulfills the following:

Does this PR introduce breaking changes? What changes might users need to make to their code?

No

Does this PR change default behavior?

No

github-actions[bot] commented 2 months ago

Capybara summary for PR 1466

wdconinc commented 2 months ago

Been experimenting with automated code review. This is what chatgpt gives.

Here is a review of the provided patch:

General Overview

The patch deprecates the podio:output_include_collections parameter in favor of podio:output_collections and makes related code adjustments. It also includes some changes for "Include What You Use" (IWYU) compliance.

Detailed Review

1. Deprecation of podio:output_include_collections

Changes Made:

Code Review:

2. Include What You Use (IWYU) Adjustments

Changes Made:

Code Review:

Suggested Improvements

  1. Warning Level: Change the log level for deprecation warning to warn:
    m_log->warn("The podio:output_include_collections was provided, but is deprecated. Use podio:output_collections instead.");
  2. Code Comments: Add comments explaining why the delay is introduced when the deprecated parameter is used. This will help future maintainers understand the reasoning behind this decision.

Summary

Overall, the patch is well-constructed, handling the deprecation gracefully while maintaining backward compatibility. The IWYU changes are appropriate and follow best practices. Only minor adjustments regarding logging levels and additional comments are recommended.

Example Modified Section

if (m_output_include_collections_set) {
    m_log->warn("The podio:output_include_collections was provided, but is deprecated. Use podio:output_collections instead.");
    // Adding a delay to ensure users notice the deprecation warning.
    using namespace std::chrono_literals;
    std::this_thread::sleep_for(10s);
}

Great job on the patch!

veprbl commented 1 month ago

@wdconinc Ready to approve?