Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Add message linking to copier template and exit before prompts #195

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

DragaDoncila
Copy link
Collaborator

Closes #191.

This PR adds a pre_prompt.py hook that advises the user about how to run the new napari-plugin-template, links to the new template repo, and then exits before presenting any prompts.

Copy link

@willingc willingc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! I would consider adding the repo URL at the start of the message too. Thanks @DragaDoncila ☀️

print("python -m pip install npe2")
print("copier copy --trust https://github.com/napari/napari-plugin-template new-plugin-name")
print()
print("For more information, refer to the template README:")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet!

This works well locally. It's fine to merge as is.

I think that it makes sense to give the location of the new template's repo before the how to use the new template.

It won't hurt to have the new repo listed twice. Once at the beginning and once at the end.

Copy link
Member

@jni jni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @DragaDoncila!

@willingc in the interest of closing this loop and since this repo is headed for the dustbin of history, I'm going to merge as is and archive the repo. Thank you for trying it out!

@jni jni merged commit f53390a into napari:main Nov 6, 2024
12 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement useful error message for original cookiecutter command
3 participants