Skip to content

Conversation

@j-madrone
Copy link
Collaborator

  • Added aliases for existing commands in the CLI for improved usability, allowing commands like project, profiles, and property to be recognized alongside their original names.
  • Introduced an --output-mode option in the init and status commands to support both table and JSON formats, enhancing user experience and data accessibility.
  • Implemented validation to ensure JSON output mode is only used in non-interactive mode, providing clear error messages for incorrect usage.
  • Updated error handling in the init command to return structured JSON responses for various validation errors, improving consistency in user feedback.
  • Enhanced unit tests to cover new output modes and validation scenarios, ensuring robust functionality and error handling across commands.

- Added aliases for existing commands in the CLI for improved usability, allowing commands like `project`, `profiles`, and `property` to be recognized alongside their original names.
- Introduced an `--output-mode` option in the `init` and `status` commands to support both table and JSON formats, enhancing user experience and data accessibility.
- Implemented validation to ensure JSON output mode is only used in non-interactive mode, providing clear error messages for incorrect usage.
- Updated error handling in the `init` command to return structured JSON responses for various validation errors, improving consistency in user feedback.
- Enhanced unit tests to cover new output modes and validation scenarios, ensuring robust functionality and error handling across commands.
Copilot AI review requested due to automatic review settings September 30, 2025 14:07
@github-actions
Copy link

github-actions bot commented Sep 30, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
__init__.py52296%10–11
cli
   __init__.py440100% 
   containers.py270100% 
cli/commands
   __init__.py00100% 
   api_clients.py286996%24, 297, 442–443, 476, 486, 576, 607, 615
   api_collections.py253398%25, 178, 340
   assets.py46295%51–52
   connections.py520599%578, 580, 586, 624, 973
   data_tables.py163596%28, 248, 262, 316–317
   guide.py166199%106
   init.py850100% 
   profiles.py1970100% 
   properties.py95198%18
   pull.py171298%190–191
   workspace.py38294%57, 67
cli/commands/connectors
   __init__.py00100% 
   command.py88297%103, 152
   connector_manager.py203498%176, 292, 300–301
cli/commands/projects
   __init__.py00100% 
   command.py2691096%353–356, 367, 433–435, 485, 489
   project_manager.py166795%48, 66, 263–264, 276, 317, 325
cli/commands/push
   __init__.py00100% 
   command.py132496%101, 104, 222, 300
cli/commands/recipes
   __init__.py00100% 
   command.py423997%113, 129–130, 267–270, 397, 703
   validator.py6991697%174, 870, 1123, 1210, 1300–1302, 1398–1399, 1458–1459, 1648–1649, 1677–1679
cli/utils
   __init__.py30100% 
   exception_handler.py198696%137, 184, 211, 238, 295, 330
   gitignore.py140100% 
   ignore_patterns.py230100% 
   spinner.py430100% 
   version_checker.py135695%24, 26, 33–34, 72, 102
cli/utils/config
   __init__.py50100% 
   manager.py4541397%125, 136–138, 141, 154, 330, 454, 668, 826–827, 888, 947
   models.py330100% 
   profiles.py3091096%93, 189–190, 193, 228–230, 255–257
   workspace.py680100% 
TOTAL540811997% 

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 pull request enhances the CLI command structure and output options by adding aliases for commands and introducing JSON output support with proper validation. The main purpose is to improve usability through command aliases and provide structured JSON responses for automation and scripting scenarios.

  • Added aliases for existing CLI commands (project, profiles, property, etc.) to improve discoverability
  • Introduced --output-mode option supporting both table and JSON formats for init and status commands
  • Implemented validation ensuring JSON output only works in non-interactive mode with clear error handling

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/workato_platform/cli/init.py Added command aliases for better usability
src/workato_platform/cli/commands/init.py Enhanced init command with JSON output mode and validation
src/workato_platform/cli/commands/profiles.py Added status command with JSON output support
src/workato_platform/cli/utils/exception_handler.py Updated exception handling to support JSON output mode
src/workato_platform/cli/utils/config/manager.py Updated configuration manager with SSL certificate validation
src/workato_platform/cli/commands/pull.py Modified pull command to support non-interactive mode
tests/unit/commands/test_init.py Added comprehensive tests for new init command features
tests/unit/commands/test_profiles.py Added tests for status command JSON output
tests/unit/utils/test_exception_handler.py Added tests for JSON exception handling
tests/unit/config/test_manager.py Updated configuration manager tests

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

- Eliminated unnecessary imports of `json` and `StringIO` in the `test_init.py` file, streamlining the test code and improving readability.
- Updated test functions to maintain functionality while enhancing clarity and maintainability.
@oalami oalami self-assigned this Oct 8, 2025
@oalami oalami requested review from Copilot and oalami October 8, 2025 00:10
@oalami oalami removed their assignment Oct 8, 2025
Copy link
Collaborator

@oalami oalami left a comment

Choose a reason for hiding this comment

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

LGTM

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

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

src/workato_platform/cli/utils/config/manager.py:1

  • Using model_construct() instead of the default constructor may bypass validation. Consider using ConfigData() unless there's a specific reason to skip validation.
"""Main configuration manager with simplified workspace rules."""

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@oalami oalami merged commit e16afc8 into main Oct 8, 2025
5 checks passed
@oalami oalami deleted the fix-init-non-interactive branch October 8, 2025 00:13
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.

3 participants