exercism / configlet

The official tool for managing Exercism language track repositories.
https://exercism.org/docs/building/configlet
GNU Affero General Public License v3.0
21 stars 14 forks source link

Add commands for analyzing practice exercises and their prerequisites #180

Open angelikatyborska opened 3 years ago

angelikatyborska commented 3 years ago

To be able to add and change prerequisites and practices to practice exercises efficiently, it would be very helpful to have tools that do the following tasks:

ee7 commented 3 years ago

Sounds good. Any thoughts on the syntax? Some candidates:

  1. configlet info --concepts and configlet info --concept recursion
  2. configlet concepts and configlet concept recursion
  3. configlet practice

There's some other "tell me some things about the track" features that I'd like to have eventually. So I think I prefer the first candidate: add flags to info, rather than adding new commands.

We could also eventually implement features similar to the tree command that existed in the configlet for Exercism v2.

I've created #181, which starts by trying to implement your first bullet point:

print all concepts that aren't required by any exercise, aren't practiced by any exercise, and maybe the difference between those two lists (concepts that are required, but aren't practiced)

with output for the Elixir track's current state.

Another possible feature: list the unimplemented practice exercises on a track.

angelikatyborska commented 3 years ago

There's some other "tell me some things about the track" features that I'd like to have eventually. So I think I prefer the first candidate: add flags to info, rather than adding new commands.

Sounds good to me!

ErikSchierboom commented 3 years ago

This would be very useful information indeed.

It might be good at this point to consider what information we would want to display. Here is a quick list of the top of my head, and including the suggestions by Angelika:

Concepts

Exercises

Track

These are just some things we might want to display off the top of my head.

BethanyG commented 3 years ago

I'd add an --info or --status (??) flag to these, so that I could tell which are live| beta | wip | deprecated:

Exercises

  • Print all exercises
  • Print all concept exercises
  • Print tree of exercises
  • Print tree of single exercise (as in: how can it be unlocked, which exercises does one need to complete)

And here, I'd want to know this info by --status as well.

Track

  • Print total, number of exercises, number of concept exercises and number of practice exercises
  • Print number of concepts

This is also .. not quite clear in my head yet. But we have interlocking concepts for things, so some of our concepts (after their exercises are completed), effectively "travel together" -- like lists and list-methods or classes and class-inheritance. Not sure if there is a way we could indicate or model that. Like the concept exercise tree..but just for concepts, as opposed to exercises.

ee7 commented 2 years ago

The latest configlet release (4.0.0-alpha.32) now has the configlet info command. See the commit message of https://github.com/exercism/configlet/commit/626506f2155642387a90e760988f043a8d2ba500.

Very basic for now - sorry that it took so long. Hopefully it's still useful.

For the Elixir track, the output at the time of writing is:

$ configlet info -t /path/to/elixir/track
Concepts that aren't a prerequisite for any Practice Exercise:
access-behaviour
alias
docs
import
io
links
try-rescue
try-rescue-else-after
typespecs

Concepts that aren't practiced by any Practice Exercise:
access-behaviour
alias
docs
dynamic-dispatch
import
io
links
streams
try-rescue
try-rescue-else-after
typespecs

Concepts that are a prerequisite, but aren't practiced by any Practice Exercise:
dynamic-dispatch
streams

There are 11 exercises from `exercism/problem-specifications` that are neither implemented nor in the track config `exercises.foregone` array:
counter
error-handling
hangman
ledger
lens-person
nucleotide-codons
octal
paasio
point-mutations
tree-building
trinary

Track summary:
 35 Concept Exercises (plus 1 work-in-progress)
116 Practice Exercises (plus 0 work-in-progress)
151 Exercises in total (plus 1 work-in-progress)
 54 Concepts
angelikatyborska commented 2 years ago

Amazing that this is now available, thank you 🎉 and thank you for giving an Elixir example. It made it very easy for me personally to parse 😁.

I have one comment about the list of unimplemented exercises. It would be great if it would mark exercises that are already deprecated (e.g. counter) or are missing canonical data (almost all of them from this list). Elixir already implemented or rejected every practice exercise except for those missing canonical data.

There are 11 exercises from `exercism/problem-specifications` that are neither implemented nor in the > track config `exercises.foregone` array:
counter
error-handling
hangman
ledger
lens-person
nucleotide-codons
octal
paasio
point-mutations
tree-building
trinary
ee7 commented 2 years ago

exercises that are already deprecated (e.g. counter) or are missing canonical data

@angelikatyborska Good idea - I also wanted those exercises to be indicated, or simply excluded. With 4.0.0-alpha.35, deprecated exercises are now omitted from the list of unimplemented exercises. That is, the configlet info output for the Elixir track currently contains:

There are 6 non-deprecated exercises in `exercism/problem-specifications` that
are both unimplemented and not in the track config `exercises.foregone` array:
error-handling
hangman
ledger
lens-person
paasio
tree-building

It'll indicate exercises without canonical data later. Tracking in #481, and discussed a little in #473.

ee7 commented 2 years ago

@angelikatyborska Implemented in 6b6e2c2c9605.

With the upcoming configlet 4.0.0-beta.2 (and the current state of problem-specifications and the Elixir track) the output is like:

$ configlet info
[...]

There are 6 non-deprecated exercises in `exercism/problem-specifications` that
are both unimplemented and not in the track config `exercises.foregone` array:

Without canonical data:
error-handling
hangman
ledger
lens-person
paasio
tree-building

[...]