azure-search-openai-demo icon indicating copy to clipboard operation
azure-search-openai-demo copied to clipboard

Update prepdocs.py

Open rowingdude opened this issue 2 years ago • 2 comments

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

rowingdude avatar May 30 '23 16:05 rowingdude

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

tonybaloney avatar Jun 15 '23 21:06 tonybaloney

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed.

github-actions[bot] avatar Dec 23 '23 01:12 github-actions[bot]