Autogenerate README based on description.md#721
Conversation
| @@ -1,5 +1,3 @@ | |||
| # Acronym | |||
There was a problem hiding this comment.
Why have all the titles disappeared?
There was a problem hiding this comment.
The titles disappeared because the original problem-specfications/description.md don't have it in them.
Accumulate README from problem-specfications:
https://github.com/exercism/problem-specifications/blob/master/exercises/accumulate/description.md
Ruby's Accumulate README:
https://github.com/exercism/ruby/blob/master/exercises/accumulate/README.md
I was thinking about adding the titles into the description.md of problem-specifications for every problem so that when generator gets run the titles don't disappear.
There was a problem hiding this comment.
Please have a read through this thread an the associated issues/PRs:
exercism/problem-specifications#767
There was a problem hiding this comment.
And: https://github.com/Insti/trackler/blob/master/lib/trackler/implementation.rb#L87
For the code that used to (/still does) generate the readmes.
There was a problem hiding this comment.
Things are a bit more complicated than normal right now as we're trying to make sure that the exercises are compatible with both the existing exercism.io site and the new https://v2.exercism.io/ (nextercism) site that have slightly different requirements.
It is nextercism that requires that the track have local README.md files.
|
A tool to generate the readmes is good 👍 There was some talk of having configlet generate READMEs, I'm not sure how far that idea progressed. You might like to search the discussions in /meta /configlet /discussions |
|
I'd like to see better separation of commits here to make this easier to review. |
| require 'generator' | ||
|
|
||
| paths = Generator::Paths.new(track: EXERCISM_RUBY_ROOT, metadata: METADATA_REPOSITORY_PATH) | ||
| paths = Generator::Paths.new(track: EXERCISM_RUBY_ROOT, docs: EXERCISM_RUBY_DOCS, metadata: METADATA_REPOSITORY_PATH) |
There was a problem hiding this comment.
docs: is not an appropriate argument here, the docs path should be derived from the track: EXERCISM_RUBY_ROOT
| @@ -1,4 +1,4 @@ | |||
| # All Your Base | |||
| # All_your_base | |||
There was a problem hiding this comment.
The underscores should not be here.
| @@ -0,0 +1,44 @@ | |||
| # Change | |||
There was a problem hiding this comment.
Why is this showing as completely new?
|
Okay, turns out that Configlet actually does the same thing that I was trying to do but it expects the user to run it manually. IE, READMEs are properly generated using: ./configlet generate . --only=sublist I think a better approach is to add this command to run "confliget generate" command with Travis CI and automatically have READMEs pushed back to repository? Places to change: https://github.com/exercism/ruby/blob/master/.travis.yml Thoughts? |
This is premature I think. How about making the ruby track generate script call out to configlet to regenerate the readme? |
Yeah, that seems more reasonable |
|
If possible do this as 2 pull requests. This will make things easier to review/test/merge. |
|
On a philosophical level, I personally don't think having configlet generate the readmes is the right thing to do, but that's how things seem to be, so we'll go with that for now. |
|
Calling configlet during generate: #722 |
Why?
According to the docs, README are auto-generated but that is not the case: https://github.com/exercism/ruby#readmes
Manually copy-pasting README from problem-specifications can lead to errors. This creates consistency across all READMEs.
What?
README is generated by combining:
How Has This Been Tested?
rake test
./bin/generate
Types of changes
Checklist: