Newer
Older
# Notes for developers
This README provides instructions on how to handle changing exercises and their respective solutions.
## Instructions
The Gitlab CI now also includes a check to ensure that the stored patches, located in .patches/, match the current exercises and their respective solutions. Each exercise has one associated patch that maps it to its respective solution. If you change an exercise without updating the patch, the CI will complain that the exercise and solution are out of sync. Keep in mind, that this is only a reminder to update the respective solution once you changed an exercise. Of course, you do not have to adapt the solution if it is not necessary. But in any case, whether changing the exercise, the solution or both, you always need to update the respective patch before pushing the remote repository.
To this end, you can generate the patches as follows:
In the root folder of dumux-course, there is a hidden script `.create_single_patch.sh` (can show it in terminal via `ls -a`). For this script, you need to provide a specific exercise name for which you want to generate the patch. As an example, for generating the patch for the exercise exercise-basic, you would need to run: `./.create_single_patch.sh -x exercise-basic` in the root folder of dumux-course.
TLDR: Before pushing to the remote repository, always generate a new patch, when changing an exercise and/or a solution by using one of the scripts.