Skip to content

Fix #87: Rename _ensure_output_dir to _prepare_output_file#151

Merged
himanshu231204 merged 2 commits into
OpenAgentHQ:mainfrom
fazalpsinfo-cmyk:fix-87-rename-ensure-output-dir
Jul 15, 2026
Merged

Fix #87: Rename _ensure_output_dir to _prepare_output_file#151
himanshu231204 merged 2 commits into
OpenAgentHQ:mainfrom
fazalpsinfo-cmyk:fix-87-rename-ensure-output-dir

Conversation

@fazalpsinfo-cmyk

Copy link
Copy Markdown

Description

Fixes #87 - _ensure_output_dir() is misnamed: it creates the parent of the output path (not the path itself) and returns the path to be used as a file. The name contradicts the behavior, making the code harder to understand.

Renamed to _prepare_output_file() which accurately reflects that it:

  1. Creates parent directories
  2. Returns the resolved file path

Changes

  • Renamed _ensure_output_dir_prepare_output_file in base.py
  • Updated all 5 callers (html.py, terminal.py, json_report.py, markdown.py, comparison.py)
  • Updated test in test_base.py

Related

Fixes #87


Support open-source contributions: https://buymeacoffee.com/muhamedfazalps

@himanshu231204 himanshu231204 merged commit 6d1b393 into OpenAgentHQ:main Jul 15, 2026
9 checks passed
@github-actions

Copy link
Copy Markdown

🎉 Congratulations @fazalpsinfo-cmyk!

Your pull request has been successfully merged into main. 🚀

Thank you for contributing to OpenAgentHQ and helping improve the project.

We truly appreciate your contribution and hope to see you back with more amazing PRs!

Happy Open Sourcing! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reports(base): _ensure_output_dir name contradicts behaviour (creates parent dir, not output dir)

2 participants