Skip to content

Commit

Permalink
Update dependencies in 3.0 to align with rasa-sdk (#10667)
Browse files Browse the repository at this point in the history
* align dependencies
* use black 21.7b0
* apply black and docstring reformatting
* add changelog
  • Loading branch information
carlad authored Jan 17, 2022
1 parent f895379 commit 89ec3af
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 20 deletions.
7 changes: 1 addition & 6 deletions test_rasa_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,6 @@ def test_validate_files_invalid_slot_mappings(tmp_path: Path):
- location
"""
)
args = {
"domain": str(domain),
"data": None,
"max_history": None,
"config": None,
}
args = {"domain": str(domain), "data": None, "max_history": None, "config": None}
with pytest.raises(SystemExit):
data.validate_files(namedtuple("Args", args.keys())(*args.values()))
2 changes: 1 addition & 1 deletion test_rasa_evaluate_markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test_markers_cli_results_save_correctly(

endpoints_path = write_endpoint_config_to_yaml(
tmp_path,
{"tracker_store": {"type": "sql", "db": db_path.replace("\\", "\\\\")},},
{"tracker_store": {"type": "sql", "db": db_path.replace("\\", "\\\\")}},
)

markers_path = write_markers_config_to_yaml(
Expand Down
2 changes: 1 addition & 1 deletion test_rasa_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def test_train_data_in_project_dir(monkeypatch: MonkeyPatch, tmp_path: Path):
subparsers = parser.add_subparsers()
scaffold.add_subparser(subparsers, parents=[])

args = parser.parse_args(["init", "--no-prompt",])
args = parser.parse_args(["init", "--no-prompt"])

# Simple config which should train fast.
def mock_get_config(*args):
Expand Down
6 changes: 2 additions & 4 deletions test_rasa_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def test_test_with_no_user_utterance(
run_in_simple_project_with_model: Callable[..., RunResult]
):
write_yaml(
{"pipeline": "KeywordIntentClassifier", "policies": [{"name": "TEDPolicy"}],},
{"pipeline": "KeywordIntentClassifier", "policies": [{"name": "TEDPolicy"}]},
"config.yml",
)

Expand Down Expand Up @@ -160,9 +160,7 @@ def test_test_nlu_cross_validation_with_autoconfig(
config_path = str(testdir.tmpdir / "config.yml")
nlu_path = str(testdir.tmpdir / "nlu.yml")
shutil.copy(str(moodbot_nlu_data_path), nlu_path)
write_yaml(
{"language": "en", "pipeline": None, "policies": None,}, config_path,
)
write_yaml({"language": "en", "pipeline": None, "policies": None}, config_path)
args = [
shutil.which("rasa"),
"test",
Expand Down
9 changes: 2 additions & 7 deletions test_rasa_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
from rasa.engine.storage.local_model_storage import LocalModelStorage
from rasa.engine.storage.resource import Resource
from rasa.shared.core.domain import Domain
from rasa.model_training import (
CODE_NEEDS_TO_BE_RETRAINED,
CODE_FORCED_TRAINING,
)
from rasa.model_training import CODE_NEEDS_TO_BE_RETRAINED, CODE_FORCED_TRAINING

# noinspection PyProtectedMember
from rasa.cli.train import _get_valid_config
Expand Down Expand Up @@ -69,9 +66,7 @@ def test_train(run_in_simple_project: Callable[..., RunResult], tmp_path: Path):
def test_train_finetune(
run_in_simple_project: Callable[..., RunResult], capsys: CaptureFixture
):
run_in_simple_project(
"train", "--finetune",
)
run_in_simple_project("train", "--finetune")

output = capsys.readouterr().out
assert "No model for finetuning found" in output
Expand Down
2 changes: 1 addition & 1 deletion test_rasa_x.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ async def test_pull_runtime_config_from_server():


def test_rasa_x_raises_warning_above_version_3(
monkeypatch: MonkeyPatch, run: Callable[..., RunResult],
monkeypatch: MonkeyPatch, run: Callable[..., RunResult]
):
def mock_run_locally(args):
return None
Expand Down

0 comments on commit 89ec3af

Please sign in to comment.