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

On new project creation, prompt's example text is prepended to actual answers, prepare_project fails #338

Closed
ssteinerx opened this issue Dec 16, 2023 · 6 comments

Comments

@ssteinerx
Copy link

I picked "simple", answered the questions and this is what the top of my pyproject.toml looked like :

[project]
name = "example_projecttestproject"
license = {file = "LICENSE"}
readme = "README.md"
authors = [
    { name = "Your NamessteinerX", email = "[email protected]@gmail.com" }
]

Attempting to run prepare_project.sh didn't go well with the first failure being that "name@[email protected]" is not a valid email address and the rest was just a cascade from there.

@drewoldag
Copy link
Collaborator

Thanks for the heads up, and sorry that it caused you trouble! We'll be spending some time on Monday looking into this.

@delucchi-cmu
Copy link
Contributor

I tried to re-create the behavior this morning, but was unable to. I suspect this is related to behavior within copier (the utility we use for prompts and hydrating the project based on the user's answers) or one of its upstream packages.

@ssteinerx - Do you mind sharing the versions you're working with?

$ pip show copier
Name: copier
Version: 9.0.1
...
$ pip show jinja2
Name: Jinja2
Version: 3.1.2
...
$ pip show prompt-toolkit
Name: prompt-toolkit
Version: 3.0.36
...

@ssteinerx
Copy link
Author

Sorry, this environment no longer exists and I've moved too far past this brief experiment to recreate it. I apologize for not including more version information to begin with, but I really wouldn't have known which versions of what were even relevant.

@jeremykubica
Copy link
Collaborator

I also tried to reproduce this and was not able.

@ssteinerx
Copy link
Author

I'm going to pull the latest right now and see what I can see.

@ssteinerx
Copy link
Author

Ok, I ran it, and got the version warning. If I'm not mistaken, I was using Copier 9.0 when I did the original test:

copier copy python-project-template/ ppt-test1
...copier/lib/python3.12/site-packages/copier/template.py:134: OldTemplateWarning: This template was designed for Copier 8.0.0, but your version of Copier is 9.1.1. You could find some incompatibilities.
  warn(
🎤 Would you like to use simple (default tooling) or customized installation?
   simple
🎤 What is the name of your project?
   ss_test_example_project
🎤 What is your python package name?
   ss_test_example_package
🎤 What github organization will your project live under?
   ss_test_organization
🎤 What is the name of the code author? (Can be a person or organization)
   SS Tester
🎤 Code author's preferred email address?
   [email protected]
🎤 What license would you like to use?
   MIT

I searched through all of the files for "ss_test" and there was none of the "default value" + "_ss_test" stuff I was seeing before.

I was able to do this several times in a row previously and didn't have time to do other than get a quick issue out there. It was so consistent, I figured it'd be easy to duplicate and the toolchain was current and freshly installed at the time.

I'm going to chalk this up to a versionic mixed metaphor and close this issue.

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

4 participants