Skip to content

Commit bc4cbcd

Browse files
committed
Addressing sonaqube errors
1 parent 061ebd9 commit bc4cbcd

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Utility Guide: Fit Kit Logged Utility
22

3-
The Fit Kit Logged Utility provides methods to retrieve test data (fit kit test results) used by the compartment 3 tests, and splits them into two dataframes (one 'normal' one 'abnormal').
3+
The Fit Kit Logged Utility provides methods to retrieve test data (fit kit test results) used by the compartment 3 tests, and splits them into two dataframes (one 'normal', one 'abnormal').
44

55
## Table of Contents
66

@@ -13,7 +13,7 @@ The Fit Kit Logged Utility provides methods to retrieve test data (fit kit test
1313

1414
## Using the Fit Kit Logged Utility
1515

16-
To use the Fit Kit Logged Utility, import the `fit_kit_logged.py` module, from the `utils` directory, into your test file and call its methods as required.
16+
To use the Fit Kit Logged Utility, import the `fit_kit_logged.py` module, from the `utils` directory, into your test file and call the `process_kit_data` method as required.
1717

1818
## Required Arguments
1919

@@ -24,31 +24,30 @@ The methods in this utility require specific arguments. Below is a summary of th
2424

2525
## Fit Kit Logged Specific Functions
2626

27-
The `fit_kit_logged` Utility includes methods for retrieving FIT test kits from the DB and splitting them into 'Normal' and 'Abnormal' results. Below are the key functions:
27+
The `fit_kit_logged` Utility includes methods for retrieving FIT test kits from the DB and splitting them into 'Normal' and 'Abnormal' results. Below are their key functions:
2828

2929
1. **`process_kit_data(smokescreen_properties: dict) -> list`**
30-
Retrieves the test data needed for compartment 3 and then splits it into two data frames, using the `split_fit_kits` method.
30+
Retrieves the test data needed for compartment 3 and then splits it into two data frames, using the `split_fit_kits` method.
3131
- **Arguments**:
3232
- `smokescreen_properties` (dict): A dictionary containing properties required to retrieve and process kit data.
3333
- **Returns**: A list of tuples where each tuple contains a device ID (str) and a boolean flag (True for normal, False for abnormal).
3434

3535
2. **`split_fit_kits(kit_id_df: pd.DataFrame, smokescreen_properties: dict) -> pd.DataFrame`**
36-
This method splits the dataframe into two dataframes, 1 normal and 1 abnormal.
36+
This method splits the `dataframe` into two dataframes, 1 normal and 1 abnormal.
3737
- **Arguments**:
38-
- `kit_id_df` (pd.DataFrame): A dataframe containing fit kit IDs.
38+
- `kit_id_df` (pd.DataFrame): A `dataframe` containing fit kit IDs.
3939
- `smokescreen_properties` (dict): A dictionary containing the number of normal and abnormal fit kits to split.
4040
- **Returns**: A tuple containing two dataframes:
41-
- normal_fit_kit_df (pd.DataFrame): Dataframe containing normal fit kits.
42-
- abnormal_fit_kit_df (pd.DataFrame): Dataframe containing abnormal fit kits.
41+
- normal_fit_kit_df (pd.DataFrame): `dataframe` containing normal fit kits.
42+
- abnormal_fit_kit_df (pd.DataFrame): `dataframe` containing abnormal fit kits.
4343

4444
## Example Usage
4545

4646
```python
4747
from utils.fit_kit_logged import process_kit_data
4848

4949
def example_usage() -> None:
50-
# 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)
51-
# and get device IDs and their flags
50+
# 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.
5251
device_ids = process_kit_data(smokescreen_properties)
5352
# Retrieve NHS numbers for each device_id and determine normal/abnormal status
5453
nhs_numbers = []
@@ -59,7 +58,7 @@ def example_usage() -> None:
5958
device_id, is_normal, smokescreen_properties
6059
)
6160
nhs_numbers.append(nhs_number)
62-
normal_flags.append(is_normal) # Store the flag (True for normal, False for abnormal)
61+
normal_flags.append(is_normal) # Store the flag (True for normal, False for abnormal).
6362

6463
example_usage()
6564
```

0 commit comments

Comments
 (0)