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

More intelligent generation #5

Open
johnpneumann opened this issue Oct 30, 2016 · 0 comments
Open

More intelligent generation #5

johnpneumann opened this issue Oct 30, 2016 · 0 comments
Assignees

Comments

@johnpneumann
Copy link
Owner

  • cookiecutter-py version: 1.0.1
  • Python version: N/A
  • Operating System: N/A

Description

There are two issues currently:

  1. Arguments that have "sub-arguments" (eg. use_pypi and pypi_url) are still requested when the parent argument should have excluded it. This is something that should be fixed upstream, but we can account for this in the post project generation. See Upstream for details
  2. The use_git argument is only half working. It initializes the repository with the files, but does not contain a valid git repository, due to the fact that the objects and refs subfolders are missing.

The issues are not necessarily linked, however, they both can be fixed within the post_gen_project.py hook. Alternatively, there are other ways of generating projects that existed before cookiecutter (eg. bash script: prompt for args, copy project structure based on args, sed, done), that may be worth exploring, since this isn't the first issue that's come up (eg. whitespace issues are painful due to the way Jinja works - which is fine for non-whitespace sensitive languages, but not Python).

Upstream

Because we would need to add a new type of argument inside of cookiecutter, we would need to modify the way that context is generated (generate.generate_context), but more importantly, we'd need to modify the prompt.prompt_for_config, which already has three different ways of handling argument types (str, list and dictionary).

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

No branches or pull requests

1 participant