-
Notifications
You must be signed in to change notification settings - Fork 6
feat: Command Line Interface #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add TetraPaths NamedTuple for standardized path management - Include paths for .tetra directory, config.json, and deployments.json - Centralize path logic to ensure consistency across CLI commands - Provide ensure_tetra_dir() method for directory creation
- Create template directory structure under src/tetra_rp/cli/templates/ - Extract 4 templates: basic, advanced, gpu-compute, web-api - Each template includes: main.py, requirements.txt, .env.example, config.json - Advanced template includes utils.py, web-api includes api.py - All files properly formatted with single trailing newline
- Replace 460+ lines of string constants with file-based loading - Add get_template_directory() and load_template_files() functions - Implement filesystem-based template discovery - Maintain backward compatibility with existing API - Reduce skeleton.py from ~460 to ~100 lines (78% reduction)
- Add init command for project scaffolding with template selection - Add resource command for managing compute resources (list/create/delete) - Add run command for executing entry points with deployment integration - Add deployment utilities for environment management - Include comprehensive help text and progress indicators - Support both interactive and non-interactive modes
- Wire up init, resource, and run commands in main CLI - Fix missing deployments_file attribute in TetraPaths usage - Update deploy commands to work with centralized config system - Ensure all CLI commands use consistent path management
Signed-off-by: pandyamarut <[email protected]>
There was a problem hiding this 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 introduces a comprehensive command-line interface (CLI) for the tetra-rp package, adding the flash command with project scaffolding, deployment management, and resource monitoring capabilities.
- Adds complete CLI structure with
flashcommand and subcommands for init, run, deploy, and resource management - Implements project template system with pre-built templates for basic, advanced, GPU compute, and web API projects
- Integrates deployment environment management with mock functionality for creating, deploying, and monitoring environments
Reviewed Changes
Copilot reviewed 29 out of 31 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/tetra_rp/config.py |
Core configuration management for CLI paths and directories |
src/tetra_rp/cli/main.py |
Main CLI entry point with typer app configuration |
src/tetra_rp/cli/commands/*.py |
Command implementations for init, run, deploy, and resource management |
src/tetra_rp/cli/utils/*.py |
Utility modules for skeleton generation and deployment management |
src/tetra_rp/cli/templates/** |
Project templates with example code for different use cases |
pyproject.toml |
Dependencies and CLI entry point configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this 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 29 out of 31 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CLI skeleton looks good. Other things can be addressed as we extend the functionalities.
Beginning of the CLI. Let's keep this simple. Skeleton for the most part.