-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Allowing dictionary under slot_was_set
in the stories schema
#8142
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thank you so much for the review @alwx ! Two more things :
|
changelog/7470.bugfix.md
Outdated
@@ -0,0 +1,10 @@ | |||
Allowing in `stories.yml` and under the key `slot_was_set` to have slots with values that result to a dictionary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rephrase it a bit (e.g. "Allow to have slots with values that result to a dictionary in stories.yml
and under the key slot_was_set
") or at least replace "Allowing" with verb "Allow", but that's of course super minor and certainly up to you.
Slight rephrasing of the changelog
Proposed changes:
stories.yml
to allow the presence of a dictionary underslot_was_set
key in thestories.yml
.Current investigation:
yaml schemas
happen in the functionvalidate_yaml_schema
at this point in the code where thevalidate
function of theCore class
(ofpykwalify
) is called.stories schema
to allow a dictionary underslow_was_set
by adding the typemap
withallowempty : True
which means that it canhave keys which are not present in the schema, and these can map to anything.
type: "any"
which also checks the stories.yml and returns it as a valid file but it feels like it undermines all the previous checks since based on the docs type any : will always be true no matter what the value is, even unimplemented types.pykwalify
. If it is possible then we could also take into account the ‘influence_conversation’ value in the domain file which can affect the check in thestories schema
.The solution in this PR is related and would be affected from the progress in this ticket.
Status (please check what you already did):
black
(please check Readme for instructions)