-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Description
The current configuration handling in the script relies on multiple sources (environment variables, a JSON config file, and default values). However, there are potential issues that could lead to unexpected behavior:
- Missing Config File Handling: If the config file does not exist, the script attempts to load it, which may cause errors.
- Error Handling for JSON Parsing: If the config file is malformed, the script does not handle the JSON parsing errors gracefully.
- Redundant Environment Variable Checks: The script checks for environment variables multiple times in different locations, which could be streamlined.
- Logging Instead of Silent Failures: Errors or missing configurations should be logged for better debugging.
Steps to Reproduce
- Remove the
config.jsonfile or setROBOFLOW_CONFIG_DIRto a non-existent path. - Run the script and observe any failures.
- Modify
config.jsonto contain invalid JSON. - Run the script again and observe the error handling.
Expected Behavior
- The script should handle missing or malformed config files gracefully.
- It should provide clear logs when a configuration value cannot be retrieved.
- Environment variable lookups should be optimized.
Metadata
Metadata
Assignees
Labels
No labels