Skip to content

feat: CLI 명령어 시스템 및 실제 동작 테스트 구현#3

Merged
gagip merged 3 commits intomasterfrom
feature/cli
Nov 1, 2025
Merged

feat: CLI 명령어 시스템 및 실제 동작 테스트 구현#3
gagip merged 3 commits intomasterfrom
feature/cli

Conversation

@gagip
Copy link
Copy Markdown
Owner

@gagip gagip commented Nov 1, 2025

  • 3개 서브커맨드 (parse/search/projects) 추가
  • 다중 포맷 출력 지원 (text/json/csv)

- 3개 서브커맨드 (parse/search/projects) 추가
- 다중 포맷 출력 지원 (text/json/csv)
@gagip gagip requested a review from Copilot November 1, 2025 10:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the CLI from a single-command interface to a subcommand-based architecture with three commands: parse, search, and projects. It also adds comprehensive test coverage for formatters and CLI commands.

  • Refactored CLI to use subcommands (parse, search, projects) instead of positional arguments
  • Added output formatters (text, json, csv) for search results with corresponding tests
  • Enhanced UTF-8 encoding support for stdout/stderr streams

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
cli.py Refactored from single-command to subcommand architecture with proper encoding setup
git_log_analysis/cli/init.py New module exporting command setup functions
git_log_analysis/cli/types.py Type definitions for CLI argument parsers
git_log_analysis/cli/parse_command.py Parse subcommand implementation
git_log_analysis/cli/search_command.py Search subcommand with filtering and output format options
git_log_analysis/cli/projects_command.py Projects subcommand showing available projects and statistics
git_log_analysis/cli/formatters.py Output formatters for text, JSON, and CSV formats
git_log_analysis/mcp/data_loader.py Added UTF-8 encoding configuration for logging
tests/test_formatter.py Comprehensive tests for all formatters
tests/test_cli_commands.py Integration tests for CLI commands via subprocess
CLAUDE.md Updated documentation with new CLI usage examples
.gitignore Added settings.local.json to ignore list

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +4 to +5

SubParser = argparse._SubParsersAction
Copy link

Copilot AI Nov 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accessing private API argparse._SubParsersAction is not recommended. Use the public type annotation argparse._SubParsersAction[argparse.ArgumentParser] or consider using typing.Any if type hints are needed.

Suggested change
SubParser = argparse._SubParsersAction
from typing import Any
SubParser = Any

Copilot uses AI. Check for mistakes.
Repository owner deleted a comment from Copilot AI Nov 1, 2025
Repository owner deleted a comment from Copilot AI Nov 1, 2025
Repository owner deleted a comment from Copilot AI Nov 1, 2025
@gagip gagip merged commit ffc4c4b into master Nov 1, 2025
3 checks passed
@gagip gagip deleted the feature/cli branch November 1, 2025 12:50
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.

2 participants