exercism / red

Exercism exercises in Red.
https://exercism.org/tracks/red
MIT License
21 stars 14 forks source link

Update generate-practice-exercise script #115

Open loziniak opened 11 months ago

loziniak commented 11 months ago

In #102 there were updates to .meta/config.json files, source and source_url fields were added. Perhaps something more?

We need to check _tools/generate-practice-exercise.red script and _templates/practice-exercise folder and update them to reflect recent changes.

loziniak commented 11 months ago

Also relevant may be #109 and #110 .

loziniak commented 11 months ago

And tests metadata could also be updated, like in #103 .

BNAndras commented 11 months ago

I noticed that the script adds canonical cases for tests that are re-implemented by another test. The script should use tests.toml and ignore tests that come with include = false. When sourced directly from the problem specifications, those are tests that have a replacement test further down in the file. We don't need to track what test replaces what though. Just ignore any test with include = false. Tests can also be manually marked as not included if we don't want to implement them for a track, but that'd be after the exercise is generated. Therefore, that's not relevant.

[919f8ef0-b767-4d1b-8516-6379d07fcb28]
description = "disallow first strand longer"
include = false

[b9228bb1-465f-4141-b40f-1f99812de5a8]
description = "disallow first strand longer"
reimplements = "919f8ef0-b767-4d1b-8516-6379d07fcb28"

In this snippet, the first test should be ignored. The second test should just be seen as a regular test to add.