Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script to validate test cases against the problem specifications. #450

Merged
merged 3 commits into from
Oct 20, 2020
Merged

Script to validate test cases against the problem specifications. #450

merged 3 commits into from
Oct 20, 2020

Conversation

glennj
Copy link
Contributor

@glennj glennj commented Oct 14, 2020

Identifies test cases from the problem spec canonical data that are unimplemented.

Sample output:

The bash repo, where the scale-generator has no toml file:

$ bin/check_test_cases -a
MISSING: ./exercises/scale-generator/.meta/tests.toml
Exercise scale-generator
  Chromatic scale with sharps = not implemented
  Chromatic scale with flats  = not implemented
  Simple major scale          = not implemented
  Major scale with sharps     = not implemented
  Major scale with flats      = not implemented
  Minor scale with sharps     = not implemented
  Minor scale with flats      = not implemented
  Dorian mode                 = not implemented
  Mixolydian mode             = not implemented
  Lydian mode                 = not implemented
  Phrygian mode               = not implemented
  Locrian mode                = not implemented
  Harmonic minor              = not implemented
  Octatonic                   = not implemented
  Hexatonic                   = not implemented
  Pentatonic                  = not implemented
  Enigmatic                   = not implemented

The Tcl repo, where problem-spec PR exercism/problem-specifications#1612 is in play:

$ bin/check_test_cases -a
Exercise list-ops
  empty list to list = not implemented

Reviewer Resources:

Track Policies

Identifies test cases from the problem spec canonical data that are unimplemented.
bin/check_test_cases Outdated Show resolved Hide resolved
@glennj
Copy link
Contributor Author

glennj commented Oct 14, 2020

I chose gron because I couldn't figure out jq to extract the uuid and description of the test cases within the arbitrarily deeply nested cases objects.

@iHiD iHiD requested a review from ErikSchierboom October 14, 2020 22:32
Copy link
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! It feels like this is probably something that we should be including in the canonical data syncer. The --check option will output the files with missing test cases, but not the actual test cases. Maybe on higher verbosity levels it should display the actual missing test cases. Could you create an issue in the https://github.com/exercism/canonical-data-syncer/issues repo?

@glennj
Copy link
Contributor Author

glennj commented Oct 16, 2020

The last commit discarded the long script, replacing it with a version that fetches the canonical-data-syncer and calls it.

Copy link
Member

@kotp kotp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@glennj
Copy link
Contributor Author

glennj commented Oct 18, 2020

While porting the square-root exercise, I tried to use the canonical_data_syncer before I had added the exercise to config.json. the data syncer could not see that square-root as an exercise.

Get the check_test_cases script to look for configlet lint errors first.

@glennj glennj merged commit 6371ed9 into exercism:master Oct 20, 2020
@glennj glennj deleted the check-test-cases branch October 20, 2020 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants