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

Adding longer prompts for all cookiecutter options #380

Merged
merged 6 commits into from
Jun 5, 2024

Conversation

matt-graham
Copy link
Collaborator

Fixes #296 and fixes #305

Adds longer human-readable prompts for all cookiecutter template options using the prompts field in cookiecutter.json (we already had a prompt for deploy_docs_to_github_pages option from #319).

Questions

  • Do we want longer prompts for all options or do we think the longer forms for some of the more obvious ones like author_email are unnecessary?
  • Do we want to set a maximum character length on the prompts? Some of the below are quite long which may cause them to wrap depending on terminal width.

With current prompts, creating a new packages with default options renders as

  [1/14] Given name(s) of package author (Eva Lu):
  [2/14] Family name(s) of package author (Ator):
  [3/14] Email address for package author - will be publicly accessible (eva.lu.ator@ucl.ac.uk):
  [4/14] Name for project - may contain spaces (Python Template):
  [5/14] 'Slugified' project name for use in URLs - recommended to be all lower case with hyphens as word separator (python-template):
  [6/14] Name for Python package - recommended to be all lowercase with underscores as word separator (python_template):
  [7/14] Short description of the project and package (A cookiecutter template with ARC recommendations.):
  [8/14] Initialise generated package directory as a Git repository [y/n] (y):
  [9/14] Enable automatically deploying HTML documentation to GitHub Pages website on pushes to main [y/n] (n):
  [10/14] GitHub user or organization which will be owner of repository if deploying to GitHub (eva-lu-ator):
  [11/14] Minimum Python version supported by package
    1 - 3.10
    2 - 3.11
    3 - 3.12
    Choose from [1/2/3] (1):
  [12/14] Maximum Python version supported by package
    1 - 3.12
    2 - 3.11
    3 - 3.10
    Choose from [1/2/3] (1):
  [13/14] Which open-source license to release package under
    1 - MIT
    2 - BSD-3
    3 - GPL-3.0
    Choose from [1/2/3] (1):
  [14/14] Any organisation(s) to acknowledge for contibruting to funding of package development (JBFC: The Joe Bloggs Funding Council):

@matt-graham matt-graham added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 4, 2024
Copy link
Member

@paddyroddy paddyroddy left a comment

Choose a reason for hiding this comment

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

I think this is a great idea. Agree on your second point, we probably want a character limit on them.

@matt-graham
Copy link
Collaborator Author

matt-graham commented Jun 4, 2024

I've had a go at shortening the prompts - maximum character length is now 65, and renders as

  [1/14] Given name(s) of package author (Eva Lu):
  [2/14] Family name(s) of package author (Ator):
  [3/14] Email address for package author - will be publicly accessible (eva.lu.ator@ucl.ac.uk):
  [4/14] Name for project - may contain spaces (Python Template):
  [5/14] 'Slugified' project name for use in URLs - dash-case recommended (python-template):
  [6/14] Name for Python package - snake_case recommended (python_template):
  [7/14] Short description of the project (A cookiecutter package with UCL ARC recommendations.):
  [8/14] Initialise project directory as a Git repository [y/n] (y):
  [9/14] Automatically deploy HTML docs to GitHub Pages on pushes to main [y/n] (n):
  [10/14] GitHub user/organization which will be owner of repository (eva-lu-ator):
  [11/14] Minimum Python version supported by package
    1 - 3.10
    2 - 3.11
    3 - 3.12
    Choose from [1/2/3] (1):
  [12/14] Maximum Python version supported by package
    1 - 3.12
    2 - 3.11
    3 - 3.10
    Choose from [1/2/3] (1):
  [13/14] Which open-source license to release package under
    1 - MIT
    2 - BSD-3
    3 - GPL-3.0
    Choose from [1/2/3] (1):
  [14/14] Organisation(s) to acknowledge for funding of project (JBFC: The Joe Bloggs Funding Council):

Copy link
Member

@dstansby dstansby left a comment

Choose a reason for hiding this comment

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

Some minor suggestions, but looks 👍 overall!

cookiecutter.json Show resolved Hide resolved
cookiecutter.json Outdated Show resolved Hide resolved
cookiecutter.json Outdated Show resolved Hide resolved
cookiecutter.json Outdated Show resolved Hide resolved
cookiecutter.json Outdated Show resolved Hide resolved
cookiecutter.json Outdated Show resolved Hide resolved
Co-authored-by: David Stansby <dstansby@gmail.com>
@matt-graham matt-graham merged commit e42881e into main Jun 5, 2024
12 checks passed
@matt-graham matt-graham deleted the mmg/cookiecutter-prompts branch June 5, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
3 participants