ISEPOS-2941 Handle empty input error #3

Open
mieszkomakuch wants to merge 1 commits from bugfix/ISEPOS-2941-handle-empty-input-error into master

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.

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.
mieszkomakuch added 1 commit 2025-04-23 22:33:08 +02:00
Member

Which issue this is handling? Jira doesn't find any ticket with ID ISEPOS-2941

Which issue this is handling? Jira doesn't find any ticket with ID ISEPOS-2941
asia requested changes 2025-04-24 10:28:23 +02:00
@ -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")
Member

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.

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.
Author
Owner

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.

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.
Member

so I could take some screenshots for the user guide for authors.

This is still old design verion of the header, so I suggest waiting for the deploy before taking screenshots (Hubert should deploy it soon)

> so I could take some screenshots for the user guide for authors. This is still old design verion of the header, so I suggest waiting for the deploy before taking screenshots (Hubert should deploy it soon)
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin bugfix/ISEPOS-2941-handle-empty-input-error:bugfix/ISEPOS-2941-handle-empty-input-error
git checkout bugfix/ISEPOS-2941-handle-empty-input-error
Login to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: official-apps/MaxMagnitudeDPModels#3
No description provided.