Skip to content
This repository has been archived by the owner on Dec 4, 2022. It is now read-only.

Bringing your track in line with the latest changes to Problem Specifications #39

Merged
merged 1 commit into from
Jun 30, 2021

Conversation

ErikSchierboom
Copy link
Member

We're in the process of re-opening the Problem Specifications repo, as discussed in this issue.
This PR adds .meta/tests.toml files for all exercises for which canonical data is defined in the Problem Specifications repo.
We'll now discuss why we're making this change.

Keeping track of implemented tests

While most of the changes to the Problem Specifications repo are specific to that repo, there is one track-specific change:

If a track implements an exercise for which test data exists, the exercise must contain a .meta/tests.toml file.
The goal of the tests.toml 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.
A tests.toml file for a track's two-fer exercise looks like this:

[canonical-tests]
# no name given
"19709124-b82e-4e86-a722-9e5c5ebf3952" = true
# a name given
"3451eebd-123f-4256-b667-7b109affce32" = true
# another name given
"653611c6-be9f-4935-ab42-978e25fe9a10" = false

In this case, the track has chosen to implement two of the three available tests.
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.

Tooling

To make it easy to keep the tests.toml up to date, tracks can use the canonical_data_syncer application.
This application is a small, standalone binary that will compare the tests specified in the tests.toml files against the tests that are defined in the exercise's canonical data.
It then interactively gives the maintainer the option to include or exclude test cases that are currently missing, updating the tests.toml file accordingly.
To use the canonical data syncer tool, tracks should copying the fetch-canonical_data_syncer and/or fetch-canonical_data_syncer.ps1 scripts into their repository.
Then, running either of these scripts will download the latest version of the tool to the track's bin directory.
The tool can be run using ./bin/canonical_data_syncer or .\bin\canonical_data_syncer.exe, depending on your operating system.

Changes

In this PR, we're adding meta/tests.toml files for all the exercises for which canonical data is defined.
We've initially marked all tests as included, which means that we'll assume that your track has implemented those tests.
If there isn't anything obviously wrong with the PR, I would suggest to merge this PR first, and then later on update the meta/tests.toml files according to your track's actual implementation.

@marnen marnen self-requested a review October 21, 2020 16:52
marnen
marnen previously approved these changes Oct 21, 2020
@marnen marnen dismissed their stale review October 21, 2020 16:54

I approved only as a test to check the workflow.

Base automatically changed from master to main January 28, 2021 19:23
@marnen
Copy link
Contributor

marnen commented Feb 23, 2021

I gather that the data syncer has been replaced by configlet sync. Let me see what I can do here.

marnen added a commit that referenced this pull request Feb 23, 2021
@marnen
Copy link
Contributor

marnen commented Feb 23, 2021

@ErikSchierboom How does configlet sync tell which test cases I've implemented? When I run it on this repo, it claims that all the test cases are missing, even though that's not the case.

ErikSchierboom pushed a commit that referenced this pull request Feb 24, 2021
@ErikSchierboom ErikSchierboom force-pushed the pre-populate-data-for-exercises branch from f257076 to b3feebf Compare February 24, 2021 08:00
@ErikSchierboom
Copy link
Member Author

@marnen It looks for the .meta/tests.toml file. The problem was that this is a very old PR, and in a subsequent PR (https://github.com/exercism/gnu-apl/pull/56/files) the practice exercises we're moved to the right location. I've just manually rebased.

@marnen
Copy link
Contributor

marnen commented Feb 24, 2021

Thanks, although I’m trying to keep rebases out of this repository.

@ErikSchierboom
Copy link
Member Author

Thanks, although I’m trying to keep rebases out of this repository.

Well, I've only rebased the PRs commits, so technically you still can keep rebases out of this repository.

@ErikSchierboom ErikSchierboom force-pushed the pre-populate-data-for-exercises branch from b3feebf to c587df0 Compare June 30, 2021 14:14
@iHiD iHiD merged commit df6fc02 into main Jun 30, 2021
@iHiD iHiD deleted the pre-populate-data-for-exercises branch June 30, 2021 14:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants