Skip to content
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

Make converter support response key for test stories #7080

Merged
merged 7 commits into from
Oct 30, 2020

Conversation

kalkbrennerei
Copy link
Contributor

@kalkbrennerei kalkbrennerei commented Oct 21, 2020

Closes #7034
Proposed changes:

  • make MarkdownStoryReader::_parse_message use intent_response_key if a response key is used

Status (please check what you already did):

  • added some tests for the functionality
  • updated the documentation
  • updated the changelog (please check changelog for instructions)
  • reformat files using black (please check Readme for instructions)

@kalkbrennerei kalkbrennerei marked this pull request as ready for review October 21, 2020 11:22
@kalkbrennerei kalkbrennerei requested a review from degiz October 21, 2020 11:22
Copy link
Contributor

@degiz degiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job testing that! 👍
One question - can we name these tests the same way? They are almost the same, the only difference is that one test normal stories, and the other - test stories.

Also - could you please add a changelog entry?

@rasabot rasabot requested a review from a team October 30, 2020 10:12
Comment on lines +146 to +155
assert content == (
f'version: "{LATEST_TRAINING_DATA_FORMAT_VERSION}"\n'
"stories:\n"
"- story: id\n"
" steps:\n"
" - intent: out_of_scope/other\n"
" user: |-\n"
" hahaha\n"
" - action: utter_out_of_scope/other\n"
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OPT: style suggestion, use multiline string instead (needs import textwrap)

Suggested change
assert content == (
f'version: "{LATEST_TRAINING_DATA_FORMAT_VERSION}"\n'
"stories:\n"
"- story: id\n"
" steps:\n"
" - intent: out_of_scope/other\n"
" user: |-\n"
" hahaha\n"
" - action: utter_out_of_scope/other\n"
)
assert content == textwrap.dedent(f"""
version: "{LATEST_TRAINING_DATA_FORMAT_VERSION}"
stories:
- story: id
steps:
- intent: out_of_scope/other
user: |-
hahaha
- action: utter_out_of_scope/other
""")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!! since it already got merged, I will consider this for the next test I write!

@rasabot rasabot merged commit 8df97d0 into master Oct 30, 2020
@rasabot rasabot deleted the 7034-test-stories-support-response-key branch October 30, 2020 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Response key deleted by MarkdownStoryReader
4 participants