You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-8Lines changed: 21 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -195,7 +195,12 @@ This is an example of what a re-implementation looks like:
195
195
]
196
196
```
197
197
198
-
## Track Test Data
198
+
## Track Data
199
+
200
+
Exercism deliberately requires that every exercise has its own copy of certain files (like `.docs/instructions.md`).
201
+
There is a tool called [configlet](https://github.com/exercism/configlet), which can check that Practice Exercises on a track are in sync with the `problem-specifications` source, and can update them when updates are available.
202
+
203
+
### Track Test Data
199
204
200
205
If a track implements an exercise for which test data exists, the exercise _must_ contain a `.meta/tests.toml` file. The goal of this file is to keep track of which tests are implemented by the exercise. Tests in this file are identified by their UUID and each test has a boolean value that indicates if it is implemented by that exercise.
201
206
@@ -218,21 +223,29 @@ In this case, the track has chosen to implement two of the three available tests
218
223
219
224
If a track uses a _test generator_ to generate an exercise's test suite, it _must_ use the contents of the `tests.toml` file to determine which tests to include in the generated test suite.
220
225
221
-
### Track Test Data Tooling
226
+
### Track Data Tooling
227
+
228
+
To make it easy to keep the data in the track exercises up to date, the [`configlet` application](https://github.com/exercism/configlet) provides a `sync` command.
229
+
There are three kinds of data that can be updated from `problem-specifications`: documentation, metadata, and tests.
222
230
223
-
To make it easy to keep the `tests.toml` up to date, tracks should use the [`configlet` application](https://github.com/exercism/configlet)'s `sync` command.
224
-
A plain `configlet sync` performs no changes, and just compares the tests specified in the `tests.toml` files against the tests that are defined in the exercise's canonical data - if there are tests defined only in the latter, it prints a summary and exits with a non-zero exit code.
231
+
A plain `configlet sync` makes no changes to the track, and checks every data kind for every exercise.
232
+
For example, it compares the tests specified in the `tests.toml` files against the tests that are defined in the exercise's canonical data - if there are tests defined only in the latter, it prints a summary and exits with a non-zero exit code.
225
233
226
-
To interactively update the `tests.toml` files, use `configlet sync --update`.
227
-
For each missing test, this prompts the user to choose whether to include/exclude/skip it, and updates the corresponding `tests.toml` file accordingly.
234
+
To interactively update the `instructions.md`, `tests.toml` and metadata files, use `configlet sync --update`.
235
+
236
+
For documentation and metadata, this prompts the user whether to sync the data with the latest version in problem-specifications.
237
+
For each missing test, there is a prompt to choose whether to include/exclude/skip it.
238
+
Configlet then updates the corresponding `tests.toml` file accordingly.
228
239
229
240
To non-interactively include every missing test for an exercise `foo`, use:
230
241
231
242
```console
232
-
configlet sync --exercise foo --update --mode include
243
+
configlet sync --tests include --exercise foo --update
233
244
```
234
245
235
-
or the short form `configlet sync -e foo -u -mi`.
246
+
or the short form `configlet sync --tests include -e foo -u`.
247
+
248
+
Refer to the [documentation for configlet sync](https://exercism.org/docs/building/configlet/sync) for more details on the various command options.
236
249
237
250
The `sync` command operates on Practice Exercises that are in the track-level `config.json` file.
238
251
If you are adding an exercise that has canonical data to a track, first add that exercise to the track-level `config.json`, and then run a `configlet sync` command to create the corresponding `tests.toml` file.
0 commit comments