monarch-initiative / monarch-project-template

A Cookiecutter to kickstart Python based projects.
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

cookiecutter keywords pyproject.toml scripts do not resolve #9

Open sierra-moxon opened 1 year ago

sierra-moxon commented 1 year ago
[tool.poetry.scripts]
{{cookiecutter.project_name}} = "{{cookiecutter.__project_slug}}.cli:main"

is translated to:

[tool.poetry.scripts]
Project_X = "{{ cookiecutter.project_name|lower()|replace(' ', '_')|replace('-', '_') }}.cli:main"
sierra-moxon commented 1 year ago

name replacement doesn't work for the project name either.

hrshdhgd commented 1 year ago

I just tried this using cruft create and all default choices besides the project name = Project-X (- instead of _) and I got

[tool.poetry.scripts]
Project-X = "project_x.cli:main"

Is this different from what you are seeing?

sierra-moxon commented 1 year ago

doing the same, in pyproject.toml I get:

[tool.poetry.scripts]
Project-X = "{{ cookiecutter.project_name|lower()|replace(' ', '_')|replace('-', '_') }}.cli:main"
hrshdhgd commented 10 months ago

@sierra-moxon , is this still happening?

cmungall commented 7 months ago

still an issue?