Skip to content

Commit 29c6bbf

Browse files
junedevee7
andauthored
Update configlet part in README (#1949)
Co-authored-by: ee7 <[email protected]>
1 parent 4f5155a commit 29c6bbf

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

README.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,12 @@ This is an example of what a re-implementation looks like:
195195
]
196196
```
197197

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
199204

200205
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.
201206

@@ -218,21 +223,29 @@ In this case, the track has chosen to implement two of the three available tests
218223

219224
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.
220225

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.
222230

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.
225233

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.
228239

229240
To non-interactively include every missing test for an exercise `foo`, use:
230241

231242
```console
232-
configlet sync --exercise foo --update --mode include
243+
configlet sync --tests include --exercise foo --update
233244
```
234245

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.
236249

237250
The `sync` command operates on Practice Exercises that are in the track-level `config.json` file.
238251
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

Comments
 (0)