dotimplement / HealthChain

Simplify testing and validating AI and NLP applications in a healthcare context 💫 🏥
https://dotimplement.github.io/HealthChain/
Apache License 2.0
25 stars 16 forks source link

Update concept.py #73

Closed Vortex-21 closed 1 month ago

Vortex-21 commented 1 month ago

Description

Added validation to ensure strings are in proper format so they can be converted to floating point numbers .

Related Issue

https://github.com/dotimplement/HealthChain/issues/68

Changes Made

-Added validation with custom logic using pydantic field_validator .

Testing

Tested against cases : 1) where string is not in proper float number format . (e.g : "abc", "12#", ".#", "", etc) 2) where "value" is passed as float itself. (e.g : 12.0, .9, 8. ,etc.)

Checklist

Additional Notes

Vortex-21 commented 1 month ago

I have added the necessary validation procedure for the above issue.

adamkells commented 1 month ago

Hey @Vortex-21, thanks for taking the time to contribute, we really appreciate it! This looks good, would you be able to add a test to validate that the code is working as expected? Also please make sure to post on the issue thread to let us know you're working on it so we can avoid any duplication of work.

Vortex-21 commented 1 month ago

Hey @Vortex-21, thanks for taking the time to contribute, we really appreciate it! This looks good, would you be able to add a test to validate that the code is working as expected? Also please make sure to post on the issue thread to let us know you're working on it so we can avoid any duplication of work.

Sure ! I will add the test file as well at the earliest .

jenniferjiangkells commented 1 month ago

Closing this PR as this was completed in #77 - thanks for the contribution @Vortex-21!