Skip to content

feat: Support Enum parameter parsing in function declarations #625 #687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lucasnobre212
Copy link

(My past PR (#625) was using the main branch in my fork and this was causing me problems. I created a new branch for this feature only. Sorry! )

Added handling for Enum types in function_parameter_parse_util.py to enable parsing of Enum parameters.
Updated schema generation to include enum values and validated default values.
Included a unit test to ensure correctness of the implementation.

Observations:

This is my first PR, so please tell me if I need to provide more context or make more changes
I added a unit test for Enum. I couldn't run a integration test though, I tried to run only test_single_function_calls_success from test_tools.py but pytest kept skipping it.

Related Issues:
#398

Testing plan:

Run
uv run pytest ./tests/unittests
More specifically, you need to run the test test_enum_input in tests/unittests/tools/test_build_function_declaration.py

Added handling for Enum types in `function_parameter_parse_util.py` to enable parsing of Enum parameters. Updated schema generation to include enum values and validated default values. Included a unit test to ensure correctness of the implementation.
@lucasnobre212 lucasnobre212 changed the title Support Enum parameter parsing in function declarations feat: Support Enum parameter parsing in function declarations #625 May 12, 2025
@lucasnobre212
Copy link
Author

@hangfei updated branch with main. It is my first PR to this project, please tell if I need to do anything else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant