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

New 2.0 Context Implementation #1008

Closed
wants to merge 72 commits into from
Closed

Conversation

eruber
Copy link

@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
Copy link
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
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
Member

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

@kurtmckee kurtmckee closed this Jun 14, 2023
2.0.0 Release automation moved this from In progress to Done 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
2.0.0 Release
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

8 participants