Repository: neutrons/data_workflow
Pull request #243: Add help text for ROI options in configuration_ref_m.html
Author: login: jmborr
Created: 2025-05-20T23:40:04Z | Merged: 2025-05-22T19:47:47Z

# Description of the changes

Check all that apply:
- [ ] ~updated documentation~
- [x] Source added/refactored
- [ ] ~Added unit tests~
- [ ] ~Added integration tests~
- [ ] ~(If applicable) Verified that manual tests requiring the /SNS and /HFIR filesystems pass without fail~

**References:**
- Links to IBM EWM items: [11337](https://ornlrse.clm.ibmcloud.com/ccm/web/projects/Neutron%20Data%20Project%20%28Change%20Management%29#action=com.ibm.team.workitem.viewWorkItem&id=11337)

# Manual test for the reviewer
[Build a local development](https://data-workflow.readthedocs.io/en/latest/developer/instruction/build.html#building-a-local-deployment) and make sure the help lines for the ROI-related options do show up in the reduction settings for REF_M page http://localhost/reduction/ref_m/

<img src="https://github.com/user-attachments/assets/4f62ddbb-79dd-4bb4-877d-46c9af60461f" width=400>

# Check list for the reviewer
- [ ] best software practices
    + [ ] clearly named variables (better to be verbose in variable names)
    + [ ] code comments explaining the intent of code blocks
- [ ] All the tests are passing
- [ ] The documentation is up to date
- [ ] code comments added when explaining intent


Diff:
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 94016b16..8cd2d4a7 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -12,7 +12,7 @@ Check all that apply:
 - Links to IBM EWM items:
 - Links to related issues or pull requests:
 
-# Manual test for the reviewer
+# :warning: Manual test for the reviewer
 (Instructions for testing here)
 
 # Check list for the reviewer
diff --git a/src/webmon_app/reporting/templates/reduction/configuration_ref_m.html b/src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
index 7b0e99e0..5192f64d 100644
--- a/src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
+++ b/src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
@@ -5,6 +5,15 @@
 {% block banner %}{{ instrument }} Configuration {% endblock %}
 
 {% block header %}
+<style>
+.help_line {
+    display: block;
+    font-size: 14px;
+    color: #555;
+    margin-top: 8px;
+    margin-bottom: 8px
+}
+</style>
 <script>
   var action_records = {% autoescape off %}{{ action_list }}{% endautoescape %};
   var default_requested = 0;
@@ -111,14 +120,13 @@
     <!-- Automated ROI options -->
     <tr>
         <td>
+            <div class='help_line'>
+                Automated ROI: Once a peak ROI is chosen for each peak—whether automatically
+                extracted from the metadata in the events file or manually specified using the fields below—the
+                application will fit a peak shape to refine the ROI boundaries.
+            </div>
             {{ options_form.fit_peak_in_roi }}
-            <span title="Once the reflected peak ROI is selected for each peak below,
-you can try to fine tune this ROI by fitting for a peak within that
-region and updating the ROI [both center and width] according to the
-location found. Check the box if you want to find a peak within the
-ROI and redefine the ROI afterwards.">
-                <strong>Automated ROI</strong>
-            </span>
+            <strong>Automated ROI</strong>
         </td>
     </tr>
 
@@ -143,10 +151,12 @@
     <!-- Force peak ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force peak ROI: ignore metadata <b>ROI1</b> stored in the logs
+                of the event file by defining your own <i>min</i> and <i>max</i> peak ranges
+            </div>
             {{ options_form.force_peak }}
-            <span title="You can choose to replace the ROI in the data by your own range.
-Check the following box if you want to define your own ROI and
-use it for peak selection."><strong>Force peak ROI</strong></span>
+            <span><strong>Force peak ROI</strong></span>
             <label class='short_label' for='peak_min'>Pixel<sub>min</sub></label>
             {{ options_form.peak_min }}
             <label class='short_label' for='peak_max'>Pixel<sub>max</sub></label>
@@ -154,25 +164,29 @@
         </td>
     </tr>
 
-    <!-- Second ROI options -->
+    <!-- Use background ROI options -->
     <tr>
         <td onclick="toggle_roi_bck('#{{ options_form.use_roi_bck.id_for_label }}');">
+            <div class='help_line'>
+                Use background: use metadata <b>ROI2</b> stored in the logs of the event file
+                to automatically choose a <i>min</i> and <i>max</i> pixel region defining the background
+            </div>
             {{ options_form.use_roi_bck }}
-            <span title="A second ROI is available in the data file and can be used to define the background.
-Check the following box if you want to use the 2nd ROI for your background,
-otherwise a default region will be used."><strong>Use 2nd ROI</strong></span>
+            <span><strong>Use background</strong></span>
         </td>
     </tr>
 
     <!-- Force background ROI options -->
     <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force background ROI: ignore metadata <b>ROI2</b>
+                and instead choose your own <i>min</i> and <i>max</i> pixel regions defining the background
+            </div>
             <span onclick="toggle_roi_bck('#{{ options_form.force_background.id_for_label }}');">
                 {{ options_form.force_background }}
             </span>
-            <span title="You can choose to replace the 2nd ROI in the data by your own range.
-Check the following box if you want to define your own 2nd ROI and use it for background selection.
-The option to use the 2nd ROI has to be turned ON to use this option."><strong>Force background ROI</strong></span>
+            <span><strong>Force background ROI</strong></span>
             <label class='short_label' for='bck_min'>Bck<sub>min</sub></label>
             {{ options_form.bck_min }}
             <label class='short_label'  for='bck_max'>Bck<sub>max</sub></label>
@@ -183,24 +197,29 @@
     <!-- Side background options -->
     <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Use side background: ignore metadata <b>ROI2</b>
+                and instead choose a region on each side of the reflected peak to estimate the background.
+            </div>
             <span onclick="toggle_roi_bck('#{{ options_form.use_side_bck.id_for_label }}');">
                 {{ options_form.use_side_bck }}
             </span>
-            <span title="As an alternative to using the 2nd ROI,  you can use a region around
-the reflected peak to estimate the background. Check the following box
-if you want to use the region on each side of the peak to estimate your background.">
+            <span>
                 <strong>Use side background</strong>
             </span>
             <label class='long_label' for='bck_width'>Pixels on each side</label> {{ options_form.bck_width }}
         </td>
     </tr>
 
-    <!-- Force low-res ROI options -->
+    <!-- Force vertical ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force vertical ROI: ignore metadata <b>ROI1</b> and choose your own
+                <i>min</i> and <i>max</i> peak ranges along the vertical (Y-axis)
+            </div>
             {{ options_form.force_low_res }}
-            <span title="Override the vertical (Y-Pixel) range in the sample logs with your own range.
-Check the following box if you want to define your own range and use it for peak selection.">
+            <span>
                 <strong>Force vertical ROI</strong></span>
             <label class='short_label' for='low_res_min'>Pixel<sub>min</sub></label>
             {{ options_form.low_res_min }}
@@ -221,10 +240,12 @@
     <!-- Force peak ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force peak ROI: ignore metadata <b>ROI3</b> stored in the logs
+                of the event file by defining your own <i>min</i> and <i>max</i> peak ranges
+            </div>
             {{ options_form.force_peak_s2 }}
-            <span title="You can choose to replace the ROI in the data by your own range.
-Check the following box if you want to define your own ROI and
-use it for peak selection."><strong>Force peak ROI</strong></span>
+            <span><strong>Force peak ROI</strong></span>
             <label class='short_label' for='peak_min_s2'>Pixel<sub>min</sub></label>
             {{ options_form.peak_min_s2 }}
             <label class='short_label' for='peak_max_s2'>Pixel<sub>max</sub></label>
@@ -232,25 +253,29 @@
         </td>
     </tr>
 
-    <!-- Second ROI options -->
+    <!-- Use background ROI options -->
     <tr>
         <td onclick="toggle_roi_bck('#{{ options_form.use_roi_bck_s2.id_for_label }}');">
+            <div class='help_line'>
+                Use background: use metadata <b>ROI4</b> stored in the logs of the event file
+                to automatically choose a <i>min</i> and <i>max</i> pixel region defining the background
+            </div>
             {{ options_form.use_roi_bck_s2 }}
-            <span title="A second ROI is available in the data file and can be used to define the background.
-Check the following box if you want to use the 2nd ROI for your background,
-otherwise a default region will be used."><strong>Use 2nd ROI</strong></span>
+            <span><strong>Use background</strong></span>
         </td>
     </tr>
 
     <!-- Force background ROI options -->
     <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force background ROI: ignore metadata <b>ROI4</b>
+                and instead choose your own <i>min</i> and <i>max</i> pixel regions defining the background
+            </div>
             <span onclick="toggle_roi_bck('#{{ options_form.force_background_s2.id_for_label }}');">
                 {{ options_form.force_background_s2 }}
             </span>
-            <span title="You can choose to replace the 2nd ROI in the data by your own range.
-Check the following box if you want to define your own 2nd ROI and use it for background selection.
-The option to use the 2nd ROI has to be turned ON to use this option."><strong>Force background ROI</strong></span>
+            <span><strong>Force background ROI</strong></span>
             <label class='short_label' for='bck_min_s2'>Bck<sub>min</sub></label>
             {{ options_form.bck_min_s2 }}
             <label class='short_label' for='bck_max_s2'>Bck<sub>max</sub></label>
@@ -261,24 +286,29 @@
     <!-- Side background options -->
     <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Use side background: ignore metadata <b>ROI4</b>
+                and instead choose a region on each side of the reflected peak to estimate the background.
+            </div>
             <span onclick="toggle_roi_bck('#{{ options_form.use_side_bck_s2.id_for_label }}');">
                 {{ options_form.use_side_bck_s2 }}
             </span>
-            <span title="As an alternative to using the 2nd ROI,  you can use a region around
-the reflected peak to estimate the background. Check the following box
-if you want to use the region on each side of the peak to estimate your background.">
+            <span>
                 <strong>Use side background</strong>
             </span>
             <label class='long_label' for='bck_width_s2'>Pixels on each side</label> {{ options_form.bck_width_s2 }}
         </td>
     </tr>
 
-    <!-- Force low-res ROI options -->
+    <!-- Force vertical ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force vertical ROI: ignore metadata <b>ROI3</b> and choose your own
+                <i>min</i> and <i>max</i> peak ranges along the vertical (Y-axis)
+            </div>
             {{ options_form.force_low_res_s2 }}
-            <span title="Override the vertical (Y-Pixel) range in the sample logs with your own range.
-Check the following box if you want to define your own range and use it for peak selection.">
+            <span>
                 <strong>Force vertical ROI</strong></span>
             <label class='short_label' for='low_res_min_s2'>Pixel<sub>min</sub></label>
             {{ options_form.low_res_min_s2 }}
@@ -300,10 +330,12 @@
     <!-- Force peak ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force peak ROI: ignore metadata <b>ROI5</b> stored in the logs
+                of the event file by defining your own <i>min</i> and <i>max</i> peak ranges
+            </div>
             {{ options_form.force_peak_s3 }}
-            <span title="You can choose to replace the ROI in the data by your own range.
-Check the following box if you want to define your own ROI and
-use it for peak selection."><strong>Force peak ROI</strong></span>
+            <span><strong>Force peak ROI</strong></span>
             <label class='short_label' for='peak_min_s3'>Pixel<sub>min</sub></label>
             {{ options_form.peak_min_s3 }}
             <label class='short_label' for='peak_max_s3'>Pixel<sub>max</sub></label>
@@ -311,25 +343,29 @@
         </td>
     </tr>
 
-    <!-- Second ROI options -->
+    <!-- Use background ROI options -->
     <tr>
         <td onclick="toggle_roi_bck('#{{ options_form.use_roi_bck_s3.id_for_label }}');">
+            <div class='help_line'>
+                Use background: use metadata <b>ROI6</b> stored in the logs of the event file
+                to automatically choose a <i>min</i> and <i>max</i> pixel region defining the background
+            </div>
             {{ options_form.use_roi_bck_s3 }}
-            <span title="A second ROI is available in the data file and can be used to define the background.
-Check the following box if you want to use the 2nd ROI for your background,
-otherwise a default region will be used."><strong>Use 2nd ROI</strong></span>
+            <span><strong>Use background</strong></span>
         </td>
     </tr>
 
     <!-- Force background ROI options -->
     <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force background ROI: ignore metadata <b>ROI6</b>
+                and instead choose your own <i>min</i> and <i>max</i> pixel regions defining the background
+            </div>
             <span onclick="toggle_roi_bck('#{{ options_form.force_background_s3.id_for_label }}');">
                 {{ options_form.force_background_s3 }}
             </span>
-            <span title="You can choose to replace the 2nd ROI in the data by your own range.
-Check the following box if you want to define your own 2nd ROI and use it for background selection.
-The option to use the 2nd ROI has to be turned ON to use this option."><strong>Force background ROI</strong></span>
+            <span><strong>Force background ROI</strong></span>
             <label class='short_label' for='bck_min_s3'>Bck<sub>min</sub></label>
             {{ options_form.bck_min_s3 }}
             <label class='short_label' for='bck_max_s3'>Bck<sub>max</sub></label>
@@ -340,24 +376,29 @@
     <!-- Side background options -->
     <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Use side background: ignore metadata <b>ROI6</b>
+                and instead choose a region on each side of the reflected peak to estimate the background.
+            </div>
             <span onclick="toggle_roi_bck('#{{ options_form.use_side_bck_s3.id_for_label }}');">
                 {{ options_form.use_side_bck_s3 }}
             </span>
-            <span title="As an alternative to using the 2nd ROI,  you can use a region around
-the reflected peak to estimate the background. Check the following box
-if you want to use the region on each side of the peak to estimate your background.">
+            <span>
                 <strong>Use side background</strong>
             </span>
             <label class='long_label' for='bck_width_s3'>Pixels on each side</label> {{ options_form.bck_width_s3 }}
         </td>
     </tr>
 
-    <!-- Force low-res ROI options -->
+    <!-- Force vertical ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force vertical ROI: ignore metadata <b>ROI5</b> and choose your own
+                <i>min</i> and <i>max</i> peak ranges along the vertical (Y-axis)
+            </div>
             {{ options_form.force_low_res_s3 }}
-            <span title="Override the vertical (Y-Pixel) range in the sample logs with your own range.
-Check the following box if you want to define your own range and use it for peak selection.">
+            <span>
                 <strong>Force vertical ROI</strong></span>
             <label class='short_label' for='low_res_min_s3'>Pixel<sub>min</sub></label>
             {{ options_form.low_res_min_s3 }}
diff --git a/src/webmon_app/reporting/tests/test_reduction/test_views.py b/src/webmon_app/reporting/tests/test_reduction/test_views.py
index 9098e05e..473de07e 100644
--- a/src/webmon_app/reporting/tests/test_reduction/test_views.py
+++ b/src/webmon_app/reporting/tests/test_reduction/test_views.py
@@ -202,7 +202,7 @@ def test_ref_m(self):
         self.assertEqual(response.status_code, 200)
         self.assertTemplateUsed(response, "reduction/configuration_ref_m.html")
         # uncomment the following line only when debugging, in order to inspect the response content
-        open("/tmp/junk.html", "wb").write(response.content)  # take a look to file:///tmp/junk.html with the browser
+        # open("/tmp/junk.html", "wb").write(response.content)  # take a look to file:///tmp/junk.html with the browser
 
     def test_configuration_change(self):
         # no data


Reviews:
user: login: copilot-pull-request-reviewer[bot]
body: ## Pull Request Overview

This PR adds help text for ROI options in the configuration_ref_m.html template and comments out debugging code in test_views.py.  
- Added a CSS style and help text (using <div class='help_line'>) to guide users through different ROI configuration options.  
- Updated labels and minor text adjustments in ROI sections.  
- Commented out a debug statement in the test_views.py file for cleaner test execution.

### Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

| File | Description |
| ---- | ----------- |
| src/webmon_app/reporting/tests/test_reduction/test_views.py | Debug code commented out to prevent writing test output to /tmp/junk.html |
| src/webmon_app/reporting/templates/reduction/configuration_ref_m.html | Added inline help text and updated ROI option labels and numbering |




state: COMMENTED
author_association: NONE
submitted_at: 2025-05-20T23:40:30Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 2**

<details>
<summary>♻️ Duplicate comments (14)</summary><blockquote>

<details>
<summary>src/webmon_app/reporting/templates/reduction/configuration_ref_m.html (14)</summary><blockquote>

`166-174`: **Duplicate: help text needs translation.**

---

`181-188`: **Duplicate: help text needs translation.**

---

`199-207`: **Duplicate: help text needs translation.**

---

`213-223`: **Duplicate: help text needs translation.**

---

`242-247`: **Duplicate: help text needs translation.**

---

`255-263`: **Duplicate: help text needs translation.**

---

`270-277`: **Duplicate: help text needs translation.**

---

`288-295`: **Duplicate: help text needs translation.**

---

`302-310`: **Duplicate: help text needs translation.**

---

`332-337`: **Duplicate: help text needs translation.**

---

`345-353`: **Duplicate: help text needs translation.**

---

`360-367`: **Duplicate: help text needs translation.**

---

`378-387`: **Duplicate: help text needs translation.**

---

`393-402`: **Duplicate: help text needs translation.**

</blockquote></details>

</blockquote></details>

<details>
<summary>🧹 Nitpick comments (2)</summary><blockquote>

<details>
<summary>src/webmon_app/reporting/templates/reduction/configuration_ref_m.html (1)</summary><blockquote>

`8-15`: **Consider externalizing the `.help_line` CSS into a shared stylesheet for maintainability.**  
Embedding a `<style>` block directly in this template makes it harder to keep styles consistent across the app. Moving these rules to a central CSS file keeps HTML lean and promotes reuse.

</blockquote></details>
<details>
<summary>src/webmon_app/reporting/tests/test_reduction/test_views.py (1)</summary><blockquote>

`205-205`: **Remove or guard the debugging file write.**  
The commented-out `open("/tmp/junk.html", ...)` no longer adds value in CI runs. Remove it or conditionally enable it under a debug flag to keep tests clean.

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between c9b03641294d7485d66e9b58ab2b1ba52a9d4f50 and faed6cfd3ea72560be8ee5b9b7530a7a85041d80.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `src/webmon_app/reporting/templates/reduction/configuration_ref_m.html` (8 hunks)
* `src/webmon_app/reporting/tests/test_reduction/test_views.py` (1 hunks)

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (1)</summary>

* GitHub Check: tests

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-20T23:54:28Z
user: login: copilot-pull-request-reviewer[bot]
body: ## Pull Request Overview

This PR enhances the REF_M configuration page by adding explanatory help text for various ROI options and cleans up a leftover debug line in the tests.

- Introduces inline CSS and `<div class="help_line">` blocks above each ROI form control to guide users.
- Comments out a temporary debug write to `/tmp/junk.html` in the `test_ref_m` unit test.
- Updates HTML structure by removing tooltip titles and replacing them with visible help blocks.

### Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

| File                                                              | Description                                               |
| ----------------------------------------------------------------- | --------------------------------------------------------- |
| src/webmon_app/reporting/tests/test_reduction/test_views.py       | Commented out debug write to `/tmp/junk.html`.            |
| src/webmon_app/reporting/templates/reduction/configuration_ref_m.html | Added inline `<style>` block and help text for each ROI option. |


<details>
<summary>Comments suppressed due to low confidence (2)</summary>

**src/webmon_app/reporting/tests/test_reduction/test_views.py:202**
* The new help text isn't verified by this test. Consider adding assertions to confirm that the rendered `help_line` content appears in the response HTML.
```
def test_ref_m(self):
```
**src/webmon_app/reporting/templates/reduction/configuration_ref_m.html:247**
* [nitpick] The label 'Force peak ROI' is reused for multiple ROI sections (e.g., primary, S2, S3). Consider differentiating them (e.g., 'Force peak ROI S2') to avoid user confusion.
```
<span><strong>Force peak ROI</strong></span>
```
</details>


state: COMMENTED
author_association: NONE
submitted_at: 2025-05-21T17:58:52Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 1**

<details>
<summary>♻️ Duplicate comments (4)</summary><blockquote>

<details>
<summary>src/webmon_app/reporting/tests/test_reduction/test_views.py (1)</summary><blockquote>

`204-205`: **LGTM! Good code cleanup.**

Commenting out the debug file writing prevents unnecessary file I/O during tests while preserving the code for future debugging if needed.

</blockquote></details>
<details>
<summary>src/webmon_app/reporting/templates/reduction/configuration_ref_m.html (3)</summary><blockquote>

`8-15`: **LGTM! Good addition of styling for help text.**

The CSS styling appropriately formats the help text to be visually distinct from the form controls.

---

`122-126`: **LGTM! Clear help text for the Automated ROI option.**

The help text clearly explains the purpose and behavior of the Automated ROI feature, improving user understanding.

---

`153-157`: **LGTM! Clear help text for the Force peak ROI option.**

The help text clearly explains the purpose and behavior of the Force peak ROI feature, improving user understanding.

</blockquote></details>

</blockquote></details>

<details>
<summary>🧹 Nitpick comments (1)</summary><blockquote>

<details>
<summary>src/webmon_app/reporting/templates/reduction/configuration_ref_m.html (1)</summary><blockquote>

`382-382`: **Remove extra blank line.**

There's an unnecessary blank line after the help text div closing tag, which should be removed for consistency with the rest of the template.

```diff
                Use side background: ignore metadata <b>ROI6</b>
                and instead choose a region on each side of the reflected peak to estimate the background.
            </div>
-

            <span onclick="toggle_roi_bck('#{{ options_form.use_side_bck_s3.id_for_label }}');">
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between c9b03641294d7485d66e9b58ab2b1ba52a9d4f50 and f2f05f4638b3086e16f693df1bf550cfbc03bfcb.

</details>

<details>
<summary>📒 Files selected for processing (3)</summary>

* `.github/pull_request_template.md` (1 hunks)
* `src/webmon_app/reporting/templates/reduction/configuration_ref_m.html` (8 hunks)
* `src/webmon_app/reporting/tests/test_reduction/test_views.py` (1 hunks)

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (2)</summary>

* GitHub Check: tests
* GitHub Check: linux

</details>

<details>
<summary>🔇 Additional comments (5)</summary><blockquote>

<details>
<summary>.github/pull_request_template.md (1)</summary>

`15-15`: **LGTM! Good enhancement to the PR template.**

Adding the warning emoji helps draw attention to the manual testing section, making it more likely that reviewers will notice and follow the instructions.

</details>
<details>
<summary>src/webmon_app/reporting/templates/reduction/configuration_ref_m.html (4)</summary>

`169-173`: **LGTM! Clear help text for the Use background option.**

The help text clearly explains the purpose and behavior of the Use background feature, improving user understanding.

---

`181-185`: **LGTM! Clear help text for the Force background ROI option.**

The help text clearly explains the purpose and behavior of the Force background ROI feature, improving user understanding.

---

`199-203`: **LGTM! Clear help text for the Use side background option.**

The help text clearly explains the purpose and behavior of the Use side background feature, improving user understanding.

---

`216-220`: **LGTM! Clear help text for the Force vertical ROI option.**

The help text clearly explains the purpose and behavior of the Force vertical ROI feature, improving user understanding.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-21T18:03:57Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 15**

<details>
<summary>♻️ Duplicate comments (2)</summary><blockquote>

<details>
<summary>src/webmon_app/reporting/templates/reduction/configuration_ref_m.html (1)</summary><blockquote>

`123-129`: _🛠️ Refactor suggestion_

**Internationalize and semantically structure “Automated ROI” help text**  
The new help text is hardcoded in English and spans multiple lines within a single `<div>`. Wrap the text in `{% blocktrans %}` (or `{% trans %}`) and consider breaking it into `<p>` elements for readability.  


Example diff:
```diff
- <div class='help_line'>
-     Automated ROI: Once a peak ROI is chosen for each peak—whether automatically
-     extracted from the metadata in the events file or manually specified using the fields below—the
-     application will fit a peak shape to refine the ROI boundaries.
- </div>
+ <div class='help_line'>
+   {% blocktrans %}
+   Automated ROI: Once a peak ROI is chosen for each peak—whether automatically
+   extracted from the metadata in the events file or manually specified using the fields below—
+   the application will fit a peak shape to refine the ROI boundaries.
+   {% endblocktrans %}
+ </div>
- <strong>Automated ROI</strong>
+ <strong>{% trans "Automated ROI" %}</strong>
```

</blockquote></details>
<details>
<summary>src/webmon_app/reporting/tests/test_reduction/test_views.py (1)</summary><blockquote>

`204-205`: **Remove commented-out debug write**  
This debug line is already commented and should be fully removed or gated behind a flag to keep test code clean.

</blockquote></details>

</blockquote></details>

<details>
<summary>🧹 Nitpick comments (1)</summary><blockquote>

<details>
<summary>src/webmon_app/reporting/templates/reduction/configuration_ref_m.html (1)</summary><blockquote>

`8-16`: **Extract inline CSS to a shared stylesheet**  
Embedding a `<style>` block directly in the template may lead to duplication and makes maintenance harder. Consider moving the `.help_line` rules into your global CSS (e.g., `static/css/reduction.css`) to keep presentation concerns separate from markup.

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between c9b03641294d7485d66e9b58ab2b1ba52a9d4f50 and 18c45b8e3b91234c877d0637a43851a7375d7623.

</details>

<details>
<summary>📒 Files selected for processing (3)</summary>

* `.github/pull_request_template.md` (1 hunks)
* `src/webmon_app/reporting/templates/reduction/configuration_ref_m.html` (8 hunks)
* `src/webmon_app/reporting/tests/test_reduction/test_views.py` (1 hunks)

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (2)</summary>

* GitHub Check: tests
* GitHub Check: linux

</details>

<details>
<summary>🔇 Additional comments (1)</summary><blockquote>

<details>
<summary>.github/pull_request_template.md (1)</summary>

`15-15`: **Add warning emoji for manual test section**  
The warning emoji enhances visibility of manual testing instructions without altering the content or structure.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-22T18:26:14Z
user: login: backmari
body: Tested locally and looks good.
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-05-22T19:22:01Z

Review comments:
diff_hunk: @@ -143,36 +150,42 @@
     <!-- Force peak ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force peak ROI: ignore metadata <b>ROI1</b> stored in the logs
+                of the event file by defining your own <i>min</i> and <i>max</i> peak ranges
+            </div>
             {{ options_form.force_peak }}
-            <span title="You can choose to replace the ROI in the data by your own range.
-Check the following box if you want to define your own ROI and
-use it for peak selection."><strong>Force peak ROI</strong></span>
+            <span></span><strong>Force peak ROI</strong></span>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: Copilot
body: There is an extra empty <span></span> and an unbalanced closing </span> in the 'Force peak ROI' section. Removing the extra <span></span> will ensure proper HTML tag structure.
```suggestion
            <strong>Force peak ROI</strong>
```
created_at: 2025-05-20T23:40:30Z
author_association: NONE
diff_hunk: @@ -111,14 +119,13 @@
     <!-- Automated ROI options -->
     <tr>
         <td>
+            <div class='help_line'>
+                Automated ROI: Once a peak ROI is chosen for each peak—whether automatically
+                extracted from the metadata in the events file or manually specified using the fields below—the
+                application will fit a peak shape to refine the ROI boundaries.
+            </div>
             {{ options_form.fit_peak_in_roi }}
-            <span title="Once the reflected peak ROI is selected for each peak below,
-you can try to fine tune this ROI by fitting for a peak within that
-region and updating the ROI [both center and width] according to the
-location found. Check the box if you want to find a peak within the
-ROI and redefine the ROI afterwards.">
-                <strong>Automated ROI</strong>
-            </span>
+            <strong>Automated ROI</strong>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Internationalize the “Automated ROI” help text.**  
This English-only string should be wrapped in `{% trans %}` or `{% blocktrans %}` to enable localization.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In src/webmon_app/reporting/templates/reduction/configuration_ref_m.html around
lines 122 to 128, the "Automated ROI" help text is hardcoded in English and
needs to be internationalized. Wrap the entire help text inside the <div
class='help_line'> with Django's {% trans %} or {% blocktrans %} template tags
to enable localization and support multiple languages.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-20T23:54:27Z
author_association: CONTRIBUTOR
diff_hunk: @@ -202,7 +202,7 @@ def test_ref_m(self):
         self.assertEqual(response.status_code, 200)
         self.assertTemplateUsed(response, "reduction/configuration_ref_m.html")
         # uncomment the following line only when debugging, in order to inspect the response content
-        open("/tmp/junk.html", "wb").write(response.content)  # take a look to file:///tmp/junk.html with the browser
+        # open("/tmp/junk.html", "wb").write(response.content)  # take a look to file:///tmp/junk.html with the browser
path: src/webmon_app/reporting/tests/test_reduction/test_views.py
user: login: Copilot
body: [nitpick] Consider removing this commented-out debug write or moving it behind a flag to keep the test code clean and focused on assertions.
created_at: 2025-05-21T17:58:51Z
author_association: NONE
diff_hunk: @@ -5,6 +5,14 @@
 {% block banner %}{{ instrument }} Configuration {% endblock %}
 
 {% block header %}
+<style>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: Copilot
body: Embedding an inline `<style>` block in the template can lead to duplication; consider moving these rules into a shared CSS file for consistency and easier maintenance.
created_at: 2025-05-21T17:58:51Z
author_association: NONE
diff_hunk: @@ -111,14 +119,13 @@
     <!-- Automated ROI options -->
     <tr>
         <td>
+            <div class='help_line'>
+                Automated ROI: Once a peak ROI is chosen for each peak—whether automatically
+                extracted from the metadata in the events file or manually specified using the fields below—the
+                application will fit a peak shape to refine the ROI boundaries.
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: Copilot
body: [nitpick] This multi-line help text is placed in a single `<div>` without paragraph tags. Wrapping each sentence or logical block in `<p>` elements can improve readability and semantics.
```suggestion
                <p>Automated ROI: Once a peak ROI is chosen for each peak—whether automatically extracted from the metadata in the events file or manually specified using the fields below—</p>
                <p>the application will fit a peak shape to refine the ROI boundaries.</p>
```
created_at: 2025-05-21T17:58:51Z
author_association: NONE
diff_hunk: @@ -340,24 +375,30 @@
     <!-- Side background options -->
     <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Use side background: ignore metadata <b>ROI6</b>
+                and instead choose a region on each side of the reflected peak to estimate the background.
+            </div>
+
             <span onclick="toggle_roi_bck('#{{ options_form.use_side_bck_s3.id_for_label }}');">
                 {{ options_form.use_side_bck_s3 }}
             </span>
-            <span title="As an alternative to using the 2nd ROI,  you can use a region around
-the reflected peak to estimate the background. Check the following box
-if you want to use the region on each side of the peak to estimate your background.">
+            <span>
                 <strong>Use side background</strong>
             </span>
             <label class='long_label' for='bck_width_s3'>Pixels on each side</label> {{ options_form.bck_width_s3 }}
         </td>
     </tr>
 
-    <!-- Force low-res ROI options -->
+    <!-- Force vertical ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force vertical ROI: ignore metadata <b>ROI3</b> and choose your own
+                <i>min</i> and <i>max</i> peak ranges along the vertical (Y-axis)
+            </div>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Fix inconsistent ROI number for Peak #3's vertical ROI.**

The help text for Peak #3's Force vertical ROI references ROI3, but this seems inconsistent with the ROI numbering pattern. Based on the pattern established for other options, this should likely be ROI7 or another consistent number.

```diff
            <div class='help_line'>
-                Force vertical ROI: ignore metadata <b>ROI3</b> and choose your own
+                Force vertical ROI: ignore metadata <b>ROI7</b> and choose your own
                <i>min</i> and <i>max</i> peak ranges along the vertical (Y-axis)
            </div>
```


> Committable suggestion skipped: line range outside the PR's diff.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In src/webmon_app/reporting/templates/reduction/configuration_ref_m.html around
lines 396 to 399, the help text incorrectly references ROI3 for Peak #3's Force
vertical ROI, which is inconsistent with the established ROI numbering pattern.
Update the text to reference the correct ROI number, likely ROI7 or the
appropriate consistent ROI number for Peak #3, to maintain clarity and
consistency.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-21T18:03:56Z
author_association: CONTRIBUTOR
diff_hunk: @@ -261,24 +286,29 @@
     <!-- Side background options -->
     <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Use side background: ignore metadata <b>ROI4</b>
+                and instead choose a region on each side of the reflected peak to estimate the background.
+            </div>
             <span onclick="toggle_roi_bck('#{{ options_form.use_side_bck_s2.id_for_label }}');">
                 {{ options_form.use_side_bck_s2 }}
             </span>
-            <span title="As an alternative to using the 2nd ROI,  you can use a region around
-the reflected peak to estimate the background. Check the following box
-if you want to use the region on each side of the peak to estimate your background.">
+            <span>
                 <strong>Use side background</strong>
             </span>
             <label class='long_label' for='bck_width_s2'>Pixels on each side</label> {{ options_form.bck_width_s2 }}
         </td>
     </tr>
 
-    <!-- Force low-res ROI options -->
+    <!-- Force vertical ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force vertical ROI: ignore metadata <b>ROI3</b> and choose your own
+                <i>min</i> and <i>max</i> peak ranges along the vertical (Y-axis)
+            </div>
             {{ options_form.force_low_res_s2 }}
-            <span title="Override the vertical (Y-Pixel) range in the sample logs with your own range.
-Check the following box if you want to define your own range and use it for peak selection.">
+            <span>
                 <strong>Force vertical ROI</strong></span>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Internationalize Peak #2 “Force vertical ROI” help text**  
Apply `{% trans %}`/`{% blocktrans %}` around this help_line and label for proper i18n.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In src/webmon_app/reporting/templates/reduction/configuration_ref_m.html around
lines 306 to 312, the help text and label for "Force vertical ROI" are not
internationalized. Wrap the entire help_line div content and the "Force vertical
ROI" label inside appropriate Django i18n tags such as {% trans %} or {%
blocktrans %} to enable translation support.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-22T18:26:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -340,24 +376,29 @@
     <!-- Side background options -->
     <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Use side background: ignore metadata <b>ROI6</b>
+                and instead choose a region on each side of the reflected peak to estimate the background.
+            </div>
             <span onclick="toggle_roi_bck('#{{ options_form.use_side_bck_s3.id_for_label }}');">
                 {{ options_form.use_side_bck_s3 }}
             </span>
-            <span title="As an alternative to using the 2nd ROI,  you can use a region around
-the reflected peak to estimate the background. Check the following box
-if you want to use the region on each side of the peak to estimate your background.">
+            <span>
                 <strong>Use side background</strong>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Internationalize Peak #3 “Use side background” help text**  
Use translation tags for both the help_line content and the `<strong>` label.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In src/webmon_app/reporting/templates/reduction/configuration_ref_m.html around
lines 379 to 387, the help text and the <strong> label for "Use side background"
are not internationalized. Wrap the help_line text and the <strong>Use side
background</strong> label with the appropriate translation tags or functions
used in the project to enable localization.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-22T18:26:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -221,36 +240,42 @@
     <!-- Force peak ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force peak ROI: ignore metadata <b>ROI3</b> stored in the logs
+                of the event file by defining your own <i>min</i> and <i>max</i> peak ranges
+            </div>
             {{ options_form.force_peak_s2 }}
-            <span title="You can choose to replace the ROI in the data by your own range.
-Check the following box if you want to define your own ROI and
-use it for peak selection."><strong>Force peak ROI</strong></span>
+            <span><strong>Force peak ROI</strong></span>
             <label class='short_label' for='peak_min_s2'>Pixel<sub>min</sub></label>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Internationalize Peak #2 “Force peak ROI” help text**  
Wrap this duplicated help_line and label in translation blocks (`{% trans %}`/`{% blocktrans %}`) for i18n support.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In src/webmon_app/reporting/templates/reduction/configuration_ref_m.html around
lines 243 to 249, the help text and label for "Force peak ROI" are hardcoded and
duplicated. Wrap the entire help_line div and the label text inside Django
translation blocks using {% trans %} or {% blocktrans %} tags to enable
internationalization support for these UI elements.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-22T18:26:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -300,36 +330,42 @@
     <!-- Force peak ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force peak ROI: ignore metadata <b>ROI5</b> stored in the logs
+                of the event file by defining your own <i>min</i> and <i>max</i> peak ranges
+            </div>
             {{ options_form.force_peak_s3 }}
-            <span title="You can choose to replace the ROI in the data by your own range.
-Check the following box if you want to define your own ROI and
-use it for peak selection."><strong>Force peak ROI</strong></span>
+            <span><strong>Force peak ROI</strong></span>
             <label class='short_label' for='peak_min_s3'>Pixel<sub>min</sub></label>
             {{ options_form.peak_min_s3 }}
             <label class='short_label' for='peak_max_s3'>Pixel<sub>max</sub></label>
             {{ options_form.peak_max_s3 }}
         </td>
     </tr>
 
-    <!-- Second ROI options -->
+    <!-- Use background ROI options -->
     <tr>
         <td onclick="toggle_roi_bck('#{{ options_form.use_roi_bck_s3.id_for_label }}');">
+            <div class='help_line'>
+                Use background: use metadata <b>ROI6</b> stored in the logs of the event file
+                to automatically choose a <i>min</i> and <i>max</i> pixel region defining the background
+            </div>
             {{ options_form.use_roi_bck_s3 }}
-            <span title="A second ROI is available in the data file and can be used to define the background.
-Check the following box if you want to use the 2nd ROI for your background,
-otherwise a default region will be used."><strong>Use 2nd ROI</strong></span>
+            <span><strong>Use background</strong></span>
         </td>
     </tr>
 
     <!-- Force background ROI options -->
     <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force background ROI: ignore metadata <b>ROI6</b>
+                and instead choose your own <i>min</i> and <i>max</i> pixel regions defining the background
+            </div>
             <span onclick="toggle_roi_bck('#{{ options_form.force_background_s3.id_for_label }}');">
                 {{ options_form.force_background_s3 }}
             </span>
-            <span title="You can choose to replace the 2nd ROI in the data by your own range.
-Check the following box if you want to define your own 2nd ROI and use it for background selection.
-The option to use the 2nd ROI has to be turned ON to use this option."><strong>Force background ROI</strong></span>
+            <span><strong>Force background ROI</strong></span>
             <label class='short_label' for='bck_min_s3'>Bck<sub>min</sub></label>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Internationalize Peak #3 “Force background ROI” help text**  
Translate the help_line and label via Django’s i18n tags.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In src/webmon_app/reporting/templates/reduction/configuration_ref_m.html around
lines 361 to 369, the help_line text and the label "Force background ROI" are
not internationalized. Wrap the help_line text and the label text inside
Django's {% trans %} template tags to enable translation. Ensure all user-facing
strings in this block use the i18n tags for proper localization.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-22T18:26:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -183,24 +197,29 @@
     <!-- Side background options -->
     <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Use side background: ignore metadata <b>ROI2</b>
+                and instead choose a region on each side of the reflected peak to estimate the background.
+            </div>
             <span onclick="toggle_roi_bck('#{{ options_form.use_side_bck.id_for_label }}');">
                 {{ options_form.use_side_bck }}
             </span>
-            <span title="As an alternative to using the 2nd ROI,  you can use a region around
-the reflected peak to estimate the background. Check the following box
-if you want to use the region on each side of the peak to estimate your background.">
+            <span>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Internationalize “Use side background” help text**  
The help text and the label should be enclosed in `{% trans %}`/`{% blocktrans %}` and the extra `<span>` around `<strong>` can be removed.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In src/webmon_app/reporting/templates/reduction/configuration_ref_m.html around
lines 200 to 207, the help text "Use side background: ignore metadata ROI2 and
instead choose a region on each side of the reflected peak to estimate the
background." and the label inside the span should be internationalized by
wrapping them with Django's {% trans %} or {% blocktrans %} tags. Also, remove
the unnecessary extra <span> element around the <strong> tag to clean up the
markup.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-22T18:26:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -261,24 +286,29 @@
     <!-- Side background options -->
     <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Use side background: ignore metadata <b>ROI4</b>
+                and instead choose a region on each side of the reflected peak to estimate the background.
+            </div>
             <span onclick="toggle_roi_bck('#{{ options_form.use_side_bck_s2.id_for_label }}');">
                 {{ options_form.use_side_bck_s2 }}
             </span>
-            <span title="As an alternative to using the 2nd ROI,  you can use a region around
-the reflected peak to estimate the background. Check the following box
-if you want to use the region on each side of the peak to estimate your background.">
+            <span>
                 <strong>Use side background</strong>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Internationalize Peak #2 “Use side background” help text**  
Wrap the help text and label in Django translation tags and remove redundant spans.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In src/webmon_app/reporting/templates/reduction/configuration_ref_m.html around
lines 289 to 297, the help text and label for "Use side background" are not
internationalized and contain redundant span elements. Wrap the help text and
the label text inside Django translation tags (e.g., {% trans %} or gettext) to
enable localization. Also, remove unnecessary span tags to simplify the markup
while preserving the onclick functionality and styling.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-22T18:26:13Z
author_association: CONTRIBUTOR
diff_hunk: @@ -300,36 +330,42 @@
     <!-- Force peak ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force peak ROI: ignore metadata <b>ROI5</b> stored in the logs
+                of the event file by defining your own <i>min</i> and <i>max</i> peak ranges
+            </div>
             {{ options_form.force_peak_s3 }}
-            <span title="You can choose to replace the ROI in the data by your own range.
-Check the following box if you want to define your own ROI and
-use it for peak selection."><strong>Force peak ROI</strong></span>
+            <span><strong>Force peak ROI</strong></span>
             <label class='short_label' for='peak_min_s3'>Pixel<sub>min</sub></label>
             {{ options_form.peak_min_s3 }}
             <label class='short_label' for='peak_max_s3'>Pixel<sub>max</sub></label>
             {{ options_form.peak_max_s3 }}
         </td>
     </tr>
 
-    <!-- Second ROI options -->
+    <!-- Use background ROI options -->
     <tr>
         <td onclick="toggle_roi_bck('#{{ options_form.use_roi_bck_s3.id_for_label }}');">
+            <div class='help_line'>
+                Use background: use metadata <b>ROI6</b> stored in the logs of the event file
+                to automatically choose a <i>min</i> and <i>max</i> pixel region defining the background
+            </div>
             {{ options_form.use_roi_bck_s3 }}
-            <span title="A second ROI is available in the data file and can be used to define the background.
-Check the following box if you want to use the 2nd ROI for your background,
-otherwise a default region will be used."><strong>Use 2nd ROI</strong></span>
+            <span><strong>Use background</strong></span>
         </td>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Internationalize Peak #3 “Use background” help text**  
Wrap this help_line and its label in `{% trans %}` or `{% blocktrans %}` blocks.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In src/webmon_app/reporting/templates/reduction/configuration_ref_m.html around
lines 349 to 355, the help text and its label "Use background" are not
internationalized. Wrap the entire help_line div and the adjacent label text in
Django's {% trans %} or {% blocktrans %} template tags to enable translation
support.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-22T18:26:13Z
author_association: CONTRIBUTOR
diff_hunk: @@ -143,36 +151,42 @@
     <!-- Force peak ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force peak ROI: ignore metadata <b>ROI1</b> stored in the logs
+                of the event file by defining your own <i>min</i> and <i>max</i> peak ranges
+            </div>
             {{ options_form.force_peak }}
-            <span title="You can choose to replace the ROI in the data by your own range.
-Check the following box if you want to define your own ROI and
-use it for peak selection."><strong>Force peak ROI</strong></span>
+            <span><strong>Force peak ROI</strong></span>
             <label class='short_label' for='peak_min'>Pixel<sub>min</sub></label>
             {{ options_form.peak_min }}
             <label class='short_label' for='peak_max'>Pixel<sub>max</sub></label>
             {{ options_form.peak_max }}
         </td>
     </tr>
 
-    <!-- Second ROI options -->
+    <!-- Use background ROI options -->
     <tr>
         <td onclick="toggle_roi_bck('#{{ options_form.use_roi_bck.id_for_label }}');">
+            <div class='help_line'>
+                Use background: use metadata <b>ROI2</b> stored in the logs of the event file
+                to automatically choose a <i>min</i> and <i>max</i> pixel region defining the background
+            </div>
             {{ options_form.use_roi_bck }}
-            <span title="A second ROI is available in the data file and can be used to define the background.
-Check the following box if you want to use the 2nd ROI for your background,
-otherwise a default region will be used."><strong>Use 2nd ROI</strong></span>
+            <span><strong>Use background</strong></span>
         </td>
     </tr>
 
     <!-- Force background ROI options -->
     <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force background ROI: ignore metadata <b>ROI2</b>
+                and instead choose your own <i>min</i> and <i>max</i> pixel regions defining the background
+            </div>
             <span onclick="toggle_roi_bck('#{{ options_form.force_background.id_for_label }}');">
                 {{ options_form.force_background }}
             </span>
-            <span title="You can choose to replace the 2nd ROI in the data by your own range.
-Check the following box if you want to define your own 2nd ROI and use it for background selection.
-The option to use the 2nd ROI has to be turned ON to use this option."><strong>Force background ROI</strong></span>
+            <span><strong>Force background ROI</strong></span>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Internationalize “Force background ROI” help text**  
Wrap this help block and its label in translation tags to support localization.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In src/webmon_app/reporting/templates/reduction/configuration_ref_m.html around
lines 182 to 189, the help text and label "Force background ROI" are not wrapped
in translation tags. To support localization, wrap the entire help block text
and the label text inside appropriate translation tags or functions used in the
project, ensuring these strings can be translated.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-22T18:26:13Z
author_association: CONTRIBUTOR
diff_hunk: @@ -143,36 +151,42 @@
     <!-- Force peak ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force peak ROI: ignore metadata <b>ROI1</b> stored in the logs
+                of the event file by defining your own <i>min</i> and <i>max</i> peak ranges
+            </div>
             {{ options_form.force_peak }}
-            <span title="You can choose to replace the ROI in the data by your own range.
-Check the following box if you want to define your own ROI and
-use it for peak selection."><strong>Force peak ROI</strong></span>
+            <span><strong>Force peak ROI</strong></span>
             <label class='short_label' for='peak_min'>Pixel<sub>min</sub></label>
             {{ options_form.peak_min }}
             <label class='short_label' for='peak_max'>Pixel<sub>max</sub></label>
             {{ options_form.peak_max }}
         </td>
     </tr>
 
-    <!-- Second ROI options -->
+    <!-- Use background ROI options -->
     <tr>
         <td onclick="toggle_roi_bck('#{{ options_form.use_roi_bck.id_for_label }}');">
+            <div class='help_line'>
+                Use background: use metadata <b>ROI2</b> stored in the logs of the event file
+                to automatically choose a <i>min</i> and <i>max</i> pixel region defining the background
+            </div>
             {{ options_form.use_roi_bck }}
-            <span title="A second ROI is available in the data file and can be used to define the background.
-Check the following box if you want to use the 2nd ROI for your background,
-otherwise a default region will be used."><strong>Use 2nd ROI</strong></span>
+            <span><strong>Use background</strong></span>
         </td>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Internationalize “Use background” help and unify label markup**  
Apply `{% trans %}` or `{% blocktrans %}` to both the help line and the label, replacing `<span><strong>` with a single `<strong>` inside the translation block.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In src/webmon_app/reporting/templates/reduction/configuration_ref_m.html around
lines 170 to 176, the "Use background" help text and label are not
internationalized and use inconsistent markup. Wrap both the help line text and
the label text inside appropriate Django translation tags ({% trans %} or {%
blocktrans %}), and replace the separate <span><strong> label markup with a
single <strong> tag inside the translation block to unify the markup and enable
translation.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-22T18:26:13Z
author_association: CONTRIBUTOR
diff_hunk: @@ -300,36 +330,42 @@
     <!-- Force peak ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force peak ROI: ignore metadata <b>ROI5</b> stored in the logs
+                of the event file by defining your own <i>min</i> and <i>max</i> peak ranges
+            </div>
             {{ options_form.force_peak_s3 }}
-            <span title="You can choose to replace the ROI in the data by your own range.
-Check the following box if you want to define your own ROI and
-use it for peak selection."><strong>Force peak ROI</strong></span>
+            <span><strong>Force peak ROI</strong></span>
             <label class='short_label' for='peak_min_s3'>Pixel<sub>min</sub></label>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Internationalize Peak #3 “Force peak ROI” help text**  
Enclose the help_line and `<strong>` label in translation tags to support multiple languages.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In src/webmon_app/reporting/templates/reduction/configuration_ref_m.html around
lines 333 to 339, the help text and the <strong>Force peak ROI</strong> label
are not wrapped in translation tags. To fix this, enclose the entire help_line
div content and the <strong>Force peak ROI</strong> text inside appropriate
translation tags (e.g., {% trans %} ... {% endtrans %} or equivalent) to enable
internationalization support.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-22T18:26:13Z
author_association: CONTRIBUTOR
diff_hunk: @@ -183,24 +197,29 @@
     <!-- Side background options -->
     <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Use side background: ignore metadata <b>ROI2</b>
+                and instead choose a region on each side of the reflected peak to estimate the background.
+            </div>
             <span onclick="toggle_roi_bck('#{{ options_form.use_side_bck.id_for_label }}');">
                 {{ options_form.use_side_bck }}
             </span>
-            <span title="As an alternative to using the 2nd ROI,  you can use a region around
-the reflected peak to estimate the background. Check the following box
-if you want to use the region on each side of the peak to estimate your background.">
+            <span>
                 <strong>Use side background</strong>
             </span>
             <label class='long_label' for='bck_width'>Pixels on each side</label> {{ options_form.bck_width }}
         </td>
     </tr>
 
-    <!-- Force low-res ROI options -->
+    <!-- Force vertical ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force vertical ROI: ignore metadata <b>ROI1</b> and choose your own
+                <i>min</i> and <i>max</i> peak ranges along the vertical (Y-axis)
+            </div>
             {{ options_form.force_low_res }}
-            <span title="Override the vertical (Y-Pixel) range in the sample logs with your own range.
-Check the following box if you want to define your own range and use it for peak selection.">
+            <span>
                 <strong>Force vertical ROI</strong></span>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Internationalize “Force vertical ROI” help text**  
Use Django’s translation tags for the help_line and the `<strong>` label.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In src/webmon_app/reporting/templates/reduction/configuration_ref_m.html around
lines 217 to 223, the help text and the <strong> label "Force vertical ROI" are
not internationalized. Wrap the help_line text and the <strong> label content
with Django translation tags (e.g., {% trans %} or {% blocktrans %}) to enable
localization support.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-22T18:26:13Z
author_association: CONTRIBUTOR
diff_hunk: @@ -340,24 +376,29 @@
     <!-- Side background options -->
     <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Use side background: ignore metadata <b>ROI6</b>
+                and instead choose a region on each side of the reflected peak to estimate the background.
+            </div>
             <span onclick="toggle_roi_bck('#{{ options_form.use_side_bck_s3.id_for_label }}');">
                 {{ options_form.use_side_bck_s3 }}
             </span>
-            <span title="As an alternative to using the 2nd ROI,  you can use a region around
-the reflected peak to estimate the background. Check the following box
-if you want to use the region on each side of the peak to estimate your background.">
+            <span>
                 <strong>Use side background</strong>
             </span>
             <label class='long_label' for='bck_width_s3'>Pixels on each side</label> {{ options_form.bck_width_s3 }}
         </td>
     </tr>
 
-    <!-- Force low-res ROI options -->
+    <!-- Force vertical ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force vertical ROI: ignore metadata <b>ROI5</b> and choose your own
+                <i>min</i> and <i>max</i> peak ranges along the vertical (Y-axis)
+            </div>
             {{ options_form.force_low_res_s3 }}
-            <span title="Override the vertical (Y-Pixel) range in the sample logs with your own range.
-Check the following box if you want to define your own range and use it for peak selection.">
+            <span>
                 <strong>Force vertical ROI</strong></span>
             <label class='short_label' for='low_res_min_s3'>Pixel<sub>min</sub></label>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Internationalize Peak #3 “Force vertical ROI” help text**  
Enclose this help_line block and its label in `{% trans %}` or `{% blocktrans %}` to enable localization.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In src/webmon_app/reporting/templates/reduction/configuration_ref_m.html around
lines 396 to 403, the help_line block and its label for "Force vertical ROI" are
not wrapped in translation tags. To enable localization, enclose the entire
help_line div and the associated label text within Django's {% trans %} or {%
blocktrans %} template tags, ensuring all user-facing text in this section is
translatable.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-22T18:26:13Z
author_association: CONTRIBUTOR
diff_hunk: @@ -221,36 +240,42 @@
     <!-- Force peak ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force peak ROI: ignore metadata <b>ROI3</b> stored in the logs
+                of the event file by defining your own <i>min</i> and <i>max</i> peak ranges
+            </div>
             {{ options_form.force_peak_s2 }}
-            <span title="You can choose to replace the ROI in the data by your own range.
-Check the following box if you want to define your own ROI and
-use it for peak selection."><strong>Force peak ROI</strong></span>
+            <span><strong>Force peak ROI</strong></span>
             <label class='short_label' for='peak_min_s2'>Pixel<sub>min</sub></label>
             {{ options_form.peak_min_s2 }}
             <label class='short_label' for='peak_max_s2'>Pixel<sub>max</sub></label>
             {{ options_form.peak_max_s2 }}
         </td>
     </tr>
 
-    <!-- Second ROI options -->
+    <!-- Use background ROI options -->
     <tr>
         <td onclick="toggle_roi_bck('#{{ options_form.use_roi_bck_s2.id_for_label }}');">
+            <div class='help_line'>
+                Use background: use metadata <b>ROI4</b> stored in the logs of the event file
+                to automatically choose a <i>min</i> and <i>max</i> pixel region defining the background
+            </div>
             {{ options_form.use_roi_bck_s2 }}
-            <span title="A second ROI is available in the data file and can be used to define the background.
-Check the following box if you want to use the 2nd ROI for your background,
-otherwise a default region will be used."><strong>Use 2nd ROI</strong></span>
+            <span><strong>Use background</strong></span>
         </td>
     </tr>
 
     <!-- Force background ROI options -->
     <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force background ROI: ignore metadata <b>ROI4</b>
+                and instead choose your own <i>min</i> and <i>max</i> pixel regions defining the background
+            </div>
             <span onclick="toggle_roi_bck('#{{ options_form.force_background_s2.id_for_label }}');">
                 {{ options_form.force_background_s2 }}
             </span>
-            <span title="You can choose to replace the 2nd ROI in the data by your own range.
-Check the following box if you want to define your own 2nd ROI and use it for background selection.
-The option to use the 2nd ROI has to be turned ON to use this option."><strong>Force background ROI</strong></span>
+            <span><strong>Force background ROI</strong></span>
             <label class='short_label' for='bck_min_s2'>Bck<sub>min</sub></label>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Internationalize Peak #2 “Force background ROI” help text**  
Translate the help_line block and the label to enable localization.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In src/webmon_app/reporting/templates/reduction/configuration_ref_m.html around
lines 271 to 279, the help_line text and the label "Force background ROI" are
hardcoded and need to be internationalized. Replace the static text inside the
help_line div and the label text with translation function calls or template
tags used in the project for localization, ensuring these strings can be
translated based on the user's locale.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-22T18:26:13Z
author_association: CONTRIBUTOR
diff_hunk: @@ -143,36 +151,42 @@
     <!-- Force peak ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force peak ROI: ignore metadata <b>ROI1</b> stored in the logs
+                of the event file by defining your own <i>min</i> and <i>max</i> peak ranges
+            </div>
             {{ options_form.force_peak }}
-            <span title="You can choose to replace the ROI in the data by your own range.
-Check the following box if you want to define your own ROI and
-use it for peak selection."><strong>Force peak ROI</strong></span>
+            <span><strong>Force peak ROI</strong></span>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Internationalize “Force peak ROI” help and clean up markup**  
Wrap the help text and the label in translation tags, and remove the redundant `<span>` wrapper around the `<strong>`.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In src/webmon_app/reporting/templates/reduction/configuration_ref_m.html around
lines 154 to 159, the help text and label "Force peak ROI" are not wrapped in
translation tags, and there is a redundant <span> wrapping the <strong> element.
Wrap both the help text and the label in the appropriate translation tags for
internationalization, and remove the unnecessary <span> wrapper around the
<strong> element to clean up the markup.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-22T18:26:13Z
author_association: CONTRIBUTOR
diff_hunk: @@ -221,36 +240,42 @@
     <!-- Force peak ROI options -->
       <tr class='tiny_input'>
         <td>
+            <div class='help_line'>
+                Force peak ROI: ignore metadata <b>ROI3</b> stored in the logs
+                of the event file by defining your own <i>min</i> and <i>max</i> peak ranges
+            </div>
             {{ options_form.force_peak_s2 }}
-            <span title="You can choose to replace the ROI in the data by your own range.
-Check the following box if you want to define your own ROI and
-use it for peak selection."><strong>Force peak ROI</strong></span>
+            <span><strong>Force peak ROI</strong></span>
             <label class='short_label' for='peak_min_s2'>Pixel<sub>min</sub></label>
             {{ options_form.peak_min_s2 }}
             <label class='short_label' for='peak_max_s2'>Pixel<sub>max</sub></label>
             {{ options_form.peak_max_s2 }}
         </td>
     </tr>
 
-    <!-- Second ROI options -->
+    <!-- Use background ROI options -->
     <tr>
         <td onclick="toggle_roi_bck('#{{ options_form.use_roi_bck_s2.id_for_label }}');">
+            <div class='help_line'>
+                Use background: use metadata <b>ROI4</b> stored in the logs of the event file
+                to automatically choose a <i>min</i> and <i>max</i> pixel region defining the background
+            </div>
             {{ options_form.use_roi_bck_s2 }}
-            <span title="A second ROI is available in the data file and can be used to define the background.
-Check the following box if you want to use the 2nd ROI for your background,
-otherwise a default region will be used."><strong>Use 2nd ROI</strong></span>
+            <span><strong>Use background</strong></span>
         </td>
path: src/webmon_app/reporting/templates/reduction/configuration_ref_m.html
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Internationalize Peak #2 “Use background” help text**  
Enclose the help_line content and `<strong>` label in translation tags.

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
In src/webmon_app/reporting/templates/reduction/configuration_ref_m.html around
lines 259 to 265, the help text and the <strong> label "Use background" are not
wrapped in translation tags. To fix this, enclose the entire help_line div
content and the <strong>Use background</strong> text inside the appropriate
translation tags to enable internationalization.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-22T18:26:13Z
author_association: CONTRIBUTOR

PR comments:
user: login: codecov-commenter
created_at: 2025-05-20T23:44:48Z
body: ## [Codecov](https://app.codecov.io/gh/neutrons/data_workflow/pull/243?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=neutrons) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 79.19%. Comparing base ([`c9b0364`](https://app.codecov.io/gh/neutrons/data_workflow/commit/c9b03641294d7485d66e9b58ab2b1ba52a9d4f50?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=neutrons)) to head ([`18c45b8`](https://app.codecov.io/gh/neutrons/data_workflow/commit/18c45b8e3b91234c877d0637a43851a7375d7623?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=neutrons)).
:warning: Report is 48 commits behind head on next.

<details><summary>Additional details and impacted files</summary>



```diff
@@           Coverage Diff           @@
##             next     #243   +/-   ##
=======================================
  Coverage   79.19%   79.19%           
=======================================
  Files          59       59           
  Lines        4624     4624           
=======================================
  Hits         3662     3662           
  Misses        962      962           
```
</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/neutrons/data_workflow/pull/243?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=neutrons).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=neutrons).
<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
author_association: NONE
user: login: jmborr
created_at: 2025-05-20T23:51:05Z
body: @coderabbitai full review
author_association: MEMBER
user: login: coderabbitai[bot]
created_at: 2025-05-20T23:51:10Z
body: <!-- This is an auto-generated reply by CodeRabbit -->
<details>
<summary>✅ Actions performed</summary>

Full review triggered.

</details>
author_association: CONTRIBUTOR
user: login: backmari
created_at: 2025-05-21T19:31:29Z
body: I do see the help text, but it is quite hard to read since the text is so dense. Would it be possible to add more space between the groups of help text + parameter input or something similar?

![image](https://github.com/user-attachments/assets/e6251d0e-1214-4c05-a619-14274db071ed)

author_association: COLLABORATOR
user: login: coderabbitai[bot]
created_at: 2025-05-22T18:26:09Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

<details>
<summary>📝 Walkthrough</summary>

## Walkthrough

The pull request introduces presentational updates and minor maintenance changes across three files. The pull request template is modified to add a warning emoji before the manual test instructions for reviewers. In the `configuration_ref_m.html` template, explanatory help text blocks are added above form options related to peak and background ROI configurations, with a new CSS style for consistent formatting; tooltip-based explanations are replaced by visible inline help texts. In the test file `test_views.py`, a debugging line that wrote response content to a file is commented out, removing the side effect during normal test execution. No changes affect logic, control flow, or public interfaces.

## Sequence Diagram(s)

*No sequence diagram is generated as the changes are strictly related to presentation and documentation, without any impact on application logic or control flow.*

</details>

<!-- walkthrough_end -->

<!-- announcements_start -->

> [!NOTE]
> <details>
> <summary>⚡️ AI Code Reviews for VS Code, Cursor, Windsurf</summary>
> 
> CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
> Learn more [here](http://coderabbit.ai/ide).
> 
> </details>

---

> [!NOTE]
> <details>
> <summary>⚡️ Faster reviews with caching</summary>
> 
> CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 30th. To opt out, configure `Review - Disable Cache` at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the `Data Retention` setting under your Organization Settings.
> Enjoy the performance boost—your workflow just got faster.
> 
> </details>

<!-- announcements_end -->
<!-- internal state start -->


<!-- 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 -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=neutrons/data_workflow&utm_content=243):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: CONTRIBUTOR