Skip to content

Tracking: Syncing exercises to problem specifications #628

@mk-mxp

Description

@mk-mxp

Using configlet sync at the time of writing is a wall of warnings. These are things to sync. I will extract one issue for each exercise, but that takes some more time.

To sync an exercise with problem specifications, take these steps:

  • Run bin/configlet sync -u -e <slug> --yes --docs --filepaths --metadata --tests include (updates the Markdown files and maybe tests.toml)
  • Drop strict types comments from test file and example code (these are useless)
  • Add and sync test meta data to tests (uuid in DocBlocks / #TestDox())
  • Add exercise to bin/auto-sync.txt to keep it in sync (keep the file alphabetically sorted)
  • Decide on adding / adjusting / ordering test cases to match current problem specs

Do not redesign the student's interface or add test cases that would invalidate existing community solutions. These are extra tasks, which should be discussed in advance.

  • Sync flatten-array #910
  • Sync gigasecond #911
  • Sync grains #912
  • Sync hello-world #909
  • Sync high-scores #913
  • Sync linked-list #914
  • docs: instructions unsynced: markdown
  • metadata: unsynced: markdown
  • markdown: missing 5 test cases
    • with h3 header level (9df3f500-0622-4696-81a7-d5babd9b5f49)
    • with h4 header level (50862777-a5e8-42e9-a3b8-4ba6fcd0ed03)
    • with h5 header level (ee1c23ac-4c86-4f2a-8b9c-403548d4ab82)
    • with h7 header level (6dca5d10-5c22-4e2a-ac2b-bd6f21e61939)
    • h7 header level is a paragraph (81c0c4db-435e-4d77-860d-45afacdad810)
  • docs: instructions unsynced: matrix
  • metadata: unsynced: matrix
  • matrix: missing 8 test cases
    • extract row from one number matrix (ca733dab-9d85-4065-9ef6-a880a951dafd)
    • can extract row (5c93ec93-80e1-4268-9fc2-63bc7d23385c)
    • extract row where numbers have different widths (2f1aad89-ad0f-4bd2-9919-99a8bff0305a)
    • can extract row from non-square matrix with no corresponding column (68f7f6ba-57e2-4e87-82d0-ad09889b5204)
    • extract column from one number matrix (e8c74391-c93b-4aed-8bfe-f3c9beb89ebb)
    • can extract column (7136bdbd-b3dc-48c4-a10c-8230976d3727)
    • can extract column from non-square matrix with no corresponding row (ad64f8d7-bba6-4182-8adf-0c14de3d0eca)
    • extract column where numbers have different widths (9eddfa5c-8474-440e-ae0a-f018c2a0dd89)
  • docs: instructions unsynced: nth-prime
  • docs: instructions unsynced: nucleotide-count
  • docs: instructions unsynced: ocr-numbers
  • metadata: unsynced: ocr-numbers
  • docs: instructions unsynced: palindrome-products
  • palindrome-products: missing 1 test case
    • smallest product does not use the smallest factor (16481711-26c4-42e0-9180-e2e4e8b29c23)
  • docs: instructions unsynced: perfect-numbers
  • metadata: unsynced: perfect-numbers
  • docs: instructions unsynced: poker
  • metadata: unsynced: poker
  • poker: missing 39 test cases
    • single hand always wins (161f485e-39c2-4012-84cf-bec0c755b66c)
    • highest card out of all hands wins (370ac23a-a00f-48a9-9965-6f3fb595cf45)
    • a tie has multiple winners (d94ad5a7-17df-484b-9932-c64fc26cff52)
    • multiple hands with the same high cards, tie compares next highest ranked, down to last card (61ed83a9-cfaa-40a5-942a-51f52f0a8725)
    • winning high card hand also has the lowest card (da01becd-f5b0-4342-b7f3-1318191d0580)
    • one pair beats high card (f7175a89-34ff-44de-b3d7-f6fd97d1fca4)
    • highest pair wins (e114fd41-a301-4111-a9e7-5a7f72a76561)
    • both hands have the same pair, high card wins (b3acd3a7-f9fa-4647-85ab-e0a9e07d1365)
    • two pairs beats one pair (935bb4dc-a622-4400-97fa-86e7d06b1f76)
    • both hands have two pairs, highest ranked pair wins (c8aeafe1-6e3d-4711-a6de-5161deca91fd)
    • both hands have two pairs, with the same highest ranked pair, tie goes to low pair (88abe1ba-7ad7-40f3-847e-0a26f8e46a60)
    • both hands have two identically ranked pairs, tie goes to remaining card (kicker) (15a7a315-0577-47a3-9981-d6cf8e6f387b)
    • both hands have two pairs that add to the same value, win goes to highest pair (f761e21b-2560-4774-a02a-b3e9366a51ce)
    • two pairs first ranked by largest pair (fc6277ac-94ac-4078-8d39-9d441bc7a79e)
    • three of a kind beats two pair (21e9f1e6-2d72-49a1-a930-228e5e0195dc)
    • both hands have three of a kind, tie goes to highest ranked triplet (c2fffd1f-c287-480f-bf2d-9628e63bbcc3)
    • with multiple decks, two players can have same three of a kind, ties go to highest remaining cards (eb856cc2-481c-4b0d-9835-4d75d07a5d9d)
    • with multiple decks, two players can have same three of a kind, ties go to highest remaining cards (26a4a7d4-34a2-4f18-90b4-4a8dd35d2bb1)
    • a straight beats three of a kind (a858c5d9-2f28-48e7-9980-b7fa04060a60)
    • aces can end a straight (10 J Q K A) (73c9c756-e63e-4b01-a88d-0d4491a7a0e3)
    • aces can start a straight (A 2 3 4 5) (76856b0d-35cd-49ce-a492-fe5db53abc02)
    • aces cannot be in the middle of a straight (Q K A 2 3) (e214b7df-dcba-45d3-a2e5-342d8c46c286)
    • both hands with a straight, tie goes to highest ranked card (6980c612-bbff-4914-b17a-b044e4e69ea1)
    • even though an ace is usually high, a 5-high straight is the lowest-scoring straight (5135675c-c2fc-4e21-9ba3-af77a32e9ba4)
    • flush beats a straight (c601b5e6-e1df-4ade-b444-b60ce13b2571)
    • both hands have a flush, tie goes to high card, down to the last one if necessary (4d90261d-251c-49bd-a468-896bf10133de)
    • both hands have a flush, tie goes to high card, down to the last one if necessary (e04137c5-c19a-4dfc-97a1-9dfe9baaa2ff)
    • full house beats a flush (3a19361d-8974-455c-82e5-f7152f5dba7c)
    • both hands have a full house, tie goes to highest-ranked triplet (eb73d0e6-b66c-4f0f-b8ba-bf96bc0a67f0)
    • with multiple decks, both hands have a full house with the same triplet, tie goes to the pair (34b51168-1e43-4c0d-9b32-e356159b4d5d)
    • four of a kind beats a full house (d61e9e99-883b-4f99-b021-18f0ae50c5f4)
    • both hands have four of a kind, tie goes to high quad (2e1c8c63-e0cb-4214-a01b-91954490d2fe)
    • with multiple decks, both hands with identical four of a kind, tie determined by kicker (892ca75d-5474-495d-9f64-a6ce2dcdb7e1)
    • straight flush beats four of a kind (923bd910-dc7b-4f7d-a330-8b42ec10a3ac)
    • aces can end a straight flush (10 J Q K A) (d9629e22-c943-460b-a951-2134d1b43346)
    • aces can start a straight flush (A 2 3 4 5) (05d5ede9-64a5-4678-b8ae-cf4c595dc824)
    • aces cannot be in the middle of a straight flush (Q K A 2 3) (ad655466-6d04-49e8-a50c-0043c3ac18ff)
    • both hands have a straight flush, tie goes to highest-ranked card (d0927f70-5aec-43db-aed8-1cbd1b6ee9ad)
    • even though an ace is usually high, a 5-high straight flush is the lowest-scoring straight flush (be620e09-0397-497b-ac37-d1d7a4464cfc)
  • docs: instructions unsynced: prime-factors
  • metadata: unsynced: prime-factors
  • prime-factors: missing 5 test cases
    • another prime number (238d57c8-4c12-42ef-af34-ae4929f94789)
    • product of first prime (756949d3-3158-4e3d-91f2-c4f9f043ee70)
    • product of second prime (7d6a3300-a4cb-4065-bd33-0ced1de6cb44)
    • product of third prime (073ac0b2-c915-4362-929d-fc45f7b9a9e4)
    • product of first and second prime (6e0e4912-7fb6-47f3-a9ad-dbcd79340c75)
  • docs: instructions unsynced: proverb
  • metadata: unsynced: proverb
  • proverb: missing 6 test cases
    • zero pieces (e974b73e-7851-484f-8d6d-92e07fe742fc)
    • one piece (2fcd5f5e-8b82-4e74-b51d-df28a5e0faa4)
    • two pieces (d9d0a8a1-d933-46e2-aa94-eecf679f4b0e)
    • three pieces (c95ef757-5e94-4f0d-a6cb-d2083f5e5a83)
    • full proverb (433fb91c-35a2-4d41-aeab-4de1e82b2126)
    • four pieces modernized (c1eefa5a-e8d9-41c7-91d4-99fab6d6b9f7)
  • docs: instructions unsynced: queen-attack
  • queen-attack: missing 1 test case
    • Test the ability of one queen to attack another -> cannot attack if falling diagonals are only the same when reflected across the longest falling diagonal (543f8fd4-2597-4aad-8d77-cbdab63619f8)
  • docs: instructions unsynced: rail-fence-cipher
  • docs: instructions unsynced: resistor-color
  • metadata: unsynced: resistor-color
  • resistor-color: missing 4 test cases
    • Color codes -> Black (49eb31c5-10a8-4180-9f7f-fea632ab87ef)
    • Color codes -> White (0a4df94b-92da-4579-a907-65040ce0b3fc)
    • Color codes -> Orange (5f81608d-f36f-4190-8084-f45116b6f380)
    • Colors (581d68fa-f968-4be2-9f9d-880f2fb73cf7)
  • metadata: unsynced: resistor-color-duo
  • resistor-color-duo: missing 7 test cases
    • Brown and black (ce11995a-5b93-4950-a5e9-93423693b2fc)
    • Blue and grey (7bf82f7a-af23-48ba-a97d-38d59406a920)
    • Yellow and violet (f1886361-fdfd-4693-acf8-46726fe24e0c)
    • White and red (b7a6cbd2-ae3c-470a-93eb-56670b305640)
    • Orange and orange (77a8293d-2a83-4016-b1af-991acc12b9fe)
    • Ignore additional colors (0c4fb44f-db7c-4d03-afa8-054350f156a8)
    • Black and brown, one-digit (4a8ceec5-0ab4-4904-88a4-daf953a5e818)
  • docs: instructions unsynced: resistor-color-trio
  • metadata: unsynced: resistor-color-trio
  • resistor-color-trio: missing 10 test cases
    • Orange and orange and black (d6863355-15b7-40bb-abe0-bfb1a25512ed)
    • Blue and grey and brown (1224a3a9-8c8e-4032-843a-5224e04647d6)
    • Red and black and red (b8bda7dc-6b95-4539-abb2-2ad51d66a207)
    • Green and brown and orange (5b1e74bc-d838-4eda-bbb3-eaba988e733b)
    • Yellow and violet and yellow (f5d37ef9-1919-4719-a90d-a33c5a6934c9)
    • Blue and violet and blue (5f6404a7-5bb3-4283-877d-3d39bcc33854)
    • Minimum possible value (7d3a6ab8-e40e-46c3-98b1-91639fff2344)
    • Maximum possible value (ca0aa0ac-3825-42de-9f07-dac68cc580fd)
    • First two colors make an invalid octal number (0061a76c-903a-4714-8ce2-f26ce23b0e09)
    • Ignore extra colors (30872c92-f567-4b69-a105-8455611c10c4)
  • docs: instructions unsynced: robot-name
  • docs: instructions unsynced: say
  • metadata: unsynced: say
  • say: missing 19 test cases
    • zero (5d22a120-ba0c-428c-bd25-8682235d83e8)
    • one (9b5eed77-dbf6-439d-b920-3f7eb58928f6)
    • fourteen (7c499be1-612e-4096-a5e1-43b2f719406d)
    • twenty (f541dd8e-f070-4329-92b4-b7ce2fcf06b4)
    • twenty-two (d78601eb-4a84-4bfa-bf0e-665aeb8abe94)
    • thirty (f010d4ca-12c9-44e9-803a-27789841adb1)
    • ninety-nine (738ce12d-ee5c-4dfb-ad26-534753a98327)
    • one hundred (e417d452-129e-4056-bd5b-6eb1df334dce)
    • one hundred twenty-three (d6924f30-80ba-4597-acf6-ea3f16269da8)
    • two hundred (2f061132-54bc-4fd4-b5df-0a3b778959b9)
    • nine hundred ninety-nine (feed6627-5387-4d38-9692-87c0dbc55c33)
    • one thousand (3d83da89-a372-46d3-b10d-de0c792432b3)
    • one thousand two hundred thirty-four (865af898-1d5b-495f-8ff0-2f06d3c73709)
    • one million (b6a3f442-266e-47a3-835d-7f8a35f6cf7f)
    • one million two thousand three hundred forty-five (2cea9303-e77e-4212-b8ff-c39f1978fc70)
    • one billion (3e240eeb-f564-4b80-9421-db123f66a38f)
    • a big number (9a43fed1-c875-4710-8286-5065d73b8a9e)
    • numbers below zero are out of range (49a6a17b-084e-423e-994d-a87c0ecc05ef)
    • numbers above 999,999,999,999 are out of range (4d6492eb-5853-4d16-9d34-b0f61b261fd9)
  • docs: instructions unsynced: series
  • series: missing 1 test case
    • slice length is way too large (d7957455-346d-4e47-8e4b-87ed1564c6d7)
  • docs: instructions unsynced: simple-cipher
  • metadata: unsynced: simple-cipher
  • simple-cipher: missing 12 test cases
    • Random key cipher -> Can encode (b8bdfbe1-bea3-41bb-a999-b41403f2b15d)
    • Random key cipher -> Can decode (3dff7f36-75db-46b4-ab70-644b3f38b81c)
    • Random key cipher -> Is reversible. I.e., if you apply decode in a encoded result, you must see the same plaintext encode parameter as a result of the decode method (8143c684-6df6-46ba-bd1f-dea8fcb5d265)
    • Random key cipher -> Key is made only of lowercase letters (defc0050-e87d-4840-85e4-51a1ab9dd6aa)
    • Substitution cipher -> Can encode (565e5158-5b3b-41dd-b99d-33b9f413c39f)
    • Substitution cipher -> Can decode (d44e4f6a-b8af-4e90-9d08-fd407e31e67b)
    • Substitution cipher -> Is reversible. I.e., if you apply decode in a encoded result, you must see the same plaintext encode parameter as a result of the decode method (70a16473-7339-43df-902d-93408c69e9d1)
    • Substitution cipher -> Can double shift encode (69a1458b-92a6-433a-a02d-7beac3ea91f9)
    • Substitution cipher -> Can wrap on encode (21d207c1-98de-40aa-994f-86197ae230fb)
    • Substitution cipher -> Can wrap on decode (a3d7a4d7-24a9-4de6-bdc4-a6614ced0cb3)
    • Substitution cipher -> Can encode messages longer than the key (e31c9b8c-8eb6-45c9-a4b5-8344a36b9641)
    • Substitution cipher -> Can decode messages longer than the key (93cfaae0-17da-4627-9a04-d6d1e1be52e3)
  • docs: instructions unsynced: tournament
  • tournament: missing 12 test cases
    • just the header if no input (67e9fab1-07c1-49cf-9159-bc8671cc7c9c)
    • a win is three points, a loss is zero points (1b4a8aef-0734-4007-80a2-0626178c88f4)
    • a win can also be expressed as a loss (5f45ac09-4efe-46e7-8ddb-75ad85f86e05)
    • a different team can win (fd297368-efa0-442d-9f37-dd3f9a437239)
    • a draw is one point each (26c016f9-e753-4a93-94e9-842f7b4d70fc)
    • There can be more than one match (731204f6-4f34-4928-97eb-1c307ba83e62)
    • There can be more than one winner (49dc2463-42af-4ea6-95dc-f06cc5776adf)
    • There can be more than two teams (6d930f33-435c-4e6f-9e2d-63fa85ce7dc7)
    • typical input (97022974-0c8a-4a50-8fe7-e36bdd8a5945)
    • incomplete competition (not all pairs have played) (fe562f0d-ac0a-4c62-b9c9-44ee3236392b)
    • ties broken alphabetically (3aa0386f-150b-4f99-90bb-5195e7b7d3b8)
    • ensure points sorted numerically (f9e20931-8a65-442a-81f6-503c0205b17a)
  • docs: instructions unsynced: transpose
  • metadata: unsynced: transpose
  • transpose: missing 1 test case
    • jagged triangle (76acfd50-5596-4d05-89f1-5116328a7dd9)
  • docs: instructions unsynced: triangle
  • metadata: unsynced: triangle
  • triangle: missing 2 test cases
    • scalene triangle -> first and third sides are equal (3da23a91-a166-419a-9abf-baf4868fd985)
    • scalene triangle -> second and third sides are equal (b6a75d98-1fef-4c42-8e9a-9db854ba0a4d)
  • docs: instructions unsynced: twelve-days
  • metadata: unsynced: twelve-days
  • twelve-days: missing 15 test cases
    • verse -> first day a partridge in a pear tree (c0b5a5e6-c89d-49b1-a6b2-9f523bff33f7)
    • verse -> second day two turtle doves (1c64508a-df3d-420a-b8e1-fe408847854a)
    • verse -> third day three french hens (a919e09c-75b2-4e64-bb23-de4a692060a8)
    • verse -> fourth day four calling birds (9bed8631-ec60-4894-a3bb-4f0ec9fbe68d)
    • verse -> fifth day five gold rings (cf1024f0-73b6-4545-be57-e9cea565289a)
    • verse -> sixth day six geese-a-laying (50bd3393-868a-4f24-a618-68df3d02ff04)
    • verse -> seventh day seven swans-a-swimming (8f29638c-9bf1-4680-94be-e8b84e4ade83)
    • verse -> eighth day eight maids-a-milking (7038d6e1-e377-47ad-8c37-10670a05bc05)
    • verse -> ninth day nine ladies dancing (37a800a6-7a56-4352-8d72-0f51eb37cfe8)
    • verse -> tenth day ten lords-a-leaping (10b158aa-49ff-4b2d-afc3-13af9133510d)
    • verse -> eleventh day eleven pipers piping (08d7d453-f2ba-478d-8df0-d39ea6a4f457)
    • verse -> twelfth day twelve drummers drumming (0620fea7-1704-4e48-b557-c05bf43967f0)
    • lyrics -> recites first three verses of the song (da8b9013-b1e8-49df-b6ef-ddec0219e398)
    • lyrics -> recites three verses from the middle of the song (c095af0d-3137-4653-ad32-bfb899eda24c)
    • lyrics -> recites the whole song (20921bc9-cc52-4627-80b3-198cbbfcf9b7)
  • docs: instructions unsynced: two-fer
  • metadata: unsynced: two-fer
  • docs: instructions unsynced: variable-length-quantity
  • word-count: missing 2 test cases
    • with apostrophes (4ff6c7d7-fcfc-43ef-b8e7-34ff1837a2d3)
    • quotation for word with apostrophe (6d00f1db-901c-4bec-9829-d20eb3044557)
  • docs: instructions unsynced: wordy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions