Skip to content
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

Change Open AI Chat classes to make it injectable and add unit tests #28209

Open
Tracked by #27835
victoralfaro-dotcms opened this issue Apr 11, 2024 · 1 comment
Open
Tracked by #27835

Comments

@victoralfaro-dotcms
Copy link
Contributor

victoralfaro-dotcms commented Apr 11, 2024

User Story

As a Java developer, I want to refactor OpenAI classes to make their dependencies injectable so that they can be easily tested.

Acceptance Criteria

  1. Identify and refactor classes within the OpenAI codebase to use dependency injection.
  2. Ensure that all dependencies required by OpenAI classes are injected via constructor or setter methods.
  3. Write unit tests to verify the functionality of the refactored classes.

dotCMS Version

master

Proposed Objective

Integration

Proposed Priority

Priority 2 - Important

External Links

  • Slack Conversations: [Link to relevant Slack channel]
  • GitHub Issue: [Link to GitHub issue for tracking progress]

Assumptions & Initiation Needs

  • Access to OpenAI codebase for refactoring.
  • Knowledge of dependency injection patterns and practices.
  • Necessary permissions and tools to push changes to the OpenAI repository.

Quality Assurance Notes & Workarounds

  • Ensure unit tests cover all refactored classes and verify their behavior.
  • Review and validate changes with the development team before merging.

Sub-Tasks & Estimates

  1. Identify classes requiring refactoring - 2 hours
  2. Implement dependency injection - 8 hours
  3. Write unit tests for refactored classes - 4 hours
@victoralfaro-dotcms victoralfaro-dotcms changed the title Refactor Open AI Chat classes to make it injectable and add unit tests Change Open AI Chat classes to make it injectable and add unit tests Apr 11, 2024
@victoralfaro-dotcms victoralfaro-dotcms self-assigned this Apr 12, 2024
@victoralfaro-dotcms
Copy link
Contributor Author

victoralfaro-dotcms added a commit that referenced this issue Apr 18, 2024
github-merge-queue bot pushed a commit that referenced this issue Apr 19, 2024
…sier to test them (#28267)

* #28209: Modifying Open AI classes and their consumers to make them easier to test them

* #28209: applying feedback
@dsilvam dsilvam added the Release : 24.05.13 Bug Fixing label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants