Skip to content

Commit

Permalink
Conversation tests using yaml (#6457)
Browse files Browse the repository at this point in the history
* Create conversation_tests.yml

* implement conversation tests using the new yml format

* fixed linter issues

* renamed test_conversatiosn to stories

* fixed story reader detection

* fixed remaining tests

* fixed type error

* fixed some smaller style issues

* added documentation

* style improvements

* Update rasa/core/training/story_reader/markdown_story_reader.py

Co-authored-by: Ella Rohm-Ensing <[email protected]>

* adressed review comments (and linter error)

* added changelog item

* fixed failing tests

* added tests

* fixed linting

* fixed classification test

* fixed some more style errors deepsource found

* fixed some more deepsource issues

* fixed some more deepsource issues...

* Autofix issues in 1 files

Resolved issues in the following files via DeepSource Autofix:
1. rasa/cli/utils.py

* added comments for public funcionts

* trying to fix tests

* fixed server tests

* Apply suggestions from code review

Co-authored-by: Alexander Khizov <[email protected]>

* adressed review comments

* renamed files to stay in test stories naming convention

* removed trailing whitespace

* fixed shitty tests

* added default argument

* Update test_multi_project.py

* fixed windows errors

* trying to fix escaping issues

* fixed linter

Co-authored-by: Ella Rohm-Ensing <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Alexander Khizov <[email protected]>
  • Loading branch information
4 people authored Aug 27, 2020
1 parent dbd3e94 commit be509cf
Show file tree
Hide file tree
Showing 93 changed files with 1,975 additions and 1,450 deletions.
1 change: 1 addition & 0 deletions changelog/6457.improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Support for test stories written in yaml format.
2 changes: 2 additions & 0 deletions data/test_dialogues/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
"confidence": 0.0,
"name": "greet"
},
"message_id": null,
"metadata": {},
"text": "Hi my name is Peter"
},
"text": "Hi my name is Peter",
Expand Down
3 changes: 0 additions & 3 deletions data/test_endpoints/event_brokers/file_endpoint.yml

This file was deleted.

9 changes: 1 addition & 8 deletions data/test_multi_domain/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
language: en

pipeline:
- name: SpacyNLP
- name: SpacyTokenizer
- name: SpacyFeaturizer
- name: RegexFeaturizer
- name: CRFEntityExtractor
- name: EntitySynonymMapper
- name: SklearnIntentClassifier
- name: "KeywordIntentClassifier"

policies:
- name: MemoizationPolicy
- name: TEDPolicy

importers:
- name: MultiProjectImporter
Expand Down
6 changes: 6 additions & 0 deletions data/test_trackers/tracker_moodbot.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"confidence": 0.60,
"name": "mood_great"
},
"message_id": null,
"metadata": {},
"text": "/mood_great",
"intent_ranking": [
{
Expand Down Expand Up @@ -46,6 +48,8 @@
"confidence": 0.54,
"name": "greet"
},
"message_id": null,
"metadata": {},
"text": "/greet",
"intent_ranking": [
{
Expand Down Expand Up @@ -89,6 +93,8 @@
"confidence": 0.60,
"name": "mood_great"
},
"message_id": null,
"metadata": {},
"text": "/mood_great",
"intent_ranking": [
{
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/business-logic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ Here's a minimal checklist of files we modified to handle business logic using a

* `actions.py`: Define the form action, including the `required_slots`, `slot_mappings` and `submit` methods

* `data/nlu.md`:
* `data/nlu.yml`:

* Add examples for an intent to activate the form

Expand All @@ -308,7 +308,7 @@ Here's a minimal checklist of files we modified to handle business logic using a

* Add all intents and entities from your NLU training data

* `data/stories.md`: Add a story for the form
* `data/stories.yml`: Add a story for the form

* `config.yml`:

Expand Down
Loading

0 comments on commit be509cf

Please sign in to comment.