Skip to content
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

Generate exercise READMEs from templates #169

Merged
merged 2 commits into from
Jul 10, 2017
Merged

Generate exercise READMEs from templates #169

merged 2 commits into from
Jul 10, 2017

Conversation

kytrinyx
Copy link
Member

@kytrinyx kytrinyx commented Jul 10, 2017

We are working towards making exercises stand-alone.
That is to say: no more generating READMEs on the fly.

This will give maintainers more control over each individual exercise
README, and it will also make some of the backend logic for delivering
exercises simpler.

This does not mean, however, hand-crafting READMEs from scratch.

I wrote some tooling to make it possible to generate the READMEs from
a customizable template.

The template uses the Go text/template package, and the default template
will generate the same READMEs as we have been generating on the fly.

See the documentation in regenerating exercise readmes for
details.

The READMEs can be generated at any time using a new 'generate' command in configlet. This command has not yet landed in master or been released, but can be built from source in the generate-readmes branch on configlet.

Tracking progress of all tracks in: exercism/meta#15

Katrina Owen added 2 commits July 10, 2017 07:28
We are working towards making exercises stand-alone—that is to say:
no more generating READMEs on the fly.

This will give maintainers more control over each individual exercise
README.

The template uses the Go text/template package, and the default templates
generate the exact same READMEs as we have been generating on the fly.
@NobbZ
Copy link
Member

NobbZ commented Jul 10, 2017

Why did you choose go-template over something that were actually usable? Of all template languages I had to use so far, go-template was worst by far…

@NobbZ NobbZ merged commit bbb9280 into master Jul 10, 2017
@kytrinyx kytrinyx deleted the generate-readme branch July 10, 2017 18:21
@kytrinyx
Copy link
Member Author

  1. It's a tool I'm familiar with
  2. It's simple and fast
  3. And frankly, it's a template language for a (very simple) text document, not an algorithm for the minimum spanning tree problem. We're only ever going to need a tiny percentage of the behavior of Go's text/template package.

If you have some constructive feedback, I'd be happy to hear it. You may also want to review the code of conduct since I consider your comment somewhat insulting. I understand people have preferences in the technologies they want to work with. Let's just try and keep everything positive 👍

@kytrinyx
Copy link
Member Author

kytrinyx commented Jul 10, 2017

Please hold off on merging this. In exercism/configlet#24 we're talking about having a default template in the repository that we can use instead of duplicating the template everywhere. That way only the exercises that want to change the default would actually have a template.

@NobbZ
Copy link
Member

NobbZ commented Jul 11, 2017

Yeah, I think you are right. My tone might have been a bit rude, I'm sorry about this. And I am sorry, I do not have any alternative that works with go.

Perhaps I overreacted, after I had to fiddle multiple days to get something working in go templates which took me only minutes with ERB and EEX.


For holding off the merge, it seems to be a little late. I'd prefer to keep it as is and deleting templates selectively after the new feature is ready. I do not think that reverting the merge would give us any benefits.

@kytrinyx
Copy link
Member Author

kytrinyx commented Jul 11, 2017

For holding off the merge, it seems to be a little late.

Ah, yes! I do see that now :)

I'd prefer to keep it as is and deleting templates selectively after the new feature is ready. I do not think that reverting the merge would give us any benefits.

That's totally fine. I'll submit a PR which adds the default template and deletes any templates that are identical to it, and we can go from there.

Thank you, @NobbZ!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants