Skip to content

Commit 4ab0d83

Browse files
committed
Addressed PR comments
1 parent 4833bf5 commit 4ab0d83

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

docs/utility-guides/FitKitLogged.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Retrieves the test data needed for compartment 3 and then splits it into two dat
3636
A list of tuples where each tuple contains a device ID (str) and a `boolean` flag (True for normal, False for abnormal).
3737

3838
1. **`split_fit_kits(kit_id_df: pd.DataFrame, smokescreen_properties: dict) -> tuple`**
39-
This method splits the `dataframe` into two dataframes, one normal and one abnormal.
39+
This method splits the `dataframe` into two dataframes, one normal and one abnormal. It determines the number of normal and abnormal kits by using the `c3_eng_number_of_normal_fit_kits` parameter from `smokescreen_properties` for the number of normal, and then the rest are marked as abnormal.
4040

4141
- **Arguments**:
4242
- `kit_id_df` (pd.DataFrame): A `dataframe` containing fit kit IDs.
@@ -52,9 +52,10 @@ This method splits the `dataframe` into two dataframes, one normal and one abnor
5252
```python
5353
from utils.fit_kit_logged import process_kit_data
5454

55-
def example_usage() -> None:
55+
def test_example_usage(smokescreen_properties: dict) -> None:
5656
# Find data, separate it into normal and abnormal, add results to the test records in the KIT_QUEUE table (i.e. mimic receiving results from the middleware) and get device IDs and their flags.
5757
device_ids = process_kit_data(smokescreen_properties)
58+
# Note: In this example, all of the code below this line is for context only and uses functions from other utilities.
5859
# Retrieve NHS numbers for each device_id and determine normal/abnormal status
5960
nhs_numbers = []
6061
normal_flags = []
@@ -66,5 +67,5 @@ def example_usage() -> None:
6667
nhs_numbers.append(nhs_number)
6768
normal_flags.append(is_normal) # Store the flag (True for normal, False for abnormal).
6869

69-
example_usage()
70+
test_example_usage()
7071
```

utils/fit_kit_logged.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
def process_kit_data(smokescreen_properties: dict) -> list:
88
"""
9-
This method retrieves the test data needed for compartment 3 and then splits it into two data frames:
9+
This method retrieves the test data needed for compartment 3 and then, by using the split_fit_kits method, it splits it into two data frames:
1010
- 1 normal
1111
- 1 abnormal
1212

0 commit comments

Comments
 (0)