Skip to content

Generate pangram's test suite from the canonical data - #913

Merged
rabestro merged 1 commit into
mainfrom
pangram-generated-tests
Nov 10, 2026
Merged

rabestro merged 1 commit into
mainfrom
pangram-generated-tests

Conversation

@rabestro

Copy link
Copy Markdown
Member

Brings pangram in line with problem-specifications and moves it onto the test generator. Part of #488 and #843.

Tests

  • .meta/tests.toml re-synced with bin/configlet sync --tests include -e pangram. One canonical case was missing: "a-m and A-M are 26 different characters but not a pangram" (abcdefghijklm ABCDEFGHIJKLM → false). It reimplements "case insensitive", so the generator emits the new case instead of the old one: still 10 cases.
  • New .meta/template.j2, written in the braceless style like relative-distance's, so the rendered suite already matches .scalafmt.conf.
  • Test names now follow the canonical descriptions ("empty sentence" instead of "sentence empty", …), and the stale /** @version 1.4.0 */ header is gone.

Example and stub

  • The example drops toStream, deprecated since 2.13, for a set check: ('a' to 'z').toSet.subsetOf(input.toLowerCase.toSet).
  • The stub moves to optional braces; Pangrams.isPangram(input: String): Boolean is unchanged.
  • .meta/config.json: blurb synced with problem-specifications (configlet sync --metadata), and added to contributors.

The suite gains a case that existing solutions may not pass (one that counts upper and lower case separately), so this is an important-files change on purpose.

Verification

  • bin/test pangram: 10 of 10 pass.
  • bin/generate-tests --check: 6 generated suites up to date.
  • scalafmt --list with the track config: no changes for the example, stub and suite.
  • bin/verify-exercises-in-docker pangram against exercism/scala-test-runner:latest: passes.
  • configlet sync --tests --metadata -e pangram: up to date; configlet lint passes.

🤖 Generated with Claude Code

Add `.meta/template.j2` so `bin/generate-tests` renders the suite, in
the braceless Scala 3 style `.scalafmt.conf` asks for.

`tests.toml` is re-synced with configlet. The new canonical case,
"a-m and A-M are 26 different characters but not a pangram",
reimplements "case insensitive", so the generated suite has the new
case instead of the old one. Test names now follow the canonical
descriptions, and the stale `@version 1.4.0` header is gone.

The example drops the deprecated `toStream` and checks that the
alphabet is a subset of the sentence's lower-cased characters. The
stub moves to optional braces, with the same signature. The blurb is
synced with problem-specifications.

Part of #488 and #843.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

@github-actions

Copy link
Copy Markdown

Hello 👋 Thanks for your PR.

This repo does not currently have dedicated maintainers. Our cross-track maintainers team will attempt to review and merge your PR, but it will likely take longer for your PR to be reviewed.

If you enjoy contributing to Exercism and have a track-record of doing so successfully, you might like to become an Exercism maintainer for this track.

Please feel free to ask any questions, or chat to us about anything to do with this PR or the reviewing process on the Exercism forum.

(cc @exercism/cross-track-maintainers)

@rabestro rabestro self-assigned this Nov 10, 2026
@rabestro
rabestro requested review from a team and IsaacG November 10, 2026 18:26
@rabestro rabestro added the ready-to-translate The English in this PR is final; queue its translations label Nov 10, 2026
exercism-i18n Bot added a commit to exercism/i18n that referenced this pull request Nov 10, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@exercism-i18n

exercism-i18n Bot commented Nov 10, 2026

Copy link
Copy Markdown

This PR has been translated 🚀

@rabestro
rabestro merged commit 3a1706d into main Nov 10, 2026
14 of 15 checks passed
@rabestro
rabestro deleted the pangram-generated-tests branch November 10, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ready-to-translate The English in this PR is final; queue its translations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants