ISEPOS-2941 Handle empty input error #3
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "bugfix/ISEPOS-2941-handle-empty-input-error"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR addresses an issue where the application would fail when the input dataset is empty or missing required fields.
Changes included:
• Added input validation in src/main.py to handle empty input gracefully.
• Updated util/validator.py to include a check for missing keys.
• Added unit test for edge case with empty input.
Which issue this is handling? Jira doesn't find any ticket with ID ISEPOS-2941
@ -38,2 +38,4 @@
from util.M_max_models import M_max_models
if Input_injection_rate is empty:
raise ValueError("Input_injection_rate contains empty value")
Do we want to say that it contains empty value or that it is empty? Also, the error would be transferred to the portal later, so maybe it's better to just say "Injection rate file" or "Injection rate value" instead of "Input_injection_rate" which is a variable name specific to the script.
Just to clarify — this branch, the commit, and the pull request were only created as a demo with example changes, so I could take some screenshots for the user guide for authors.
The changes aren't meant to be merged into master. I'll clean it up once I finish capturing everything I need.
This is still old design verion of the header, so I suggest waiting for the deploy before taking screenshots (Hubert should deploy it soon)
Checkout
From your project repository, check out a new branch and test the changes.