Skip to content

Commit

Permalink
Move test generator note (#575)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom authored Dec 6, 2024
1 parent c7a0397 commit c4f5971
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 27 deletions.
27 changes: 1 addition & 26 deletions building/configlet/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion building/tracks/new/add-initial-exercises.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions building/tracks/practice-exercises/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c4f5971

Please sign in to comment.