Repository navigation
Generate real families in the zweedse voorouders generator - #60
Merged
Merged
Conversation
It read male_names.txt for both lists, kept only names in both lists, drew from an undefined length, stored one-element arrays as names, never drew a son (randint excludes its end) and wrote the father before the mother. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TomNaessens
marked this pull request as ready for review
October 19, 2026 16:19
TomNaessens
enabled auto-merge
October 19, 2026 16:19
bmesuere
approved these changes
Oct 19, 2026
|
@TomNaessens With this test suite, no links to the files are added in the feedback. As such, students cannot access the content of the files used in the test cases. |
Contributor
Author
Ah, indeed! #65 declares them now, and fixes the same gap in data-visualization. Screenshot from a local run: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


tested/javascript/zweedse voorouders/preparation/generator.jsproduced broken family trees. All of these were confirmed by running it:male_names.txt;!== -1instead of=== -1);femalesList.leftis undefined, so it always drew the first name instead of a random one;splicereturns an array, so names were one-element arrays andmales.indexOf(child)never matched: every child recursed as a mother;randint(0, 1)never returns 1 (the end is exclusive), so no son was ever drawn;father mother ...children, while the description and the solution readmother father ...children.A
drawhelper now takes one name (and throws when a list runs out instead of writing empty names).The second commit regenerates the committed data with the fixed generator: all 50
workdir/data*.txtandevaluation/suite.yaml(Tom's call: a clean end result over a small diff). Every line is nowmother father child...with the mother fromfemale_names.txtand the father frommale_names.txt. The description's own example data (description/media/data/data.txt) isn't generated and is unchanged; its examples still match the solution (fixed in #58).Fixes the second box under "Defects found" in https://github.com/dodona-edu/dodona/issues/8846.
Manual testing instructions
tested/javascript/zweedse vooroudersto a scratch directory,cdinto itspreparation/and runnode generator.js.workdir/data*.txt: the first name on each line is infemale_names.txt, the second inmale_names.txt, and no line has an empty name.Error: ran out of namesinstead of writing empty names.Verification (scratch copies, node 22)
The fixed generator ran 40/40 times on the real name lists without running out. Committed regenerated data (319 lines in 50 files): 0 lines with a mother outside the female list, a father outside the male list, or an empty name. dodona-authoring
verifyon it (ghcr.io/dodona-edu/dodona-tested, universal-judge efd4de5): DSL valid, reference solution 350/350 correct,// wrongrejected (0 correct). Also run the way Dodona does, withnatural_languageen and nl: 350/350 correct each.Not changed:
randintis end-exclusive everywhere, so families get 1..maxChildren-1 children anddescendantsgenerations are only 1 or 2.🤖 Generated with Claude Code