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

Add check loop def #10971

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

emysdias
Copy link
Contributor

@emysdias emysdias commented Mar 8, 2022

Co-authored-by: WashingtonBispo juniorbispo515@gmail.com

#10925

Proposed changes:

file stories.yml to test

version: "3.0"

stories:

- story: greet path
  steps:
  - intent: greet
  - action: utter_greet
  - checkpoint: cp_a

- story: cp_a1
  steps:
  - checkpoint: cp_a
  - intent: movies
  - action: utter_movies

- story: cp_a2
  steps:
  - checkpoint: cp_a
  - intent: deny
  - action: utter_cheer_up
  - checkpoint: cp_b

- story: cp_b1
  steps:
  - checkpoint: cp_b
  - intent: affirm
  - action: utter_cheer_up
  - checkpoint: cp_a
  

- story: sad path 1
  steps:
  - intent: greet
  - action: utter_greet
  - intent: mood_unhappy
  - action: utter_cheer_up
  - action: utter_did_that_help
  - intent: affirm
  - action: utter_happy

- story: sad path 2
  steps:
  - intent: greet
  - action: utter_greet
  - intent: mood_unhappy
  - action: utter_cheer_up
  - action: utter_did_that_help
  - intent: deny
  - action: utter_goodbye

The warning:
Captura de tela de 2022-03-08 10-12-10

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)

Co-authored-by: WashingtonBispo <juniorbispo515@gmail.com>
@emysdias emysdias requested a review from a team as a code owner March 8, 2022 03:27
@emysdias emysdias requested review from joejuzl and removed request for a team March 8, 2022 03:27
@CLAassistant
Copy link

CLAassistant commented Mar 8, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ emysdias
❌ itallogravina
You have signed the CLA already but the status is still pending? Let us recheck it.

@hsm207
Copy link
Contributor

hsm207 commented Mar 9, 2022

I don't understand how to interpret cp_b => cp_a is causing a loop. I'd like to quickly identify which stories are causing the loop just by reading the warning, similar to how the warning is when rasa data validate found conflicting stories.

Co-authored-by: WashingtonBispo <juniorbispo515@gmail.com>
@emysdias
Copy link
Contributor Author

emysdias commented Mar 9, 2022

I don't understand how to interpret cp_b => cp_a is causing a loop. I'd like to quickly identify which stories are causing the loop just by reading the warning, similar to how the warning is when rasa data validate found conflicting stories.

I changed the message
Captura de tela de 2022-03-09 20-35-22

@m-vdb m-vdb removed the request for review from joejuzl May 20, 2022 07:31
Copy link
Contributor

@losterloh losterloh left a comment

Choose a reason for hiding this comment

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

The code from here seems to also be incorporated into #10984. It may make sense to get this PR here merged first and then rebase #10984 against main.

Copied from #10984:

The verify_loop_in_intents method is hard to read, and lacking tests.
We suggest adding tests and restructuring the method; for instance, splitting it into several sub-methods could improve readability, as will the presence of tests.

As the logic is a bit more on the complex side, adding tests here is crucial.

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.

5 participants