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

convert scaffold to cookiecutter #139

Open
mmerickel opened this issue Oct 14, 2016 · 14 comments
Open

convert scaffold to cookiecutter #139

mmerickel opened this issue Oct 14, 2016 · 14 comments
Assignees

Comments

@mmerickel
Copy link
Member

mmerickel commented Oct 14, 2016

We're well on our way to deprecating pcreate [1] in pyramid 1.8 and switching all of our default scaffolds over to using cookiecutter [2][3]. It's only a deprecation right now with no removal until at least pyramid 1.10.

[1] Pylons/pyramid#2384
[2] https://github.com/Pylons/pyramid-cookiecutter-starter
[3] https://github.com/audreyr/cookiecutter

@marioidival
Copy link
Contributor

Why not adopt jinja2 as default template engine instead upgrade this package? If jinja2 was choosen as default, pyramid_jinja2 is dead

@blaflamme
Copy link
Member

@marioidival why I would want a default of jinja2 and have it installed when I'm doing API or prefer mako? That's why scaffolds and cookiecutter exist, to have opinions for pyramid.

@mmerickel
Copy link
Member Author

Sorry @marioidival but I think you don't understand what this ticket is about.

@domenkozar domenkozar self-assigned this Dec 8, 2016
@domenkozar
Copy link
Member

I've written https://github.com/domenkozar/pyramid-cookiecutter-jinja2, but I'd appreciate someone proof reading before we move it to the Pylons project.

I'll make a separate PR for pyramid_jinja2 to use the cookiecutter scaffold.

@domenkozar
Copy link
Member

Should we move scaffold related docs to cookiecutter repo from pyramid_jinja2 docs? http://docs.pylonsproject.org/projects/pyramid_jinja2/en/latest/#creating-a-jinja2-pyramid-project

@mmerickel
Copy link
Member Author

mmerickel commented Dec 9, 2016

Should we move scaffold related docs to cookiecutter repo from pyramid_jinja2 docs?

I don't think so.

I was wondering also - we are going to convert the cookiecutter for the starter scaffold in pyramid over to jinja2. Is there a reason we shouldn't just rename the cookiecutter-jina2 to cookiecutter-starter and abandon the other one? I think this scaffold was made at a time when jinja2 was a second class citizen and now it is the most recommended renderer in all of our tutorials so maybe it doesn't need it's own personal one.

@domenkozar
Copy link
Member

I don't think so.

Roger, I'll keep it there then.

I was wondering also - we are going to convert the cookiecutter for the starter scaffold in pyramid over to jinja2. Is there a reason we shouldn't just rename the cookiecutter-jina2 to cookiecutter-starter and abandon the other one? I think this scaffold was made at a time when jinja2 was a second class citizen and now it is the most recommended renderer in all of our tutorials so maybe it doesn't need it's own personal one.

+1 for this, I'd say it's more mainstream than Chameleon today.

@mmerickel
Copy link
Member Author

mmerickel commented Dec 9, 2016

Cool, so we should run a diff on the current pyramid-cookiecutter-jinja2 scaffold and the pyramid-cookiecutter-starter scaffold and decide if the jinja2 one is doing anything weird we want to fix and then copy it over to starter.

The main thing to me is that this scaffold does some i18n stuff which the starter doesn't do. I don't have a problem with that, but only if we make sure it actually works really well and that it matches pyramid's i18n docs. I'm tired of seeing issues opened that say pyramid's i18n docs don't work or that the scaffold does it the old way, etc. We need to standardize the extractors to be lingua or babel or whatever the current best practice is.

@stevepiercy
Copy link
Member

If you change pyramid-cookiecutter-starter, should we also change the starter scaffold in Pyramid so they align?

@mmerickel
Copy link
Member Author

I'm personally not inclined to maintain the scaffolds going forward after we've deprecated them. However if people feel differently then I won't stop them.

@mmerickel
Copy link
Member Author

As a general note, I'm not inclined at all to delay the release of Pyramid 1.8 to do any of the work I suggested. Deprecating the scaffolds is proving to be a ton of work, and improving them at the same time is too much imo. It might be better to keep the pyramid-cookiecutter-starter the way it is for now with a simple conversion to jinja2 and not try to tackle the i18n issues I mentioned at this time... meaning do not merge the repositories yet and keep the pyramid_jinja2 one separate.

@stevepiercy
Copy link
Member

I synched up the differences between pyramid-cookiecutter-starter and pyramid-cookiecutter-jinja2, and submitted a PR to the latter domenkozar/pyramid-cookiecutter-jinja2#1. A couple of differences remain:

  • starter uses two templates, where one inherits from the other, whereas jinja2 uses one template
  • jinja2 has i18n stuff

I ran through the installation, ran tests successfully, and started up the app without problem.

I did not do anything with i18n or translations.

What are the next steps?

FWIW, I'm moving forward with using the starter on the Quick Tour and Tutorial. I'd like to see standardized i18n stuff.

@stevepiercy
Copy link
Member

Whenever this issue is resolved, then also update Pyramid's docs https://github.com/Pylons/pyramid/blob/master/docs/narr/i18n.rst

@stevepiercy
Copy link
Member

With the looming merger of all three cookiecutters into one, I think we can close this issue upon the release of Pyramid 1.10.

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

No branches or pull requests

5 participants