You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide AI-powered feedback on Python code assignments using Google's Gemini language model.
6
+
This action analyzes test results and code to provide personalized feedback on student assignments, including identifying errors, suggesting improvements, and explaining concepts.
7
+
8
+
The AI tutor can identify logic errors, suggest more efficient algorithms, explain complex concepts in simpler terms, and even provide links to relevant documentation.
9
+
10
+
It would save instructors' time, provide more consistent feedback, and help students learn more effectively regardless of time & location.
11
+
12
+
## Prerequisites
13
+
14
+
Before using this action, ensure you have the following:
15
+
16
+
***pytest-json-report plugin:** This plugin is required to generate the JSON test reports that the action uses for analysis.
17
+
* You can install it using pip:
18
+
```bash
19
+
pip install pytest-json-report
20
+
```
21
+
* To generate the JSON report, run the following command:
* This action analyzes the JSON output generated by the `pytest-json-report` plugin to understand the test results of your Python code and provide AI-powered feedback.
64
+
65
+
## Inputs
66
+
* `report-files`: Comma-separated list of JSON report files generated by pytest-json-report. (Required)
67
+
* `api-key`: Your Google API key. (Required)
68
+
* `student-files`: Comma-separated list of Python files containing the student's code for review. (Required)
69
+
*`readme-path`: Path to the assignment instructions (README.md). (Optional)
70
+
*`explanation-in`: Language for explanations (e.g., English, Korean). (Optional, default: English)
71
+
72
+
### Example with multiple JSON files and student files
* The action currently supports only Python code assignments.
85
+
* The action requires the `pytest-json-report` plugin to generate JSON test reports.
86
+
87
+
## Future Work
88
+
* Support multiple human languages.
89
+
* Add language argument
90
+
* Add language detection
91
+
92
+
* Add AI model choice argument to selectdifferent AI models.
93
+
* Gemini advance
94
+
* Gemini basic
95
+
96
+
* Support more programming languages.
97
+
* Possibly in a different repository
98
+
99
+
* Feedback on code passing all tests.
100
+
* Possible further analysis on the code.
101
+
* Provide suggestions for further improvements.
102
+
103
+
* Add `verbose` argument to provide more detailed feedback.
104
+
* More internal details
105
+
106
+
## Troubleshooting
107
+
108
+
* If you encounter any issues, please check the action logs for more information.
109
+
* To view the logs, go to the Actions tab of your repository, click on the workflow run, and thenselectthe"AI Python Tutor" job. You'll find the logs for each step in the job.
110
+
111
+
### Common Errors:
112
+
113
+
* **API Key Errors:**
114
+
* "Invalid API key": Double-check your API key in the repository secrets and the workflow file.
115
+
* "API key not found": Make sure you have set the `GOOGLE_API_KEY` in your repository secrets.
116
+
* **Report File Errors:**
117
+
* "Report file not found": Ensure the JSON report is generated using `pytest-json-report` and placed in the correct location (e.g., `report.json` in the root of your repository).
118
+
* "Invalid report format": Use the `pytest-json-report` plugin with the recommended options to generate a valid report.
119
+
* **Student File Errors:**
120
+
* "Student file not found": Make sure the student's code file is in the correct location and has a `.py` extension.
121
+
***Timeout Errors:**
122
+
*"Action timed out": Increase the `timeout-minutes` value in your workflow file or optimize your code.
123
+
124
+
### Debugging Suggestions:
125
+
126
+
***Check Action Logs:** View the action logs in the GitHub Actions interface for detailed error messages.
127
+
***Test Locally:** Use `act` to run the action locally and debug your workflow.
128
+
129
+
## Contact
130
+
* If you have any questions or feedback, please contact the author : https://github.com/kangwonlee.
0 commit comments