Welcome to the Task Generation and Submission System! This guide will walk you through the steps of creating a new task, solving it, and submitting your solution for review.
This work should be completed before the exercise, on Friday 4th October.
- Overview
- Prerequisites
- Step 1: Generating a New Task
- Step 2: Pulling the Task to Your Local Environment
- Step 3: Solving the Task
- Step 4: Committing and Pushing Your Solution
- Step 5: Creating a Pull Request
- Step 6: Review and Merge Process
- Troubleshooting
This system allows you to generate new programming tasks, solve them locally, and submit your solution through a pull request (PR). The PR will be automatically reviewed, and your code will be tested before it is merged.
-
Navigate to the GitHub Repository:
- Go to the repository where the task generation system is hosted.
-
Generate a New Task:
- Click on the "Actions" tab in the repository.
- Select the "Generate Task" workflow from the list on the left.
- Click the "Run workflow" button on the right.
- Fill in the required fields:
- Theme: Describe the theme or concept of the task.
- Difficulty: Select the difficulty level (basic, medium, or hard).
- Language: Choose the natural language for the task description.
- Click "Run workflow" to start the task generation process.
-
Wait for the Task Generation:
- The system will automatically create a new branch in the repository with the generated task. This branch will be named something like
task-YYYYMMDDHHMMSS
.
- The system will automatically create a new branch in the repository with the generated task. This branch will be named something like
-
Clone the Repository:
- If you haven't already, clone the repository to your local machine:
git clone https://github.com/your-username/your-repo.git
- If you haven't already, clone the repository to your local machine:
-
Check Out the Task Branch:
- Navigate to the repository directory:
cd your-repo
- List all branches to find the new task branch:
git branch -r
- Check out the new task branch:
git checkout task-YYYYMMDDHHMM
- Create a new solution branch based on the generated branch:
git checkout -b my-solution
- Navigate to the repository directory:
-
Open the Task Description:
- Navigate to the
tasks/
directory and open thenew_task.md
file. This file contains the detailed description of the task you need to solve.
- Navigate to the
-
Edit the Template Code:
- Go to the
src/
directory and open thetemplate_code.java
file. - Solve the task by writing your solution in this file.
- Go to the
-
Test Your Solution:
- Before committing, make sure your code works by running any available tests.
-
Commit Your Changes:
- Once you're satisfied with your solution, stage and commit your changes:
git add src/template_code.java git commit -m "Solved the task"
- Once you're satisfied with your solution, stage and commit your changes:
-
Push Your Branch to GitHub:
- Push your local branch to GitHub:
git push origin my-solution
- Push your local branch to GitHub:
- Create a Pull Request (PR):
- Go to the GitHub repository in your browser.
- You'll see a prompt to create a pull request for your recently pushed branch. Click on "Compare & pull request."
- Review the changes and ensure everything looks correct.
- Submit the pull request to the generated branch task-YYYYMMDDHHMM
-
Automated Testing:
- When you create the pull request, the system will automatically run the tests on your solution.
-
Review by the Model:
- If all tests pass, the model will generate a compliment and provide a brief analysis of your work. The branch will then be automatically merged into the original branch.
- If any tests fail, the model will provide feedback and suggestions for improving your solution. You can then update your code and push the changes to the same branch, which will automatically re-trigger the tests.
-
Merge Confirmation:
- Once all tests pass and the feedback has been addressed, your branch will be merged into the original branch.
-
Tests Fail After PR:
- If your tests fail after creating a pull request, review the feedback provided by the model, make the necessary corrections, and push the changes again.
-
Issues with Git Commands:
- Ensure you are on the correct branch and that your local repository is up-to-date with the remote repository.
-
General Issues:
- If you encounter any issues not covered here, feel free to open an issue on the GitHub repository or contact the course instructors for help.
This system is designed to help you learn and improve your programming skills through guided tasks and automated feedback. Good luck, and happy coding!