From ef0db2f9eef7c602ce3138b1757f6070ed92e493 Mon Sep 17 00:00:00 2001 From: Isaac Good Date: Fri, 5 Jun 2026 19:01:54 -0700 Subject: [PATCH] Add workflow to check practice exercises are sorted; sort by difficulty then lowercase name --- .github/workflows/sorted.yml | 16 +++ config.json | 184 +++++++++++++++++------------------ 2 files changed, 108 insertions(+), 92 deletions(-) create mode 100644 .github/workflows/sorted.yml diff --git a/.github/workflows/sorted.yml b/.github/workflows/sorted.yml new file mode 100644 index 0000000..6b2af9e --- /dev/null +++ b/.github/workflows/sorted.yml @@ -0,0 +1,16 @@ +name: Exercise order + +on: + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + call-gha-workflow: + name: Check + uses: exercism/github-actions/.github/workflows/sorted.yml@main + with: + ordering: ".difficulty, .lowercase_name" diff --git a/config.json b/config.json index e053bb1..61a537b 100644 --- a/config.json +++ b/config.json @@ -62,26 +62,26 @@ ] }, { - "slug": "leap", - "name": "Leap", - "uuid": "1a95beb7-5bb2-44c4-aee7-5790bcb38865", + "slug": "accumulate", + "name": "Accumulate", + "uuid": "d530077b-1eed-44cd-9791-5f78001c7372", "practices": [], "prerequisites": [], "difficulty": 1, "topics": [ - "booleans", - "modulo" + "pattern_matching", + "recursion", + "type_variables" ] }, { - "slug": "pangram", - "name": "Pangram", - "uuid": "aaf7a72c-ada0-4e43-8cc1-78d9e60ee151", + "slug": "atbash-cipher", + "name": "Atbash Cipher", + "uuid": "d077a175-2219-439c-9bfa-3098239e4cd6", "practices": [], "prerequisites": [], "difficulty": 1, "topics": [ - "chars", "strings" ] }, @@ -96,19 +96,6 @@ "strings" ] }, - { - "slug": "accumulate", - "name": "Accumulate", - "uuid": "d530077b-1eed-44cd-9791-5f78001c7372", - "practices": [], - "prerequisites": [], - "difficulty": 1, - "topics": [ - "pattern_matching", - "recursion", - "type_variables" - ] - }, { "slug": "collatz-conjecture", "name": "Collatz Conjecture", @@ -123,74 +110,61 @@ ] }, { - "slug": "rna-transcription", - "name": "RNA Transcription", - "uuid": "b7648fa5-1aff-477c-973c-079245060d73", - "practices": [], - "prerequisites": [], - "difficulty": 1, - "topics": [ - "maybe", - "strings" - ] - }, - { - "slug": "sum-of-multiples", - "name": "Sum of Multiples", - "uuid": "a686d00c-4dd4-4208-88c9-d17b00d97b28", + "slug": "difference-of-squares", + "name": "Difference of Squares", + "uuid": "864d3c8b-fffe-4228-87f3-a56173b14eb4", "practices": [], "prerequisites": [], "difficulty": 1, "topics": [ "arithmetics", - "arrays", - "math", - "modulo" + "math" ] }, { - "slug": "atbash-cipher", - "name": "Atbash Cipher", - "uuid": "d077a175-2219-439c-9bfa-3098239e4cd6", + "slug": "hamming", + "name": "Hamming", + "uuid": "3cd10a88-9cc0-4dcd-a2f3-1f5bcb5eaf07", "practices": [], "prerequisites": [], "difficulty": 1, "topics": [ - "strings" + "iterating_over_two_lists_at_once" ] }, { - "slug": "difference-of-squares", - "name": "Difference of Squares", - "uuid": "864d3c8b-fffe-4228-87f3-a56173b14eb4", + "slug": "isogram", + "name": "Isogram", + "uuid": "9cb54162-d19c-4155-aca9-e2b26f4d4da5", "practices": [], "prerequisites": [], "difficulty": 1, "topics": [ - "arithmetics", - "math" + "maps", + "strings" ] }, { - "slug": "hamming", - "name": "Hamming", - "uuid": "3cd10a88-9cc0-4dcd-a2f3-1f5bcb5eaf07", + "slug": "leap", + "name": "Leap", + "uuid": "1a95beb7-5bb2-44c4-aee7-5790bcb38865", "practices": [], "prerequisites": [], "difficulty": 1, "topics": [ - "iterating_over_two_lists_at_once" + "booleans", + "modulo" ] }, { - "slug": "isogram", - "name": "Isogram", - "uuid": "9cb54162-d19c-4155-aca9-e2b26f4d4da5", + "slug": "pangram", + "name": "Pangram", + "uuid": "aaf7a72c-ada0-4e43-8cc1-78d9e60ee151", "practices": [], "prerequisites": [], "difficulty": 1, "topics": [ - "maps", + "chars", "strings" ] }, @@ -218,6 +192,18 @@ "modulo" ] }, + { + "slug": "rna-transcription", + "name": "RNA Transcription", + "uuid": "b7648fa5-1aff-477c-973c-079245060d73", + "practices": [], + "prerequisites": [], + "difficulty": 1, + "topics": [ + "maybe", + "strings" + ] + }, { "slug": "scrabble-score", "name": "Scrabble Score", @@ -230,6 +216,20 @@ "strings" ] }, + { + "slug": "sum-of-multiples", + "name": "Sum of Multiples", + "uuid": "a686d00c-4dd4-4208-88c9-d17b00d97b28", + "practices": [], + "prerequisites": [], + "difficulty": 1, + "topics": [ + "arithmetics", + "arrays", + "math", + "modulo" + ] + }, { "slug": "acronym", "name": "Acronym", @@ -289,28 +289,28 @@ ] }, { - "slug": "anagram", - "name": "Anagram", - "uuid": "cd68e41a-31a3-4594-a1ea-7e52e2f2468e", + "slug": "all-your-base", + "name": "All Your Base", + "uuid": "79011a26-c8b8-4fea-bdce-f8e3d37bee23", "practices": [], "prerequisites": [], "difficulty": 4, "topics": [ - "filtering", - "lists", - "strings" + "base_conversion", + "math" ] }, { - "slug": "all-your-base", - "name": "All Your Base", - "uuid": "79011a26-c8b8-4fea-bdce-f8e3d37bee23", + "slug": "anagram", + "name": "Anagram", + "uuid": "cd68e41a-31a3-4594-a1ea-7e52e2f2468e", "practices": [], "prerequisites": [], "difficulty": 4, "topics": [ - "base_conversion", - "math" + "filtering", + "lists", + "strings" ] }, { @@ -349,6 +349,26 @@ "binary_search" ] }, + { + "slug": "crypto-square", + "name": "Crypto Square", + "uuid": "e4f49f2e-87bd-4506-9184-d90bec0adde5", + "practices": [], + "prerequisites": [], + "difficulty": 5, + "topics": [ + "matrices", + "strings" + ] + }, + { + "slug": "knapsack", + "name": "Knapsack", + "uuid": "7a970ee7-7ef9-442b-92d5-4784e7c6fcd1", + "practices": [], + "prerequisites": [], + "difficulty": 5 + }, { "slug": "matching-brackets", "name": "Matching Brackets", @@ -361,16 +381,12 @@ ] }, { - "slug": "crypto-square", - "name": "Crypto Square", - "uuid": "e4f49f2e-87bd-4506-9184-d90bec0adde5", + "slug": "spiral-matrix", + "name": "Spiral Matrix", + "uuid": "2ff7b482-04c5-42cd-b589-98cd7cd462f7", "practices": [], "prerequisites": [], - "difficulty": 5, - "topics": [ - "matrices", - "strings" - ] + "difficulty": 5 }, { "slug": "word-count", @@ -395,22 +411,6 @@ "topics": [ "dates" ] - }, - { - "slug": "spiral-matrix", - "name": "Spiral Matrix", - "uuid": "2ff7b482-04c5-42cd-b589-98cd7cd462f7", - "practices": [], - "prerequisites": [], - "difficulty": 5 - }, - { - "slug": "knapsack", - "name": "Knapsack", - "uuid": "7a970ee7-7ef9-442b-92d5-4784e7c6fcd1", - "practices": [], - "prerequisites": [], - "difficulty": 5 } ] },