harbor run -t openthoughts/tasktrove-exp-rpt-scaffold-v2-scaffold-0498harbor download openthoughts/tasktrove-exp-rpt-scaffold-v2-scaffold-0498Task instruction
You are to implement the NotImplementedError stubs in the scaffolded code so that a complete, working contour-sorting CLI is produced. The tests (run via pytest) will exercise the behavior described in the docstrings and through the expected CLI workflow. Do not reveal or hard-code any test-specific data; rely on the documented shapes and behaviors.
What needs to be implemented (fill in NotImplementedError stubs)
_build_parser() -> argparse.ArgumentParser
load_segments(input_path: str) -> Segments
assemble_polygons(segments: Segments) -> Polygons
save_polygons(polygons: Polygons, output_path: str) -> None
ContourSortTool.init(self, input_path: str, output_path: str) -> None
ContourSortTool.run(self) -> int
main(argv: Optional[List[str]] = None) -> int
How these pieces fit together (high-level behavior)
Files to modify
Testing and validation
Notes and expectations
Good luck.
Important: place your implementation at /app/contour_sort.py so the tests can import contour_sort.