Only edit the solution branch. main is generated from it by
.github/workflows/publish-tasks.yml on every push to solution. Never commit to main by hand.
Wrap solution code in markers, using the file's comment style (//, # or <!-- -->):
// TODO task-3: send the question as a user message and return the answer text
throw new UnsupportedOperationException("TODO task-3");- Lines between
SOLUTION-STARTandSOLUTION-ELSEare removed frommain. TASK:lines become the starter code, with the// TASK:prefix stripped. The starter code must compile.- Files the student creates from scratch go in
.solution-only.
- Copy the previous module's finished code into a new folder (
NN-name). Remove its markers, keeping the solution. - Add the new tasks with markers, and one
TaskNXxxTestclass per task. - Write
README.md(the idea) andTASKS.md(## Task N: Titlesections, a Done when line with the test command, a hint in<details>). - Check it locally:
(cd NN-name && ./mvnw verify) # solution passes
python3 scripts/generate_tasks.py . /tmp/tasks # generate the student version
(cd /tmp/tasks/NN-name && ./mvnw test) # must compile, and fail- Add the module to the table in
README.mdand toCHANGELOG.md.
- Prefer adding new modules over changing released ones.
- Fix bugs in released modules with small, targeted changes, and list them in
CHANGELOG.md. - Never rename or move a released module's files.