Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Jun 5, 2025

Summary

Replace hard-coded log path with XDG-compliant data directory using get_data_dir(), update tests, and apply style fixes.

Implementation Details

  • Imported get_data_dir() in setup_logging() and removed the hard-coded ~/.oai_coding_agent path.
  • Updated the docstring to refer to DATA_DIR/agent.log instead of ~/.oai_coding_agent/agent.log.
  • Updated tests in tests/test_logger.py and tests/console/test_console.py to import and use get_data_dir() at the top-level.
  • Removed duplicate and unused imports (Path) in logger and console modules.
  • Sorted and grouped imports in logger.py and console/console.py to satisfy ruff import style rules.

Assumptions & Style Decisions

  • Moved test imports of get_data_dir() to the top-level to comply with the existing ruff PLC0415 rule (imports should be at the top). This deviates from the example diff but maintains repository-wide import style.
  • No behavior changes beyond switching to the XDG data directory.

Testing

Ran the following checks:

uv run ruff check --fix
uv run ruff format
uv run mypy .
uv run pytest

All checks and tests passed successfully.

…d apply style fixes

- Use get_data_dir() in setup_logging() and remove hard-coded ~/.oai_coding_agent path
- Update docstring to refer to DATA_DIR/agent.log
- Update tests to import and use get_data_dir() at top-level
- Remove duplicate imports and unused Path imports
- Sort and group imports in logger.py and console/console.py to satisfy ruff style rules
@github-actions github-actions bot added the oai label Jun 5, 2025
@mattmorgis mattmorgis merged commit af32053 into main Jun 5, 2025
1 check passed
@mattmorgis mattmorgis deleted the oai/issue-39 branch June 5, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants