-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Add configuration defaults for nextercism #576
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Planning to squash those commits.
Thinking about whether to move the deprecated into their original position from before they were deprecated, but I think I decided probably not, too hard to tell them apart if they stay in their original position?
I think it probably doesn't matter about where the deprecated ones are in the list. I've been debating with myself which I prefer, and I can make the argument for both:
|
At exercism/discussions#159 (comment) I am discussing whether certain keys (definitely |
We will be moving to a tree-shaped track rather than a linear one, as described in the [progression & learning in Exercism](https://github.com/exercism/docs/blob/master/about/conception/progression.md) design document. In order to support this, we need to expand the metadata that exercises are configured with. Note that 'core' exercises are never unlocked by any other exercises. Core exercises appear in the track in the order that they are listed in the array. Non-core exercises depend on only one exercise (unlocked_by: ). At the moment we are assuming that this is a core exercise, but there is no reason that it needs to be. Until now we have operated with a separate deprecated array. These are now being moved into the exercises array with a deprecated field. With these defaults the track in nextercism will have no core exercises, and all the exercises will be available as 'extras' from the start.
228fa4f
to
6993de1
Compare
…generate" This reverts commit 6362c3b.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ cat cmp.rb
require 'json'
a = JSON.parse(IO.read(ARGV[0]))
b = JSON.parse(IO.read(ARGV[1]))
a['exercises'].zip(b['exercises']) { |ae, be|
expected_keys = ae.keys
expected_keys.insert(1, 'unlocked_by')
expected_keys.insert(1, 'core')
expected_keys.unshift('uuid')
raise "No. #{ae['slug']} #{ae.keys} should have become #{expected_keys} but became #{be.keys} instead" if be.keys != expected_keys
}
b['exercises'].drop(a['exercises'].size).zip(a['deprecated']) { |be, deprecated|
raise "deprecated #{deprecated} != #{be['slug']}" if be['slug'] != deprecated
}
$ ruby cmp.rb <(git show master:config.json) config.json
$
We will be moving to a tree-shaped track rather than a linear one, as described in the progression & learning in Exercism design document.
In order to support this, we need to expand the metadata that exercises are configured with.
Note that 'core' exercises are never unlocked by any other exercises. Core exercises appear in the track in the order that they are listed in the array.
Non-core exercises depend on only one exercise (unlocked_by: ). At the moment we are assuming that this is a core exercise, but there is no reason that it needs to be.
active: false is the equivalent of deprecated, which was stored in a separate array. This array is being removed in this change.
With these defaults the track in nextercism will have no core exercises, and all the exercises will be available as 'extras' from the start.
See exercism/meta#16