From c4f5971fdd0ccff91c53571313cb59986c4aef67 Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Fri, 6 Dec 2024 14:18:12 +0100 Subject: [PATCH] Move test generator note (#575) --- building/configlet/create.md | 27 +------------------- building/tracks/new/add-initial-exercises.md | 2 +- building/tracks/practice-exercises/add.md | 5 ++++ 3 files changed, 7 insertions(+), 27 deletions(-) diff --git a/building/configlet/create.md b/building/configlet/create.md index 3ab9ff5b..3b6fd137 100644 --- a/building/configlet/create.md +++ b/building/configlet/create.md @@ -22,32 +22,7 @@ Options for create: ## Create Practice Exercise -To create a practice exercise, one has to specify its slug: - -```shell -configlet create --practice-exercise collatz-conjecture -``` - -This will create the practice exercise's required files, as specified in the [Practice Exercises docs](/docs/building/tracks/practice-exercises). -If the practice exercise is defined in the [Problem Specifications repo](https://github.com/exercism/problem-specifications/), configlet will sync the docs and metadata from there. - -Of course, this is just the first step towards creating an exercise. -You'll then have to: - -- Add tests to the tests file -- Add an example implementation -- Define the stub file's contents -- Within the exercise's `.meta/config.json` file: - - Add the GitHub username of the exercise's authors to the `authors` key -- Within the track's `config.json` file: - - Check/update the exercise's difficulty - - Add concepts to the `practices` key (only required when the track has concept exercises) - - Add concepts to the `prerequisites` key (only required when the track has concept exercises) - -```exercism/note -Some tracks have implemented an exercise/test _generator_, which is a tool that can generate the test file's contents based on the exercise's `canonical-data.json` found in the [Problem Specifications repo](https://github.com/exercism/problem-specifications/). -Make sure to read the track's documentation to see if there is a generator that you can use. -``` +The [Add Practice Exercise docs](/docs/building/tracks/practice-exercises/add) have detailed instructions on how to add a Practice Exercise. ## Create Concept Exercise diff --git a/building/tracks/new/add-initial-exercises.md b/building/tracks/new/add-initial-exercises.md index fd344c86..5b0c2488 100644 --- a/building/tracks/new/add-initial-exercises.md +++ b/building/tracks/new/add-initial-exercises.md @@ -104,7 +104,7 @@ To make this all a bit more concrete, this is what a sample selection of initial ## Implement exercises Having selected the exercises you want include in your track, the next step is to implement them. -The [Add Practice Exercise docs](/docs/building/tracks/practice-exercises/add) have detailed instructions on how to add a Practic Exercise. +The [Add Practice Exercise docs](/docs/building/tracks/practice-exercises/add) have detailed instructions on how to add a Practice Exercise. [problem-specifications-exercises]: https://github.com/exercism/problem-specifications/tree/main/exercises/ [allergies]: https://github.com/exercism/problem-specifications/tree/main/exercises/allergies diff --git a/building/tracks/practice-exercises/add.md b/building/tracks/practice-exercises/add.md index 9e4c8567..adca4003 100644 --- a/building/tracks/practice-exercises/add.md +++ b/building/tracks/practice-exercises/add.md @@ -55,6 +55,11 @@ Keep in mind, though, that you should tweak the implementation to best fit your As an example, some tracks do not use classes but only work with functions. If your track usually works with objects though, you should adapt the implementation to what best fits your track. +```exercism/note +Some tracks use a [test _generator_](/docs/building/tooling/test-generators) to automatically (re-)generate an exercise's test file(s). +Please check the track documentation to see if there is a test generator and if so, how to use it. +``` + ### Add example implementation To ensure that it is possible to write code that passes the tests, an example implementation needs to be added.