azure-search-openai-demo
azure-search-openai-demo copied to clipboard
Update prepdocs.py
Added error handling and input validation.
Purpose
- ...
Does this introduce a breaking change?
[ ] Yes
[X ] No
Pull Request Type
What kind of change does this Pull Request introduce?
[ ] Bugfix
[X ] Feature
[ ] Code style update (formatting, local variables)
[X ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:
How to Test
- Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
- Test the code
What to Check
Verify that the following are valid
- ...
Other Information
Instead of validating each argument at a time, you can add the required=True parameter to add of the add_argument calls and argparse will raise the error automatically. This would also show up in the --help output.
https://docs.python.org/3/library/argparse.html#required
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed.