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: ./ output: ./
templates: templates/ 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: tribes:
- name: Tribe1 - name: Tribe1
type: Type1 type: Type1

View File

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