Feat: incoporate cometences config

This commit is contained in:
Bertrand Benjamin 2021-01-01 18:04:28 +01:00
parent 4ea7f8db14
commit 52f2f3f4cf
2 changed files with 24 additions and 3 deletions

View File

@ -3,6 +3,27 @@ source: ./
output: ./
templates: templates/
competences:
Calculer:
name: Calculer
abrv: Cal
Représenter:
name: Représenter
abrv: Rep
Modéliser:
name: Modéliser
abrv: Mod
Raisonner:
name: Raisonner
abrv: Rai
Calculer:
name: Calculer
abrv: Cal
Communiquer:
name: Communiquer
abrv: Com
tribes:
- name: Tribe1
type: Type1

View File

@ -205,9 +205,9 @@ def prompt_question(last_question_id="1a", **kwrd):
question["competence"] = prompt(
"Competence: ",
default=kwrd.get("competence", "Cal"),
# validate
# completer
default=kwrd.get("competence", list(config["competences"].keys())[0]),
completer=WordCompleter(config["competences"].keys()),
validator=Validator.from_callable(lambda x: x in config["competences"].keys()),
)
question["theme"] = prompt(