Skip to content

New 2.0 Context Implementation#1008

Closed
eruber wants to merge 72 commits intocookiecutter:mainfrom
eruber:new-2.0-context
Closed

New 2.0 Context Implementation#1008
eruber wants to merge 72 commits intocookiecutter:mainfrom
eruber:new-2.0-context

Conversation

@eruber
Copy link
Copy Markdown

@eruber eruber commented Nov 4, 2017

For your consideration - an implementation of version 2 context format as specified by hackebrot's pull request 848 and using hackebrot's context.py module from his new context format branch here.

My detailed dev notes on the implementation are available here along with Travis and AppVeyor reports. The dev notes cover implementation goals, implementation details, and testing.

The high-altitude summary is - one new file added, two existing files modified, and created 48 new tests for code coverage. Currently not passing Python 2.7, but 3.3 - 3.6 are green. I might need help with 2.7. Assuming of course, this pull request gains traction.

Added a ReadTheDocs project that documents the version 2 Cookiecutter template format that this rull requests supports.

Also, I have a repo containing a command line utility that will convert a version 1 template file to a version 2 file.

eruber added 27 commits October 20, 2017 20:56
@eruber
Copy link
Copy Markdown
Author

eruber commented Nov 4, 2017

Come to think of it, now that I am more familiar with the front-end of Cookiecutter (pre-jinja2 rendering) it might be more stream-lined to get rid of the code that processes v1 templates, and just convert all v1 files internally to version 2 files and then do the version 2 processing. The conversion is straightforward and it simplifies the code paths and maintenance.

@eruber
Copy link
Copy Markdown
Author

eruber commented Nov 11, 2017

In the course of being a user of this fork and having a cookiecutter.json file that is rather complex, I have added a few more features that make conditional processing of variables more intuitive. These features are:
do_if (as opposed to skip_if)
if_yes_skip_to : variable name
if_no_skip_to : variable name

I am in the middle of testing these now...

@kurtmckee
Copy link
Copy Markdown
Member

I'm closing this PR due to its age and size.

@kurtmckee kurtmckee closed this Jun 14, 2023
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.

7 participants