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

canonical-data.json: Compliance with JSON Schema #625

Closed
75 tasks done
rbasso opened this issue Mar 6, 2017 · 38 comments
Closed
75 tasks done

canonical-data.json: Compliance with JSON Schema #625

rbasso opened this issue Mar 6, 2017 · 38 comments

Comments

@rbasso
Copy link
Contributor

rbasso commented Mar 6, 2017

Now that #602 was merged, it would be great to have all the canonical-data.json files compliant with the JSON Schema, so that we could automatically check them for errors in the future.

At the moment, we have 74 canonical-data.json files, but only 3 are compliant.

When porting the files, I guess it would be nice to follow a few guidelines to make reviewing easier:

  • Distinct commits with the following:
    1. exercise-name: Make canonical-data.json compliant, containing the minimal changes to make the test suite compliant.
    2. exercise-name: Fix canonical-data.json formatting, with the changes needed to make it readable again.
  • pull-request's title: exercise-name: Make exercise schema-compliant
  • pull-request's body: at least a line containing Related to #625.
  • version should start at 1.0.0 and follow the exercise property.

Unless there is already a standard in place that I don't know, I suggest formatting with 2-spaces indentation in the second commit, for consistency, which is already the default when running jq '.' canonical-data.json.

Of course, most of the exercises will demand additional changes to a standard formatting, to make them more compact and readable.

Edit: Just to be clear, this issue is not about style in designing the test suite. Changes that go beyond fixing the test suite to be compliant and fix it to be consistently formatted after that should be avoided here!


canonical-data.json compliance

@petertseng
Copy link
Member

petertseng commented Mar 6, 2017

The final goal here is that we will be able to run every canonical-data.json through a schema check, right?

Then can I propose we do not wait until all canonical-data.json are compliant before starting to do that?

Let's start check them all ASAP, and allow those listed in a file named allowed-schema-failures (or something) to fail.

Because we wouldn't want a file that was compliant to fall out of compliance while this project is underway.

The goal of course will be to drive the number of lines in the file down to zero.

@rbasso
Copy link
Contributor Author

rbasso commented Mar 6, 2017

If anyone wants to port and exercise to the new schema, I is a good idea to say here, so that we don't make useless duplicated work.

@kotp
Copy link
Member

kotp commented Mar 6, 2017

Working on Hamming

@rbasso
Copy link
Contributor Author

rbasso commented Mar 6, 2017

Working on: hello-world, all-your-base

@catb0t
Copy link
Contributor

catb0t commented Mar 6, 2017

I'll tackle leap and word-count.

@rbasso
Copy link
Contributor Author

rbasso commented Mar 6, 2017

Working on: anagram, atbash-cipher and bob.

@rpottsoh
Copy link
Member

rpottsoh commented Mar 6, 2017

I've got book-store.

@rbasso
Copy link
Contributor Author

rbasso commented Mar 6, 2017

Working on raindrops, rna-transcription and scrabble-score.

@rbasso
Copy link
Contributor Author

rbasso commented Mar 6, 2017

Working on change, grains and luhn.

@rbasso
Copy link
Contributor Author

rbasso commented Mar 7, 2017

Working on binary and trinary, deprecated exercises.

emcoding pushed a commit that referenced this issue Nov 19, 2018
generator: slugs everywhere [closes #624]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants