Skip to content

declare compliance with x-common, where applicable #282

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

Merged
merged 27 commits into from
May 8, 2017
Merged

declare compliance with x-common, where applicable #282

merged 27 commits into from
May 8, 2017

Conversation

petertseng
Copy link
Member

@petertseng petertseng commented May 7, 2017

closes #281

Where our exercise already matches the x-common tests, this is now noted in the Cargo.* files.

Where there were small differences but I still deemed the exercise to be up to date, I noted this in a commit comment, so take note of those differences.

Out of scope for this PR: Actually changing any test suites. This PR is only for figuring out where we are already compliant. Changing test suites will come in other PRs for the respective exercises.

List of exercises that were declared up-to-date as a result (26):

          pascals-triangle: 1.0.0 == 1.0.0
             all-your-base: 1.0.0 == 1.0.0
                     wordy: 1.0.0 == 1.0.0
                gigasecond: 1.0.0 == 1.0.0
            scrabble-score: 1.0.0 == 1.0.0
                  dominoes: 1.0.0 == 1.0.0
       run-length-encoding: 1.0.0 == 1.0.0
                custom-set: 1.0.1 == 1.0.1
                 space-age: 1.0.0 == 1.0.0
           robot-simulator: 1.0.0 == 1.0.0
              queen-attack: 1.0.0 == 1.0.0
                   acronym: 1.0.0 == 1.0.0
                 allergies: 1.0.0 == 1.0.0
          sum-of-multiples: 1.0.0 == 1.0.0
             atbash-cipher: 1.0.0 == 1.0.0
    largest-series-product: 1.0.0 == 1.0.0
                    grains: 1.0.0 == 1.0.0
                     sieve: 1.0.0 == 1.0.0
         rotational-cipher: 1.0.0 == 1.0.0
                     react: 1.0.0 == 1.0.0
            roman-numerals: 1.0.0 == 1.0.0
                      leap: 1.0.0 == 1.0.0
               hello-world: 1.0.0 == 1.0.0
  variable-length-quantity: 1.0.0 == 1.0.0
                   bowling: 1.0.0 == 1.0.0
               alphametics: 1.0.0 == 1.0.0

List of exercises that are up-to-date with a certain x-common version, but there is nevertheless a new x-common version (1):

              bracket-push: 1.0.0 -> 1.1.0

List of exercises that were not deemed to be up-to-date to the current (or any previously-versioned) version, therefore were not touched (21):

                rectangles: 0.0.0 -> 1.0.0
                   hamming: 0.0.0 -> 1.0.0
               minesweeper: 0.0.0 -> 1.0.0
                 beer-song: 0.0.0 -> 1.0.0
                     forth: 0.0.0 -> 1.0.0
                   pangram: 0.0.0 -> 1.0.0
              phone-number: 0.0.0 -> 1.2.0
                 raindrops: 0.0.0 -> 1.0.0
           circular-buffer: 0.0.0 -> 1.0.0
                  triangle: 0.0.0 -> 1.0.0
                      luhn: 0.0.0 -> 1.0.0
                   anagram: 0.0.0 -> 1.0.1
               ocr-numbers: 0.0.0 -> 1.0.0
                tournament: 0.0.0 -> 1.3.0
                word-count: 0.0.0 -> 1.0.0
          nucleotide-count: 0.0.0 -> 1.0.0
     difference-of-squares: 0.0.0 -> 1.0.0
         rna-transcription: 0.0.0 -> 1.0.0
                       bob: 0.0.0 -> 1.0.0
                       etl: 0.0.0 -> 1.0.0
                   sublist: 0.0.0 -> 1.0.0

List of exercises that don't have a JSON file, so also were not touched (6).

                luhn-trait: 0.0.0 -> still no JSON file
                 luhn-from: 0.0.0 -> still no JSON file
 parallel-letter-frequency: 0.0.0 -> still no JSON file
              grade-school: 0.0.0 -> still no JSON file
       protein-translation: 0.1.0 -> still no JSON file
                robot-name: 0.0.0 -> still no JSON file

@petertseng
Copy link
Member Author

petertseng commented May 7, 2017

List of exercises that do not have Cargo.lock in repository (so if I changed their Cargo.toml, it is expected that there is no corresponding Cargo.lock change):

for i in */; do
  if [ ! -f $i/Cargo.lock ]; then
    echo $i
  fi
done

bowling/
grains/
largest-series-product/
luhn-from/
luhn-trait/
luhn/
pascals-triangle/
sum-of-multiples/
triangle/

@petertseng
Copy link
Member Author

Make commit:

VERSION=1.0.0; sed -i -e "s/version.*/version = \"$VERSION\"/" Cargo.*; git commit -a -m "$(basename $(pwd)): declare compliance with $VERSION"

@petertseng
Copy link
Member Author

petertseng added 25 commits May 7, 2017 22:11
We only test the last row of the 4 case, but that was intentional, it
seems.

We do not test the negative (since we use a u32 as input) nor nil
(since we use a u32 as input).
Note that we are not yet in compliance with 1.1.0
We do not test negatives since we use unsigned integers as inputs.
Some values are different, but all cases are still being tested.
We don't test the negative case because we use u32 as input.
Rust has a few track-specific tests in addition.
Although our descriptions aren't quite as good.
Our values are different and our descriptions don't explain everything,
but the same cases are being covered.
We have an extra test of overflowing u32, and also a (rather useless)
test that `decode . encode` is identity.
petertseng added 2 commits May 7, 2017 22:12
Our tests are in slightly different orders, but they are all there.
Only exception is the negative roll since we want to allow the student
to use unsigned integer to avoid it.
Copy link
Contributor

@ijanos ijanos left a comment

Choose a reason for hiding this comment

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

Great, thanks!

A side question: do we want a tool in the repository that will show us the outdated test cases?

@petertseng petertseng merged commit c791c94 into exercism:master May 8, 2017
@petertseng petertseng deleted the ver branch May 8, 2017 07:28
@petertseng
Copy link
Member Author

A side question: do we want a tool in the repository that will show us the outdated test cases?

That would be good. We can see if exercism/discussions#133 has something useful for us, or write an equivalent.

@petertseng
Copy link
Member Author

up to date:

                    rectangles: 1.0.0 = 1.0.0
                  bracket-push: 1.1.0 = 1.1.0
                 binary-search: 1.0.0 = 1.0.0
            collatz-conjecture: 1.1.1 = 1.1.1
               perfect-numbers: 1.0.1 = 1.0.1
                         wordy: 1.0.0 = 1.0.0
                    gigasecond: 1.0.0 = 1.0.0
                   minesweeper: 1.0.0 = 1.0.0
                scrabble-score: 1.0.0 = 1.0.0
                  phone-number: 1.2.0 = 1.2.0
                     raindrops: 1.0.0 = 1.0.0
           run-length-encoding: 1.0.0 = 1.0.0
                     space-age: 1.0.0 = 1.0.0
                           say: 1.0.0 = 1.0.0
                 prime-factors: 1.0.0 = 1.0.0
                     allergies: 1.0.0 = 1.0.0
                 atbash-cipher: 1.0.0 = 1.0.0
        largest-series-product: 1.0.0 = 1.0.0
                 isbn-verifier: 1.1.0 = 1.1.0
                       isogram: 1.2.0 = 1.2.0
                        grains: 1.0.0 = 1.0.0
                    tournament: 1.3.0 = 1.3.0
                         poker: 1.0.0 = 1.0.0
                         sieve: 1.0.0 = 1.0.0
         difference-of-squares: 1.1.0 = 1.1.0
                           bob: 1.0.0 = 1.0.0
                         react: 1.0.0 = 1.0.0
                roman-numerals: 1.0.0 = 1.0.0
                   hello-world: 1.0.0 = 1.0.0
      variable-length-quantity: 1.0.0 = 1.0.0
                           etl: 1.0.0 = 1.0.0
                   alphametics: 1.0.0 = 1.0.0

we never checked whether we are in sync with a problem-specifications file:

                       hamming: 0.0.0 < 2.0.1
                     beer-song: 0.0.0 < 1.0.0
                         forth: 0.0.0 < 1.2.0
                       pangram: 0.0.0 < 1.3.0
               circular-buffer: 0.0.0 < 1.0.1
                      triangle: 0.0.0 < 1.0.0
                          luhn: 0.0.0 < 1.0.0
                       anagram: 0.0.0 < 1.0.1
                   ocr-numbers: 0.0.0 < 1.0.0
                 crypto-square: 0.1.0 < 3.1.0
                    word-count: 0.0.0 < 1.0.0
              nucleotide-count: 0.0.0 < 1.2.0
                       sublist: 0.0.0 < 1.0.0

We are in sync with an out of date file:

                     pig-latin: 1.0.0 < 1.1.0
              pascals-triangle: 1.0.0 < 1.1.0
                 all-your-base: 1.0.0 < 1.1.0
                    two-bucket: 1.0.0 < 1.2.0
                      dominoes: 1.0.1 < 2.0.0
                         clock: 1.0.0 < 1.0.1
                    custom-set: 1.0.1 < 1.1.0
               robot-simulator: 1.0.0 < 2.0.0
                  queen-attack: 1.0.0 < 2.0.0
                       acronym: 1.0.0 < 1.1.0
              sum-of-multiples: 1.0.0 < 1.1.0
                     nth-prime: 1.0.0 < 2.0.0
             rotational-cipher: 1.0.0 < 1.1.0
             rna-transcription: 1.0.0 < 1.0.1
                          leap: 1.0.0 < 1.2.0
                       bowling: 1.0.0 < 1.0.1

@petertseng petertseng added the sync/tests Keep a test suite/version in sync with exercism/problem-specifications label Feb 6, 2018
@petertseng
Copy link
Member Author

Current status (note that it has been a year since I previously did that):

Up to date (25)

                         clock: 2.3.0 = 2.3.0
                       diamond: 1.1.0 = 1.1.0
         difference-of-squares: 1.2.0 = 1.2.0
                      dominoes: 2.1.0 = 2.1.0
                           etl: 1.0.0 = 1.0.0
                    gigasecond: 1.1.0 = 1.1.0
                   hello-world: 1.1.0 = 1.1.0
                   minesweeper: 1.1.0 = 1.1.0
           palindrome-products: 1.1.0 = 1.1.0
               perfect-numbers: 1.1.0 = 1.1.0
                         poker: 1.1.0 = 1.1.0
                 prime-factors: 1.1.0 = 1.1.0
           pythagorean-triplet: 1.0.0 = 1.0.0
             rail-fence-cipher: 1.1.0 = 1.1.0
                     raindrops: 1.1.0 = 1.1.0
                    rectangles: 1.1.0 = 1.1.0
           run-length-encoding: 1.1.0 = 1.1.0
                 saddle-points: 1.3.0 = 1.3.0
                scrabble-score: 1.1.0 = 1.1.0
                         sieve: 1.1.0 = 1.1.0
                     space-age: 1.1.0 = 1.1.0
                 spiral-matrix: 1.1.0 = 1.1.0
                    tournament: 1.4.0 = 1.4.0
                         wordy: 1.4.0 = 1.4.0

A version of 0.x.y means that we never assessed whether we were up to date with any particular version. Assume out-of-date (19):

                       anagram: 0.0.0 < 1.4.0                                                            
                     beer-song: 0.0.0 < 2.1.0
               circular-buffer: 0.0.0 < 1.1.0
                 crypto-square: 0.1.0 < 3.2.0
                diffie-hellman: 0.1.0 < 1.0.0
                         forth: 0.0.0 < 1.7.0
                  grade-school: 0.0.0 < 1.0.0
                       hamming: 0.0.0 < 2.1.1
                          luhn: 0.0.0 < 1.3.0
              nucleotide-count: 0.0.0 < 1.3.0
                   ocr-numbers: 0.0.0 < 1.2.0
                       pangram: 0.0.0 < 1.4.1
           protein-translation: 0.1.0 < 1.1.1
                       proverb: 0.0.0 < 1.1.0
                        series: 0.1.0 < 1.0.0
                 simple-cipher: 0.0.0 < 1.2.0
                       sublist: 0.0.0 < 1.1.0
                      triangle: 0.0.0 < 1.2.0
                    word-count: 0.0.0 < 1.2.0

We were up-to-date at a point in time, but there have been updates since (32):

                       acronym: 1.0.0 < 1.6.0
                     allergies: 1.1.0 < 1.2.0
                 all-your-base: 1.0.0 < 2.3.0
                   alphametics: 1.0.0 < 1.3.0
                 atbash-cipher: 1.1.0 < 1.2.0
                 binary-search: 1.1.0 < 1.2.0
                           bob: 1.2.0 < 1.4.0
                    book-store: 1.3.0 < 1.4.0
                       bowling: 1.0.0 < 1.2.0
                  bracket-push: 1.2.0 < 1.5.0
            collatz-conjecture: 1.2.0 < 1.2.1
                    custom-set: 1.0.1 < 1.3.0
                        grains: 1.1.0 < 1.2.0
                          grep: 1.1.0 < 1.2.0
                 isbn-verifier: 1.1.0 < 2.7.0
                       isogram: 1.3.0 < 1.7.0
        largest-series-product: 1.1.0 < 1.2.0
                          leap: 1.0.0 < 1.4.0
                     nth-prime: 1.0.0 < 2.1.0
              pascals-triangle: 1.3.0 < 1.5.0
                  phone-number: 1.2.0 < 1.6.1
                     pig-latin: 1.0.0 < 1.2.0
                         react: 1.1.0 < 2.0.0
                reverse-string: 1.0.0 < 1.1.0
             rna-transcription: 1.0.0 < 1.3.0
                roman-numerals: 1.0.0 < 1.2.0
             rotational-cipher: 1.0.0 < 1.2.0
                           say: 1.1.0 < 1.2.0
               scale-generator: 1.0.0 < 2.0.0
              sum-of-multiples: 1.0.0 < 1.5.0
                    two-bucket: 1.0.0 < 1.4.0
      variable-length-quantity: 1.1.0 < 1.2.0

@petertseng
Copy link
Member Author

A version of 0.x.y means that we never assessed whether we were up to date with any particular version. Assume out-of-date (19):

Oh actually it's possible to make a distinction here, since in the original issue I listed the exercises where I made the explicit judgment that we do not match canonical-data.json sufficiently to put a version on. Can subtract that from the current 0.x.y list to get a list where in fact no judgments have been made. I'm not even sure if it's worth making those NAKs clear in the version file. We run into these situations only when the Rust track adds a new exercise or problem-specifications adds a new canonical-data.json file

                 crypto-square: 0.1.0 < 3.2.0
                diffie-hellman: 0.1.0 < 1.0.0
                  grade-school: 0.0.0 < 1.0.0
           protein-translation: 0.1.0 < 1.1.1
                       proverb: 0.0.0 < 1.1.0
                        series: 0.1.0 < 1.0.0
                 simple-cipher: 0.0.0 < 1.2.0

@petertseng
Copy link
Member Author

Of those seven exercises above, proverb is up-to-date, everything else I don't think is similar enough to mark as up-to-date.

My general attitude toward versions: It's not currently in my abilities to personally pursue the project to make the entire track up to date. There are a few exercises that I do from time to time, but I can't be relied on to do this for all exercises.

I'm also not particularly interested in filing individual issues for each exercise since (selfish) it takes up too much space in my https://github.com/issues and (not as selfish) takes up space in https://github.com/exercism/rust/issues. For these issues, I would not like that since it's unknown (but guessed by me to be multiple weeks to multiple months) when such issues would actually get closed. And in general, I think it lines up the incentives better if the person filing the issue has at least a bit more desire to see it closed.

A person who wishes to pursue the project might consider making just a single issue with a checklist as a possible alternative to individual issues for each exercise.

@petertseng
Copy link
Member Author

figured I'd take stock of things after a recent spate of updates.

up-to-date: 46

               alphametics: 1.3.0 = 1.3.0
         armstrong-numbers: 1.0.0 = 1.0.0
             binary-search: 1.3.0 = 1.3.0
                   bowling: 1.2.0 = 1.2.0
              bracket-push: 1.5.0 = 1.5.0
           circular-buffer: 1.1.0 = 1.1.0
                     clock: 2.4.0 = 2.4.0
        collatz-conjecture: 1.2.1 = 1.2.1
                   diamond: 1.1.0 = 1.1.0
     difference-of-squares: 1.2.0 = 1.2.0
                  dominoes: 2.1.0 = 2.1.0
                       etl: 1.0.0 = 1.0.0
                gigasecond: 1.1.0 = 1.1.0
                    grains: 1.2.0 = 1.2.0
                      grep: 1.2.0 = 1.2.0
               hello-world: 1.1.0 = 1.1.0
             isbn-verifier: 2.7.0 = 2.7.0
    largest-series-product: 1.2.0 = 1.2.0
                      luhn: 1.3.0 = 1.3.0
               minesweeper: 1.1.0 = 1.1.0
                 nth-prime: 2.1.0 = 2.1.0
       palindrome-products: 1.1.0 = 1.1.0
          pascals-triangle: 1.5.0 = 1.5.0
           perfect-numbers: 1.1.0 = 1.1.0
                     poker: 1.1.0 = 1.1.0
             prime-factors: 1.1.0 = 1.1.0
                   proverb: 1.1.0 = 1.1.0
       pythagorean-triplet: 1.0.0 = 1.0.0
              queen-attack: 2.2.0 = 2.2.0
         rail-fence-cipher: 1.1.0 = 1.1.0
                 raindrops: 1.1.0 = 1.1.0
                     react: 2.0.0 = 2.0.0
                rectangles: 1.1.0 = 1.1.0
       run-length-encoding: 1.1.0 = 1.1.0
             saddle-points: 1.3.0 = 1.3.0
                       say: 1.2.0 = 1.2.0
           scale-generator: 2.0.0 = 2.0.0
            scrabble-score: 1.1.0 = 1.1.0
                     sieve: 1.1.0 = 1.1.0
                 space-age: 1.1.0 = 1.1.0
             spiral-matrix: 1.1.0 = 1.1.0
          sum-of-multiples: 1.5.0 = 1.5.0
                tournament: 1.4.0 = 1.4.0
                two-bucket: 1.4.0 = 1.4.0
  variable-length-quantity: 1.2.0 = 1.2.0
                     wordy: 1.4.0 = 1.4.0

never up-to-date: 15

                   anagram: 0.0.0 < 1.4.0
                 beer-song: 0.0.0 < 2.1.0
             crypto-square: 0.1.0 < 3.2.0
            diffie-hellman: 0.1.0 < 1.0.0
              grade-school: 0.0.0 < 1.0.0
                   hamming: 0.0.0 < 2.1.1
          nucleotide-count: 0.0.0 < 1.3.0
               ocr-numbers: 0.0.0 < 1.2.0
                   pangram: 0.0.0 < 1.4.1
       protein-translation: 0.1.0 < 1.1.1
                    series: 0.1.0 < 1.0.0
             simple-cipher: 0.0.0 < 1.2.0
                   sublist: 0.0.0 < 1.1.0
                  triangle: 0.0.0 < 1.2.0
                word-count: 0.0.0 < 1.2.0

behind: 16

                   acronym: 1.0.0 < 1.6.0
                 allergies: 1.1.0 < 1.2.0
             all-your-base: 1.0.0 < 2.3.0
             atbash-cipher: 1.1.0 < 1.2.0
                       bob: 1.2.0 < 1.4.0
                book-store: 1.3.0 < 1.4.0
                custom-set: 1.0.1 < 1.3.0
                     forth: 1.5.0 < 1.7.0
                   isogram: 1.3.0 < 1.7.0
                      leap: 1.0.0 < 1.4.0
              phone-number: 1.2.0 < 1.6.1
                 pig-latin: 1.0.0 < 1.2.0
            reverse-string: 1.0.0 < 1.1.0
         rna-transcription: 1.0.0 < 1.3.0
            roman-numerals: 1.0.0 < 1.2.0
         rotational-cipher: 1.0.0 < 1.2.0

Well that's cool. Also leap and forth are in progress.

I got most of the ones I wanted to get out of the way, so I'll probably sit back and let things get out of date for a few months again now, great huh

@petertseng
Copy link
Member Author

up-to-date: 43

               alphametics: 1.3.0 = 1.3.0
             binary-search: 1.3.0 = 1.3.0
                       bob: 1.4.0 = 1.4.0
                   bowling: 1.2.0 = 1.2.0
           circular-buffer: 1.1.0 = 1.1.0
                     clock: 2.4.0 = 2.4.0
        collatz-conjecture: 1.2.1 = 1.2.1
                   diamond: 1.1.0 = 1.1.0
     difference-of-squares: 1.2.0 = 1.2.0
                  dominoes: 2.1.0 = 2.1.0
                       etl: 1.0.0 = 1.0.0
                     forth: 1.7.0 = 1.7.0
                    grains: 1.2.0 = 1.2.0
                      grep: 1.2.0 = 1.2.0
               hello-world: 1.1.0 = 1.1.0
             isbn-verifier: 2.7.0 = 2.7.0
    largest-series-product: 1.2.0 = 1.2.0
         matching-brackets: 2.0.0 = 2.0.0
               minesweeper: 1.1.0 = 1.1.0
                 nth-prime: 2.1.0 = 2.1.0
          nucleotide-count: 1.3.0 = 1.3.0
          pascals-triangle: 1.5.0 = 1.5.0
           perfect-numbers: 1.1.0 = 1.1.0
                     poker: 1.1.0 = 1.1.0
             prime-factors: 1.1.0 = 1.1.0
                   proverb: 1.1.0 = 1.1.0
       pythagorean-triplet: 1.0.0 = 1.0.0
         rail-fence-cipher: 1.1.0 = 1.1.0
                 raindrops: 1.1.0 = 1.1.0
                     react: 2.0.0 = 2.0.0
                rectangles: 1.1.0 = 1.1.0
            reverse-string: 1.1.0 = 1.1.0
       run-length-encoding: 1.1.0 = 1.1.0
                       say: 1.2.0 = 1.2.0
           scale-generator: 2.0.0 = 2.0.0
            scrabble-score: 1.1.0 = 1.1.0
                     sieve: 1.1.0 = 1.1.0
             spiral-matrix: 1.1.0 = 1.1.0
          sum-of-multiples: 1.5.0 = 1.5.0
                tournament: 1.4.0 = 1.4.0
                two-bucket: 1.4.0 = 1.4.0
  variable-length-quantity: 1.2.0 = 1.2.0
                     wordy: 1.5.0 = 1.5.0

never up-to-date: 12

                   anagram: 0.0.0 < 1.4.0
                 beer-song: 0.0.0 < 2.1.0
             crypto-square: 0.1.0 < 3.2.0
            diffie-hellman: 0.1.0 < 1.0.0
              grade-school: 0.0.0 < 1.0.0
               ocr-numbers: 0.0.0 < 1.2.0
                   pangram: 0.0.0 < 1.4.1
       protein-translation: 0.1.0 < 1.1.1
                    series: 0.1.0 < 1.0.0
             simple-cipher: 0.0.0 < 2.0.0
                   sublist: 0.0.0 < 1.1.0
                  triangle: 0.0.0 < 1.2.1

behind: 23

                   acronym: 1.0.0 < 1.7.0
                 allergies: 1.1.0 < 2.0.0
             all-your-base: 1.0.0 < 2.3.0
         armstrong-numbers: 1.0.0 < 1.1.0
             atbash-cipher: 1.1.0 < 1.2.0
                book-store: 1.3.0 < 1.4.0
                custom-set: 1.0.1 < 1.3.0
                gigasecond: 1.1.0 < 2.0.0
                   hamming: 2.2.0 < 2.3.0
                   isogram: 1.3.0 < 1.7.0
                      leap: 1.4.0 < 1.5.1
                      luhn: 1.3.0 < 1.5.0
       palindrome-products: 1.1.0 < 1.2.0
              phone-number: 1.6.1 < 1.7.0
                 pig-latin: 1.0.0 < 1.2.0
              queen-attack: 2.2.0 < 2.3.0
         rna-transcription: 1.0.0 < 1.3.0
           robot-simulator: 2.2.0 < 3.1.0
            roman-numerals: 1.0.0 < 1.2.0
         rotational-cipher: 1.0.0 < 1.2.0
             saddle-points: 1.3.0 < 1.5.0
                 space-age: 1.1.0 < 1.2.0
                word-count: 1.2.0 < 1.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sync/tests Keep a test suite/version in sync with exercism/problem-specifications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

track x-common version somewhere in xrust
2 participants