forked from lastmile-ai/aiconfig
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
9/n Server init env file Validation (lastmile-ai#1404)
9/n Server init env file Validation Summary: - Refactored Env File Validation to a helper method - Added env file validation to aiconfig server start. Does not block on an invalid file, and instead logs error message Test Plan: ``` aiconfig edit --env-file-path=testfiledoesntexist [WARNING] 2024-03-06 11:59:44,800 server_utils.py:306: Specified env file path is not a .env file: 'testfiledoesntexist' ``` ``` aiconfig edit --env-file-path=testfiledoesntexist.env [WARNING] 2024-03-06 12:00:13,063 server_utils.py:306: Specified .env file path does not exist: 'testfiledoesntexist.env' ``` Note: while testing I noticed that argparse handles no argument passed as an empty string. ## Dependencies * __->__ lastmile-ai#1404 * lastmile-ai#1398
- Loading branch information
Showing
2 changed files
with
37 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters