Refactor PipelineBase._validate_input() method
I've refactored the PipelineBase._validate_input() method to improve clarity and maintainability. This involved breaking down the method into smaller helper functions and enhancing error messages for better specificity.
I also added comprehensive unit tests to cover various input validation scenarios, ensuring the refactored method behaves as expected.
Related Issues
- fixes #issue-number
Proposed Changes:
How did you test it?
Notes for the reviewer
Checklist
- I have read the contributors guidelines and the code of conduct
- I have updated the related issue with new insights and changes
- I added unit tests and updated the docstrings
- I've used one of the conventional commit types for my PR title:
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:and added!in case the PR includes breaking changes. - I documented my code
- I ran pre-commit hooks and fixed any issue
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.
:white_check_mark: carlosrinc
:white_check_mark: mpangrazzi
:x: google-labs-jules[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.
Hi team, just to clarify the status of the CLA: google-labs-jules[bot] was a support tool that generated the commits under my supervision. I, carlosrinc, am the contributor and have already signed the CLA. Please let me know if you need anything else.
Hi @mpangrazzi,
Thanks for the feedback! I've updated the PR:
The validate_input method in PipelineBase is now public again, restoring the original method signature to prevent breaking changes. The detailed, component-specific validation logic remains in the private _validate_component_input helper method. I've also rechecked the tests to ensure they call the public validate_input method. Let me know if there's anything else.
@carlosrinc Nice! But it seems you still need to:
- Make tests pass (ATM you have a code format issue)
- Add a release note
Hi @mpangrazzi, thanks for the feedback!. Make tests pass (ATM you have a code format issue) ---> Done.
Could you please add the ignore-for-release-notes tag to this PR to fix the CI check?. I can't find the option to do it myself. This is because it's an internal refactoring that doesn't change the user-visible behavior.
Make tests pass (ATM you have a code format issue) ---> Done.
There's still a format issue, you probabily need to run hatch run fmt (as stated in our contribution guide).
Could you please add the ignore-for-release-notes tag to this PR to fix the CI check?. I can't find the option to do it myself. This is because it's an internal refactoring that doesn't change the user-visible behavior.
I think it could be nice to add a release note for a refactoring. An example is here (you can find other ones under releasenotes folder).
Hi @mpangrazzi, thanks for the feedback!. Its done.
Hi @mpangrazzi, any additional feedbak?. Thanks!.
@carlosrinc it seems you still have that format issue.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.