Skip to content

Commit

Permalink
fix(template): Solve missing information (#151)
Browse files Browse the repository at this point in the history
* Fix typo in cli

* Fix variable names

* Fix pre-commit error
  • Loading branch information
Anavelyz authored Jul 24, 2023
1 parent fe9ce87 commit 8811b22
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions src/scicookie/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ def _get_cookiecutter_default_answer(


def call_cookiecutter(profile: Profile, answers: dict):
"""Call coociecutter/cookieninja with the parameters from the TUI."""
"""Call cookiecutter/cookieninja with the parameters from the TUI."""
answers_profile = {}
cookie_args = []
questions = profile.config

with open(COOKIECUTTER_FILE_PATH) as f:
coockiecutter_config = json.load(f)
cookiecutter_config = json.load(f)

# fill the answers with default value
for question_id, question in questions.items():
Expand All @@ -52,9 +52,7 @@ def call_cookiecutter(profile: Profile, answers: dict):

answers_profile[question_id] = question.get(
"default"
) or _get_cookiecutter_default_answer(
coockiecutter_config[question_id]
)
) or _get_cookiecutter_default_answer(cookiecutter_config[question_id])

for question_id, answer in answers.items():
if answer in [None, ""] or questions[question_id].get("control_flow"):
Expand Down
4 changes: 2 additions & 2 deletions src/scicookie/profiles/base.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
author_name:
author_full_name:
message: Author's name
help: See more at https://
type: text
Expand All @@ -19,7 +19,7 @@ project_name:
default: OSL Python package
enabled: true

project_description:
project_short_description:
message: Project short description
help: ""
type: text
Expand Down
4 changes: 2 additions & 2 deletions src/scicookie/profiles/osl.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
author_name:
author_full_name:
enabled: true

author_email:
Expand All @@ -7,7 +7,7 @@ author_email:
project_name:
enabled: true

project_description:
project_short_description:
enabled: true

project_slug:
Expand Down

0 comments on commit 8811b22

Please sign in to comment.