Add Handling for Incorrect Directory
Currently if i pass down a command in the cli tool with incorrect directory , for example:
agent-wiz extract --framework your_framework --directory ./this/directory/does/not/exists --output sample.json
It generates a graph output containing start and end nodes:
{
"nodes": [
{
"name": "Start",
"function_name": null,
"docstring": null,
"node_type": "Start",
"source_location": null,
"metadata": {}
},
{
"name": "End",
"function_name": null,
"docstring": null,
"node_type": "End",
"source_location": null,
"metadata": {}
}
],
"edges": [],
"metadata": {
"framework": "your_sample_framework"
}
}
This should not happen.
An ideal solution to this would be to notify in the CLI itself that the directory sent is not accessible, it either does not exists or we do not have permission to view contents.
could you please assign it to me
could you please assign it to me
@IshantSingh24 can you please explain your approach for reaching the solution?
@Aaditya-G i'll check once at the very start to see if the path exists and is the right type, just after extract command is run using os.path.isdir() if there is any other way you prefer?