harbor run -t openthoughts/tasktrove-exp-rpt-curriculum-medium-curriculum-medium-0080harbor download openthoughts/tasktrove-exp-rpt-curriculum-medium-curriculum-medium-0080You will implement a small data utility and a CLI to emit or persist a representation of a filesystem tree. The work remains Python-based and uses only standard library plus Click (for the CLI), with a focus on clear input validation and predictable JSON output.
What to build
Function: path_hierarchy
Function/CLI: get_tree (a Click command)
test_path_hierarchy
test_path_hierarchy_invalid_path
test_path_hierarchy_invalid_path_none
test_path_hierarchy_invalid_path_empty_path
test_get_tree_invalid_path
test_get_tree_valid_path
test_get_tree_valid_path_jsonfile
test_get_tree_valid_path_prettyprint
Location: Put all implementation under /app/ (you should place the package as /app/flask_jsondash with the described data_utils.filetree module).
Dependencies: Use only standard library plus Click (as the tests already rely on Click’s CliRunner). Do not rely on external packages beyond those.
Input handling edge cases:
Data model:
Edge cases to consider (moderate):
Hints (not full solution):
Acceptance criteria
Notes