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:
Made changes to requirements.txt: changed “fastapi” to “fastapi[standard]”
Included logic for generating the recommendations in tools.py.
Executor calls made by core.py to generate the recommendations
connect-with-them-prompt.txt contains the prompt utilized to generate the recommendations
test_core.py and test_tools.py test the core.py and tools.py respectively using pytest
Testing
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.
The function test_executor _sucess() tests the function for successful recommendation generation. It checks if the output has three recommendations generated.
The function test_executor_input_validation_failure() tests the function for proper input validation.
The function test_executor_logging_on_exception() tests that the executor function correctly logs errors on exceptions.
To run the test file, navigate to the tests directory in the connect_with_them feature folder and run the following command:
pytest test_core.py
Expected Output:
II) Unit Tests on tools.py: test_tools.py
The function test_validate_input_success() tests for successful input validation scenarios.
The function test_validate_input_failure() tests for scenarios of input validation failure
The function test_CWTRecommendationGenerator() tests for the successful initialization of its namesake class.
To run the test file, navigate to the tests directory in the “connect_with_them” feature folder and run the following command:
pytest test_tools.py
Expected Output:
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.
To run the code, enter the following command:
./local-start.sh
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.
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.
To run the code, enter the following command:
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