Pull Request - Connect With Them - Digital Dreamers #105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The Connect With Them feature will empower teachers to build stronger connections with their students and better gauge their interest in the course material. By inputting details about what they teach and describing their students' interests and backgrounds, teachers will receive tailored recommendations on making their lessons more engaging and relevant.
Changes
Added below files:
requirements.txt
: changed “fastapi” to “fastapi[standard]”tools.py
.core.py
to generate the recommendationsconnect-with-them-prompt.txt
contains the prompt utilized to generate the recommendationstest_core.py
andtest_tools.py
test thecore.py
andtools.py
respectively using pytestTesting
The new feature was tested using the following unit tests and integration tests. For more details, refer to the documentation.
I) Unit Tests on
core.py
:test_core.py
.test_executor _sucess()
tests the function for successful recommendation generation. It checks if the output has three recommendations generated.test_executor_input_validation_failure()
tests the function for proper input validation.test_executor_logging_on_exception()
tests that the executor function correctly logs errors on exceptions.connect_with_them
feature folder and run the following command:II) Unit Tests on
tools.py
:test_tools.py
test_validate_input_success()
tests for successful input validation scenarios.test_validate_input_failure()
tests for scenarios of input validation failuretest_CWTRecommendationGenerator()
tests for the successful initialization of its namesake class.III) Integration Testing
According to the feature description, the FastAPI /docs interface was utilized to check the API's functionality, and all anticipated inputs and outputs were confirmed. Additionally, the feature was deployed using Docker, and the FastAPI application functioned as intended, indicating that the feature is ready for production.
Results
The new feature passed the tests mentioned above and performed its required function without breaking the existing codebase.
Example Input: The feature was tested using the following input:
Generated Recommendations
Notes
The feature generates personalized recommendations based on input such as the subject taught, grade level, and student interests. These recommendations will help teachers develop engaging and creative lessons for their students through local projects, data analysis, or gamified learning.
Documentation: Connect With Them
Screenshots
Included screenshots of
The Prompt Engineered for the feature:
metadata.json
The output's JSON format