Skip to content

Refactor CLI logic#70

Merged
antoniojbt merged 5 commits intocodex/refactor-project_quickstart.py-for-complexity-reductionfrom
lqbanq-codex/refactor-project_quickstart.py-for-complexity-reduction
Jul 31, 2025
Merged

Refactor CLI logic#70
antoniojbt merged 5 commits intocodex/refactor-project_quickstart.py-for-complexity-reductionfrom
lqbanq-codex/refactor-project_quickstart.py-for-complexity-reduction

Conversation

@antoniojbt
Copy link
Owner

Summary

  • break up complex main in project_quickstart.py
  • add helper functions for parsing, validation, project creation and script creation
  • move long messages to helper functions
  • switch output to use logging
  • fix lint issues

Testing

  • pip install -e .
  • flake8
  • pytest -q

https://chatgpt.com/codex/tasks/task_e_688baf8282c48326868870db63c3884f

Copilot AI review requested due to automatic review settings July 31, 2025 19:08
@antoniojbt antoniojbt changed the base branch from master to codex/refactor-project_quickstart.py-for-complexity-reduction July 31, 2025 19:09
Copy link
Contributor

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 logic in project_quickstart.py by breaking up the complex main function into smaller, focused helper functions and switching from print statements to structured logging.

  • Extract CLI parsing, validation, project creation, and script generation into separate functions
  • Replace print statements with proper logging using the logging module
  • Move long message strings to dedicated helper functions for better maintainability

options = parse_cli(argv)
try:
validate_options(options)
except ValueError:
Copy link

Copilot AI Jul 31, 2025

Choose a reason for hiding this comment

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

The exception handling catches ValueError but the validate_options function raises ValueError. However, the error message suggests this should handle docopt.DocoptExit exceptions. The error logging and re-raising pattern may not provide the expected user experience.

Copilot uses AI. Check for mistakes.
antoniojbt and others added 4 commits July 31, 2025 13:10
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…uction' into lqbanq-codex/refactor-project_quickstart.py-for-complexity-reduction
@antoniojbt antoniojbt merged commit f1960f0 into codex/refactor-project_quickstart.py-for-complexity-reduction Jul 31, 2025
4 checks passed
@antoniojbt antoniojbt deleted the lqbanq-codex/refactor-project_quickstart.py-for-complexity-reduction branch July 31, 2025 19:32
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.

1 participant

Comments