The changes are mostly about focusing on improvements to input processing, particularly for metabolic rate (met) and clothing insulation (clo) parameters.
Type of change
[x] New feature
[x] Change the processing method of users' inputs
[x] further testing
[x] Add import for matplotlib to make the visualisation work
[ ] max and min setting for met_input
Key Changes
The previous implementation, based on ZhouTongworking's pull request, was not merged due to being out of sync with the latest codebase. This update builds upon Zhou's code but introduces significant changes to the get_input function.
1. Dropdown Implementation (Zhou Tong)
Replaced standard input boxes with dropdown menus for met and clo inputs.
Added functionality for users to search and select values from predefined options.
2. fix todo
Move functions out of get_input function
3. Value Extraction
Enhanced the extract_float function to better handle various input formats, including direct numerical inputs and formatted strings.
4. Error Handling
Improved error catching and reporting for invalid inputs.
Implemented fallback to default values when input is outside the acceptable range.
5. Add import for matplotlib
Current Known Issues
The dropdown selection for met_input includes options (0.8 and 0.7) that fall outside the predefined valid range (1-4).
This discrepancy causes these lower values to trigger the use of default values in the output.
The title Inputs for the inputs box may accidentally be removed
@Xuhui-Wang-9988 great work bu there were some minor issues. I have tried to fix some and explained what needs to be done in a video which i posted on Slack
Description
The changes are mostly about focusing on improvements to input processing, particularly for metabolic rate (met) and clothing insulation (clo) parameters.
Type of change
Key Changes
The previous implementation, based on ZhouTongworking's pull request, was not merged due to being out of sync with the latest codebase. This update builds upon Zhou's code but introduces significant changes to the
get_input
function.1. Dropdown Implementation (Zhou Tong)
2. fix todo
get_input
function3. Value Extraction
extract_float
function to better handle various input formats, including direct numerical inputs and formatted strings.4. Error Handling
5. Add import for matplotlib
Current Known Issues
Inputs
for the inputs box may accidentally be removed