-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/basic commands #14
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 `ProjectRepository` for storing project data, `ProjectService` for business logic, and `ListProjectsCommand` for retrieving existing projects.
Add `add` method in `ProjectRepository` to handle project validation and storage. Update `ProjectService` with a new `createProject` method for project creation. Annotate `ListProjectsCommand` with `@ShellMethod` for CLI functionality.
…method Update parameter names in the `createProject` method for better clarity and consistency with domain terminology.
Update `ListProjectsCommand` to improve project listing output. Return a formatted string instead of raw project data, including project descriptions. Update tests to verify new output format.
Add configuration for interactive shell in `application.yaml`. Include dependencies for JLine terminal interaction to support enhanced CLI functionality.
Add a test class `CreateProjectCommandTest` to verify project creation functionality. Include setup and a test to assert successful project creation.
Add @ShellMethod to expose the create command, enabling project creation via the interactive shell.
Command/list projects
…Command Introduce support for interactive input when parameters are missing. Validate numeric inputs to ensure all scores are between 1 and 5. Update unit tests to cover interactive scenarios and validation cases. Add ConsoleInputProvider interface for input handling.
Replace generic exception with `NameTakenException` in `ProjectRepository` to improve error handling for duplicate project names. Update `CreateProjectCommand` and `ProjectService` to catch and handle the new exception. Adjust tests to reflect the changes.
Replace inline strings for input prompts with static final constants to improve maintainability and consistency. Update related tests accordingly.
Adjust prompt messages to provide clearer context and improve user understanding of the scoring criteria.
Shorten and standardize option flags for `ease` and `effort` parameters to improve CLI usability.
Align descriptions for `confidence`, `ease`, and `reach` options with scoring criteria for improved clarity.
Integrate ICE and RICE score calculations into `CreateProjectCommand` using the new `ScoreCalculator` component. Update command output to display calculated scores. Extend `ProjectService` to return project details and adjust tests to verify score outputs.
Integrate ICE and RICE score calculations into `ListProjectsCommand` using the `ScoreCalculator` component. Update command output to include calculated scores. Adjust tests to validate score outputs.
Command/create project
Introduce `ViewProjectCommandTest` to verify the behavior of `ViewProjectCommand`. Cover scenarios for non-existent and existing projects, validating output messages and project details.
Introduce `ViewProjectCommand` to view specific project information by name. Update `ProjectRepository` and `ProjectService` to support fetching projects by name and handle cases where projects are not found with a specific exception.
Command/view project
…nput scoring and implement average score calculation
…tCommand Introduce `InvalidScoreException` for better error specificity. Refactor scoring prompts to retry on invalid input and ensure all scores adhere to the 1-5 range. Simplify exception management for cleaner code and user feedback.
…uestions Use detailed prompts for input scoring and implement average score calculation
dmccoystephenson
left a comment
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.
Self-review
src/main/java/com/preponderous/parpt/command/CreateProjectCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/com/preponderous/parpt/command/ViewProjectCommand.java
Outdated
Show resolved
Hide resolved
| import org.springframework.stereotype.Component; | ||
|
|
||
| @Component | ||
| public class ScoreCalculator { |
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.
Should add logging
| .reach(reach) | ||
| .effort(effort) | ||
| .build(); | ||
| projectRepository.add(project); |
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.
Validation should take place before this instruction
dmccoystephenson
left a comment
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.
Another quick review
src/main/java/com/preponderous/parpt/command/CreateProjectCommand.java
Outdated
Show resolved
Hide resolved
Extract scoring prompts to `application.yaml` and `PromptProperties` for centralized configuration. Update `CreateProjectCommand` and tests to use the new configuration-based approach, simplifying prompt management and ensuring consistency.
Remove hardcoded default values from `PromptProperties` fields to rely on externalized configuration, ensuring flexibility and cleaner code.
…-prompts feat: externalize scoring prompts into configuration
…bels Add `getScoreDescription` method to replace numeric scores with descriptive labels (e.g., "very low" to "very high"). Update tests to validate the updated output format.
…e/Parpt into feat/basic-commands
Add class and method-level JavaDoc comments to provide clarity on the interface's responsibility and the purpose of its `readLine` method.
… clarity Move project name and description validation closer to their respective input prompts for improved code readability and logical flow.
No description provided.